How to build your first blockchain on Substrate?
To build a blockchain on Substrate, you will need to do the following:
Install Substrate: Follow the instructions at https://substrate.dev/docs/en/getting-started/install to install Substrate on your machine.
Create a new Substrate chain: Run the following command to create a new Substrate chain with the default settings:
substrate build-spec --chain local
Customize your chain: You can customize your chain by modifying the
lib.rs
andmain.rs
files that were generated when you created your chain. These files are located in thesrc
directory of your Substrate chain.Compile your chain: Run the following command to compile your Substrate chain:
cargo build
- Run your chain: Run the following command to start your Substrate chain:
cargo run -- --dev
That's it! You should now have a functioning blockchain built on Substrate. You can use the Substrate Developer Hub (https://substrate.dev/docs/en/overview/developer-hub) to learn more about how to customize and extend your chain.