All-in-one DevContainer for Polkadot Smart Contracts

We’ve just released the Polkadot Smart Contracts DevContainer, a ready-to-code development environment for building, testing, and deploying smart contracts on Polkadot using Hardhat or Foundry.

Setting up a Polkadot smart contract development environment has traditionally been a slow, error-prone process, often taking 20-45 minutes per developer. These hurdles waste valuable time, drain productivity, and create real friction at hackathons where every minute counts. The new Polkadot Smart Contract DevContainer addresses this issue.

No manual setup. No dependency juggling. Just one command and you’re in.

:toolbox: What’s inside

  • Hardhat stack - @parity/hardhat-polkadot, ignition, resolc, preconfigured networks (local & testnet).
    :right_arrow: Skip setup, start building, testing, and deploying contracts with Hardhat right away.

  • Foundry (Polkadot toolchain) - via foundryup-polkadot with forge, cast, anvil.
    :right_arrow: Skip setup, start building, testing, and deploying contracts with Foundry right away.

  • Local revive dev node + ETH-RPC adapter - preinstalled and ready to run.
    :right_arrow: Test against a realistic local environment without needing to worry about setting up the node and ethereum transaction translator for Polkadot (eth-rpc).

  • Auto key management - A developer keypair generated/imported and wired into your toolchain on first-attach.
    :right_arrow: No fumbling with keys - just build, deploy, and test. You get a prompt to either put in your own key or if you don’t have it, one is created for you on first-attach.

:test_tube: Works in

  • VS Code Dev Containers (VS Code-based IDEs)
  • GitHub Codespaces

:brain: Architecture support

  • :white_check_mark: amd64 (Intel/AMD): full native support
  • :gear: aarch64 (Apple Silicon): works via emulation

:high_voltage: Quickstart

Pull the .devcontainer into any repo or folder:

curl -fsSL https://raw.githubusercontent.com/paritytech/smart-contracts-devcontainer/main/.devcontainer/fetch-devcontainer.sh | bash -s --

Then:

  • Open in VS Code → “Reopen in Container”
  • Or launch in GitHub Codespaces

:books: Resources

:speech_balloon: Feedback wanted: Tried it? Share your thoughts and ideas in this forum thread.

14 Likes

Hi @Utkarsh , does this work with Ink as well?

Hey @illegalcall, not in this version but we plan to continue building this out with porting smart contracts to Polkadot support, dapps support and ink! support coming up in future releases.

2 Likes

This looks like a solid step forward. Setting up Polkadot smart contract environments has usually been one of the slowest parts of the process, especially at hackathons. Having Hardhat and Foundry preconfigured in one container should really cut down the onboarding time.

1 Like

Agreed. To that end, I have raised a pull request to add the DevContainers to the hackathon survival guide.

1 Like