This is a template for creating a parachain based on Polkadot SDK.
This template is automatically updated after releases in the main Polkadot SDK monorepo.
-
⏫ This template provides a starting point to build a parachain.
-
☁️ It is based on the Cumulus framework.
-
🔧 Its runtime is configured with a single custom pallet as a starting point, and a handful of ready-made pallets such as a Balances pallet.
-
👉 Learn more about parachains here
A Polkadot SDK based project such as this one consists of:
- 💿 a Node - the binary application.
- 🧮 the Runtime - the core logic of the parachain.
- 🎨 the Pallets - from which the runtime is constructed.
-
🦀 The template is using the Rust language.
-
👉 Check the Rust installation instructions for your system.
-
🛠️ Depending on your operating system and Rust version, there might be additional packages required to compile this template - please take note of the Rust compiler output.
🔨 Use the following command to build the node without launching it:
cargo build --package parachain-template-node --release
🐳 Alternatively, build the docker image:
docker build . -t polkadot-sdk-parachain-template
🧟 This project uses Zombienet to orchestrate the relaychain and parachain nodes. You can grab a released binary or use an npm version.
This template produces a parachain node.
You still need a relaychain node - you can download the polkadot
(and the accompanying polkadot-prepare-worker
and polkadot-execute-worker
)
binaries from Polkadot SDK releases.
Make sure to bring the parachain node - as well as polkadot
, polkadot-prepare-worker
, polkadot-execute-worker
,
and zombienet
- into PATH
like so:
export PATH="./target/release/:$PATH"
This way, we can conveniently use them in the following steps.
👥 The following command starts a local development chain, with a single relay chain node and a single parachain collator:
zombienet --provider native spawn ./zombienet.toml
# Alternatively, the npm version:
npx --yes @zombienet/cli --provider native spawn ./zombienet.toml
Development chains:
- 🧹 Do not persist the state.
- 💰 Are preconfigured with a genesis state that includes several prefunded development accounts.
- 🧑⚖️ Development accounts are used as validators, collators, and
sudo
accounts.
-
🌐 You can interact with your local node using the hosted version of the Polkadot/Substrate Portal: relay chain and parachain.
-
🪐 A hosted version is also available on IPFS.
-
🧑🔧 You can also find the source code and instructions for hosting your own instance in the
polkadot-js/apps
repository.
-
🔄 This template is automatically updated after releases in the main Polkadot SDK monorepo.
-
➡️ Any pull requests should be directed to this source.
-
😇 Please refer to the monorepo's contribution guidelines and Code of Conduct.
-
🧑🏫 To learn about Polkadot in general, Polkadot.network website is a good starting point.
-
🧑🔧 For technical introduction, here are the Polkadot SDK documentation resources.
-
👥 Additionally, there are GitHub issues and Substrate StackExchange.