Get Started with Smart Contracts¶
This resource provides quick-starts for building smart contracts on Polkadot Hub. Use the tables below to jump directly to the tools and workflows you need.
Quick Starts¶
Use these curated links to get connected, get funded, and deploy your first contract.
| Quick Start | Tools | Description |
|---|---|---|
| Connect to Polkadot | Polkadot.js, MetaMask | Add the network, configure RPC, verify activity in the explorer |
| Get Test Tokens | - | Request test funds to deploy and interact with contracts |
| Explore Transactions | BlockScout, Routescan, Subscan | Inspect transactions, logs, token transfers, and contract state |
Build and Test Locally¶
Set up local environments and CI-friendly workflows to iterate quickly and validate changes before deploying.
| Title | Difficulty | Tools | Description |
|---|---|---|---|
| Local Development Node | 🟢 Beginner | Polkadot SDK node | Spin up a local node for iterative development. |
| Use Remix for Development | 🟢 Beginner | Remix | Connect Remix to Polkadot Hub. |
| Use Hardhat for Development | 🟢 Beginner | Hardhat | Project scaffolding and configuration with Hardhat. |
| Use Foundry for Development | 🟢 Beginner | Foundry | Compile, test, deploy, and verify contracts with Foundry. |
| OpenZeppelin Contracts Wizard for Polkadot | N/A | OpenZeppelin | Generate ERC-20, ERC-721, and other OpenZeppelin-standard contracts for Polkadot Hub without writing code |
| Rust for PVM | N/A | LLMs, coding agents | Write PVM smart contracts natively in Rust; use AI assistants while native tooling matures |
Ethereum Tool Differences on Polkadot EVM¶
Tools like Foundry and Hardhat are built for standard Ethereum nodes. Polkadot EVM networks (such as Polkadot Hub) use the same Ethereum JSON-RPC interface, but run on a different execution environment (Substrate with REVM or PVM). As a result:
- Local tests (e.g.,
forge test, Hardhat's default network) run in the tool's own EVM, not Polkadot's—so behavior can differ from the real chain. - Time and snapshot helpers (e.g.,
evm_increaseTime,loadFixture) are often not supported on Polkadot nodes. - Gas reports from these tools may not match what you see on-chain.
Recommendation: To check chain-specific behavior, run your contracts against a local dev node or a TestNet. For more details, see EVM vs PVM and Contract Deployment.
Ethereum Developer Resources¶
Bridge your Ethereum knowledge with Polkadot Hub specifics: account mapping, fees, JSON-RPC, and deployment.
| Title | Description |
|---|---|
| Accounts | How 20-byte Ethereum addresses map to 32-byte Polkadot accounts. |
| Gas Model | Gas vs. weight, proof size, and storage deposits. |
| Contract Deployment | Deployment mechanics, gas estimation, and storage model. |
| Blocks, Transactions, and Fees | Transaction types, fees, and multi-dimensional metering. |
| EVM vs PVM | Compare EVM and PVM architectures, gas models, and key differences. |
| Dual VM Stack | Overview of EVM and native execution on the Hub. |
| JSON-RPC APIs | Supported Ethereum JSON-RPC methods and examples. |
Cookbook: Hands-on Tutorials¶
Follow step-by-step guides that walk through common tasks and complete dApp examples.
| Tutorial | Tools | Description |
|---|---|---|
| Deploy a Basic Contract | Remix | Minimal deployment walkthrough |
| Deploy an ERC-20 | Remix, OpenZeppelin | Create, deploy, and mint a fungible token |
| Deploy an NFT (ERC-721) | Remix, OpenZeppelin | Build and deploy an NFT collection |
| Uniswap V2 | Hardhat | Full dApp project: compile, test, deploy |
| Zero‑to‑Hero dApp | Multiple | End‑to‑end dApp patterns and practices |
Libraries¶
Choose the client libraries that fit your stack for connecting wallets and calling contracts.
| Title | Description |
|---|---|
| Ethers.js | Connect, sign, and interact with contracts using Ethers.js. |
| Web3.js | Web3 provider and contract APIs. |
| Web3.py | Python toolkit for on-chain interactions and scripts. |
| viem | Type-safe EVM interactions and utilities. |
| Wagmi | React hooks for wallet connections and contract calls. |
Integrations¶
Integrate essential services like wallets, indexers, and oracles to round out your dApp.
| Title | Description |
|---|---|
| Wallets | Supported wallets and configuration notes. |
Precompiles¶
Discover precompiled system contracts available on the Hub and how to use them.
| Title | Description |
|---|---|
| Ethereum Native | EVM precompiles and interfaces. |
| ERC-20 | Interact with Assets pallet assets using standard ERC20 interfaces. |
| System | Access core runtime functionality and cryptographic operations from smart contracts. |
| Storage | Access low-level contract storage with reads, writes, and key inspection. |
| XCM | Cross-chain messaging helpers for contracts. |
From here, follow the quick starts to get connected, iterate locally with your preferred tools, and use the guides, libraries, integrations, and precompiles as you grow into production‑ready dApps. If you get stuck, open an issue or reach out in the community channels.
| Created: January 14, 2026