/Substrate_Task

Create a custom Substrate pallet that allows only the `Root` origin account to control the list of club members to a set of accounts for at least two different clubs, where * Only the `Root` origin account can add an account as a member of a club in on-chain storage * Only the `Root` origin account can remove an account from being a member of a club in on-chain storage

Primary LanguageRustThe UnlicenseUnlicense

Substrate Node Template

Try on playground Matrix

A fresh FRAME-based Substrate node, ready for hacking 🚀

Rust Setup

First, complete the basic Rust setup instructions.

Run

Use Rust's native cargo command to build and launch the template node:

cargo run --release

Build

The cargo run command will perform an initial build. Use the following command to build the node without launching it:

cargo build --release

Test

The below command will execute all the test cases defined in /pallets/pallet_club?src/test.rs file

cargo test -p pallet_club

Run

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.

Single-Node Development Chain

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

Connect with Polkadot-JS Apps Front-end

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.

Youtube video of overall flow

https://www.youtube.com/watch?v=nyW_nlNI_ZQ