First, complete the basic Rust setup instructions.
Use Rust's native cargo
command to build and launch the template node:
cargo run --release -- --dev
The cargo run
command will perform an initial build. Use the following command to build the node
without launching it:
cargo build --release
This command will start Alice's account:
./target/release/node-template --base-path /tmp/alice --chain local --alice --port 30333 --ws-port 9945 --rpc-port 9933 --node-key 0000000000000000000000000000000000000000000000000000000000000001 --telemetry-url "wss://telemetry.polkadot.io/submit/ 0" --validator
You need then to start Bob's account to run DID Extrinsics:
./target/release/node-template --baseath /tmp/bob --chain local --bob --port 30334 --ws-port 9946 --rpc-port 9934 --telemetry-url "wss://telemetry.polkadot.io/submit/ 0" --validator --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp
Purge the old chain's data from Alice's account:
./target/release/node-template purge-chain --base-path /tmp/alice --chain local -y
Purge the old chain's data from Bob's account:
./target/release/node-template purge-chain --base-path /tmp/bob --chain local -y
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.
The runtime in this project is constructed using many FRAME pallets that ship with the
core Substrate repository and a
template pallet that is defined in the pallets
directory.
In this repository, the following pallet-did is used. To test it, connect to the Polkadot-JS and go to the Extrinsics: