Skip to content

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.

Use these curated links to get connected, get funded, and deploy your first contract.

Quick StartToolsDescription
Connect to PolkadotPolkadot.js, MetaMaskAdd the network, configure RPC, verify activity in the explorer
Get Test Tokens-Request test funds to deploy and interact with contracts
Explore TransactionsBlockScout, Routescan, SubscanInspect transactions, logs, token transfers, and contract state

Set up local environments and CI-friendly workflows to iterate quickly and validate changes before deploying.

TitleDifficultyToolsDescription
Local Development Node🟢 BeginnerPolkadot SDK nodeSpin up a local node for iterative development.
Use Remix for Development🟢 BeginnerRemixConnect Remix to Polkadot Hub.
Use Hardhat for Development🟢 BeginnerHardhatProject scaffolding and configuration with Hardhat.
Use Foundry for Development🟢 BeginnerFoundryCompile, test, deploy, and verify contracts with Foundry.
OpenZeppelin Contracts Wizard for PolkadotN/AOpenZeppelinGenerate ERC-20, ERC-721, and other OpenZeppelin-standard contracts for Polkadot Hub without writing code
Rust for PVMN/ALLMs, coding agentsWrite PVM smart contracts natively in Rust; use AI assistants while native tooling matures

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.

Bridge your Ethereum knowledge with Polkadot Hub specifics: account mapping, fees, JSON-RPC, and deployment.

TitleDescription
AccountsHow 20-byte Ethereum addresses map to 32-byte Polkadot accounts.
Gas ModelGas vs. weight, proof size, and storage deposits.
Contract DeploymentDeployment mechanics, gas estimation, and storage model.
Blocks, Transactions, and FeesTransaction types, fees, and multi-dimensional metering.
EVM vs PVMCompare EVM and PVM architectures, gas models, and key differences.
Dual VM StackOverview of EVM and native execution on the Hub.
JSON-RPC APIsSupported Ethereum JSON-RPC methods and examples.

Follow step-by-step guides that walk through common tasks and complete dApp examples.

TutorialToolsDescription
Deploy a Basic ContractRemixMinimal deployment walkthrough
Deploy an ERC-20Remix, OpenZeppelinCreate, deploy, and mint a fungible token
Deploy an NFT (ERC-721)Remix, OpenZeppelinBuild and deploy an NFT collection
Uniswap V2HardhatFull dApp project: compile, test, deploy
Zero‑to‑Hero dAppMultipleEnd‑to‑end dApp patterns and practices

Choose the client libraries that fit your stack for connecting wallets and calling contracts.

TitleDescription
Ethers.jsConnect, sign, and interact with contracts using Ethers.js.
Web3.jsWeb3 provider and contract APIs.
Web3.pyPython toolkit for on-chain interactions and scripts.
viemType-safe EVM interactions and utilities.
WagmiReact hooks for wallet connections and contract calls.

Integrate essential services like wallets, indexers, and oracles to round out your dApp.

TitleDescription
WalletsSupported wallets and configuration notes.

Discover precompiled system contracts available on the Hub and how to use them.

TitleDescription
Ethereum NativeEVM precompiles and interfaces.
ERC-20Interact with Assets pallet assets using standard ERC20 interfaces.
SystemAccess core runtime functionality and cryptographic operations from smart contracts.
StorageAccess low-level contract storage with reads, writes, and key inspection.
XCMCross-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.

Last updated: