This tutorial is for developers willing to learn the basics of Substrate development and broaden their skillsets through real-world use cases.
You will need a solid grasp of the Rust programming language before you start to learn Substrate.
Some good entry points to learning Rust 📚
As officially referred to here, the best paths to get started with Rust are:
- The Rust Book (aka "The Book"): the official manual, which is very well written and approachable.
- The Rustlings git repository: a thorough series of exercises.
- The Rust by examples documentation.
And of course, you should always challenge yourself with a side project or two.
Substrate can be described as a blockchain framework — specifically, a framework for building customized blockchains. It is built on the Rust programming language, which makes use of novel design patterns to enable the development of code that is safe and fast.
To give some context, Polkadot is a layer-0 protocol and multichain network laying the foundation for the future of Web3. Substrate is the primary blockchain SDK used by developers to create the parachains that make up the Polkadot network.
- fork this repository
- clone it on your machine
- code until all tests pass
By default running
cargo test
will run tests for every exercise in the workspace. Which is not optimal while working on a specific exercise.
Instead use ourrun_one_exercise_tests.sh
script. It will run the tests for the exercise you pass as an argument only.
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.
We designed the exercises to teach you:
- how to use the numerous features of Substrate
- some good Substrate practices
- some blockchain core principles
If you are stuck, you can always check the solution branch. It's not cheating, just learning 🧑🎓
We are in contact with multiple projects in the Substrate ecosystem that are looking for developers, either full-time or for some periodic missions. If you would like to be contacted with some offers, please fill this form: https://forms.gle/mUoLGsDUSpy4yB3F9
This repository was first created by the Rusty Crewmates team to train our developers. We are a software development and consulting company, focussing on both Rust and blockchain.
We developed for top projects in the Substrate ecosystem such as Edgeware, Kabocha, Ternoa, Polkaswap, and SubQuery, both on a long-term and per project basis.
We propose a large range of services, smart-contract development and audit for Substrate, Near, and Solana, but also regular back-end development for Rust or blockchain-oriented projects.
If you think we can help you, please reach out at [email protected]