A fresh FRAME-based Substrate node, ready for hacking 🚀
First, complete the basic Rust setup instructions.
Use Rust's native cargo
command to build and launch the template node:
cargo run --release
The cargo run
command will perform an initial build. Use the following command to build the node
without launching it:
cargo build --release
The below command will execute all the test cases defined in /pallets/pallet_club?src/test.rs file
cargo test -p pallet_club
The provided cargo run
command will launch a temporary node and its state will be discarded after
you terminate the process. After the project has been built, there are other ways to launch the
node.
Development chain means that the state of our chain will be in a tmp folder while the nodes are running. Also, alice account will be authority and sudo account as declared in the genesis state. At the same time the following accounts will be pre-funded:
- Alice (Sudo or Root Origin by default)
- Bob
- Alice//stash
- Bob//stash
This command will start the single-node development chain with non-persistent state:
./target/release/node-template --dev
Above code will run the blockchain node in local machine port : 9944
ws://127.0.0.1:9944
Once the node template is running locally, you can connect it with Polkadot-JS Apps front-end to interact with your chain. Click here connecting the Apps to your local node template.
https://www.youtube.com/watch?v=nyW_nlNI_ZQ