3.8 KiB
Polkadot SDK's Minimal Template
This is a minimal template for creating a blockchain based on Polkadot SDK.
This template is automatically updated after releases in the main Polkadot SDK monorepo.
🤏 This template is a minimal (in terms of complexity and the number of components) template for building a blockchain node.
🔧 Its runtime is configured of a single custom pallet as a starting point, and a handful of ready-made pallets such as a Balances pallet.
👤 The template has no consensus configured - it is best for experimenting with a single node network.
Template Structure
A Polkadot SDK based project such as this one consists of:
- 💿 a Node - the binary application.
- 🧮 the Runtime - the core logic of the blockchain.
- 🎨 the Pallets - from which the runtime is constructed.
Getting Started
🦀 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.
Build
🔨 Use the following command to build the node without launching it:
cargo build --release
🐳 Alternatively, build the docker image:
docker build . -t polkadot-sdk-minimal-template
Single-Node Development Chain
👤 The following command starts a single-node development chain:
./target/release/minimal-template-node --dev
# docker version:
docker run --rm polkadot-sdk-minimal-template --dev
Development chains:
- 🧹 Do not persist the state.
- 💰 Are preconfigured with a genesis state that includes several prefunded development accounts.
- 🧑⚖️ Development accounts are used as
sudoaccounts.
Connect with the Polkadot-JS Apps Front-End
🌐 You can interact with your local node using the hosted version of the Polkadot/Substrate Portal.
🪐 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.
Contributing
🔄 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.
Getting Help
🧑🏫 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.