Run cargo +nightly build --release
Then run ./target/release/node-template --dev
- Navigate to https://polkadot.js.org/apps/#/explorer
- Click the lef top icon to open settings and choose the local node, just like below
- Click the developer tab, choose Extrinsics, and then use Alice to start a new round
- You can then run register_project or donate
- After that, you can use any account with balance to vote and watch the changes
- At last, following step 3, use Alice account with sudo to end the round, the projects will be reckoned with sponsored share
As you may find that the result of chain state is a long hex string, which is not human readable. This is because substrate used SCALE to encode the json. The decode procedure is quite simple.
- Open the online decoder link, focus on the "custom types" input
- Navigate to the exmaple file, you can see that we have defined the type definition of types which our storage will use, copy the corresponding types and paste it to the input you focused in previous step. Let's use project as a demonstration
- Go backto polkadot js and use chain state to query the storage, paste the hex string to the raw bytes input, then you'll see the decoded result.
- The name field is hex encoded string, if you want to check that too, you can use this tool to decode it.