A stable, known working version of the Substrate Node Template, Substrate Module Template, and Substrate Front End Template.
- The fastest way to get started building on Substrate.
- Compatible with the latest documentation available for Substrate runtime module development.
- Using Substrate commit:
d1cd01c74e8d5550396cb654f9a3f1b641efdf4c - Using Polkadot-JS API version:
^0.95.0-beta.21
-
Run
git clone https://github.com/substrate-developer-hub/substrate-package.git. -
Run
cd substrate-package. -
Run
curl https://getsubstrate.io -sSf | bash -s -- --fast- This installs external dependencies needed for substrate. Take a look at the script.
- The
--fastcommand allows us to skip thecargo installsteps forsubstrateandsubkey, which is not needed for runtime development. - Windows users need to follow instructions here instead
-
Go into the
substrate-node-templatefolder and run:./scripts/init.sh cargo build --release ./target/release/node-template --dev
The above process may take 30 minuites or so, depending on your hardware. This should start your node, and you should see blocks being created.
-
Go into the
substrate-front-end-templatefolder and run:yarn install yarn start
This should start a web server on
localhost:3000where you can interact with your node. -
Go into the
substrate-module-templatefolder:- Read
HOWTO.md - Edit
/src/lib.rsto create a custom Substrate runtime module - Add dependencies to
Cargo.tomlwith the appropriaterev
- Read
-
Interact with your node and hack away!
The substrate-module-template is a template where you can start building your own runtime module as it's own independent crate.
This is an alternative from writing your module in substrate-node-template/runtime/src/template.rs, where you would not be able to easily share your runtime module after your are done. We recommend development in the substrate-module-template if you want to allow others to include your runtime module into their Substrate node.
Instructions for using the substrate-module-template are included with the project.
We have added the Substrate module template as a dependency to the substrate-node-template, but if you want to remove it, you will need to:
- Remove references from the runtime
Cargo.tomlfile. - Remove references from the runtime
lib.rsfile.
This project simply clones the individual templates in a single place where they are tested to be compatible with one another.
git clone https://github.com/substrate-developer-hub/substrate-node-template
git clone https://github.com/substrate-developer-hub/substrate-module-template
git clone https://github.com/substrate-developer-hub/substrate-front-end-templateSubstrate is a rapidly evolving platform, which means that breaking changes may occur on a day to day basis. Most of the times, these breaking changes do not radically change how substrate works, but may affect how Substrate is organized, the name of functions, the name of modules, etc...
The substrate-package repository tries to help solve these problems by taking a snapshot of substrate when it is known to be working and compatible with these different resources:
- Documentation
- Tutorials
- Samples
- User Interfaces
- etc...