Skip to main content

Substrate tutorials

Substate tutorials is a collection of exercises that will theach you the basics of Substrate development and broaden your skillsets through real-world use cases.

Getting started

Go to the tutorial repository, fork it, clone it and start with the first exercise.
Run the crate tests, you will see they fail. Give a look to the and code until all tests pass :)

If you want to run your pallet in a real runtime, you can easily edit the substrate-node-template and add your pallet to its runtime. It will allow you to interact with your code through tools like polkadot.js.

Table of content

0testinglearn how to write simple tests for an existing pallet
1pallet easywrite a really simple erc20-like pallet
2runtimeadd your pallet to a substrate runtime and launch a node
3pallet intermediatewriting pallet is the bread and butter of substrate development, let's double down on those basics
4couplingpallets can interact with each other, in different complex ways
5hookssubstrate allow you to write hooks that will multiply the possibilities of your chain
6weightsin order to be incentive the block consensus authorities fees are collected on users transactions
7imbalancesthe supply of your chain token can vary, but there are some rules to respect when playing with it
8genesis configyou can give your chain an initial state before launching it
9mocklearn how to mock your runtime in order to write handy and powerfull tests
10offchain workeranother hook that allow nodes to do complex async computation in parallel of the chain execution


This work is open-source, financed by a Web3 Foundation grant, so it really belongs to the community. Feel free to contribute to the repository with anything you think could help others.

grillchat icon