Polkadot enables smart contract development with pallet-revive. This allows using familiar Ethereum tools and libraries while leveraging Polkadot’s robust ecosystem.
Please provide feedback on your experience deploying smart contracts on Polkadot using this feedback form.
Refer to the known issues document if you're running into issues deploying contracts or using any of the tools below. If you have a new bug or problem, please raise an issue in the Contracts Bug tracker on Github.
- To speed things up and have your "batteries included" dev environment, you can use DevContainers. They are regularly maintained and tested by the ecosystem professionals. You can find the configuration for Polkadot smart contract development in the smart-contracts-devcontainer repository.
- To use it, you need to have Docker or Podman installed and running on your machine. You also need the Vscode extension for DevContainers. You can install it from the VSCode Marketplace.
- Once Docker is running and the DevContainers extension is installed, simply create a new folder and run the following command to get started:
curl -fsSL https://raw.githubusercontent.com/paritytech/smart-contracts-devcontainer/main/.devcontainer/fetch-devcontainer.sh | bash -s --GitHub enforces a rate limit per hour. If you run into this, just follow the Hardhat path shown in the next section.
There are multiple development environments already available for Polkadot smart contract development. Here are some of the most popular ones:
-
⭐ [RECOMMENDED] Hardhat - a popular Ethereum development environment that can be used for Polkadot smart contract development with the help of custom plugins.
-
🤠 Foundry - a smart contract development toolchain that manages your dependencies, compiles your project, runs tests, deploys, and lets you interact with the contracts.
Besides Solidity, you can also write smart contracts in Rust using ink! — the go-to language for Rust-based smart contract development on Polkadot. Check out the ink! Docs to get started.
- Check out the ink! Hackathon Guide.
Several libraries can be used to interact with smart contracts deployed on Polkadot for both Solidity and Rust.
Solidity
-
⚡ viem
-
🌐 Web3.js
-
🐍 Web3.py
-
🧙 Wagmi
-
🛠️ kitdot - scaffolding tool with zero-config Hardhat + Polkadot setup
ink!
Here you can find some useful tutorials and resources to help you get started with smart contract development on Polkadot:
-
✍️ Create a Smart Contract - a step-by-step guide to creating your first smart contract on Polkadot
-
⚙️ Test and Deploy with Hardhat - a guide to testing and deploying your smart contract using Hardhat
-
🎨 Deploy a NFT - a tutorial on deploying an NFT smart contract on Polkadot
-
💰 Deploy an ERC-20 - a tutorial on deploying an ERC-20 token smart contract on Polkadot
-
🛠️ Create a dApp with Viem - a tutorial on creating a simple dApp using the Viem library
-
🛠️ Create a dApp with Ethers.js - a tutorial on creating a simple dApp using the Ethers.js library
-
🎥 Deploy Rust and Solidity contracts – a workshop showcasing how to deploy and interact with Solidity and Rust contracts on the Polkadot Hub.
-
🔄 ink! Ethereum Compatibility — generate a Solidity-compatible ABI for your ink! contracts.
-
🧩 Build a Frontend for an ink! dApp — a step-by-step React/TypeScript frontend using inkathon to connect, read state, and send transactions to an ink! ERC-20 smart contract.
You can use any Ethereum-compatible wallet wallet to connect to Polkadot Hub Testnet. Follow the Connect your Wallet guide to connect using MetaMask. We also recommend using Talisman, which is built for both Polkadot and Ethereum.
Quick Setup: Use Chainlist to automatically configure Passet Hub in your wallet with one click.
Testnet details:
* Network name: Passet Hub
* Chain ID: 420420422
* RPC URL: https://testnet-passet-hub-eth-rpc.polkadot.io
* Block Explorer URL: https://blockscout-passet-hub.parity-testnet.parity.io/
Need testnet tokens? Get some from the Testnet Faucet 💧
Note: Make sure you've selected the Passet Hub chain on the Paseo network!
Jumpstart your smart contract dApp with these templates:
-
create-polkadot-dapp - a scaffolding tool to generate project boilerplates. Explore the
react-soliditytemplate located in thetemplatesfolder which comes pre-configured with React, Tailwind CSS, and Ethers.js for frontend interaction with your smart contracts -
create-dot-app - a comprehensive scaffolding tool with Solidity templates for both React and Vue, making it easy to get started with smart contract development on Polkadot
-
hardhat-polkadot-example - a demo for how to use Hardhat with Polkadot.
-
If using AI tools like LLMs, remember to direct them to use the most up-to-date documentation.
-
For AI Coding Assistants: Use the Agents.md file as context for your coding agents (Claude Code, Cursor, etc.). This comprehensive guide includes network configurations, deployment strategies, common errors, and troubleshooting steps. Copy it to your project root or reference it in your AI assistant's context. Note: kitdot automatically includes this file in new projects.
-
Especially if you are using Claude, this document contains configuration settings for using the testnet to deploy smart contracts, and we recommend informing your LLM to refer to it.