0

following this tutorial, I created CustomSpec.json file and this contains balances like this:

enter image description here

When I change the default set balance into like this, it doesn't change in polkadotjs frontend.

enter image description here

Someone please advice me why balance is not changing? This is code link

6
  • it should change, try this again make customSpecRaw.json with the desired balance and the chain, then start it again with the new customSpecRaw.json May 22, 2023 at 3:55
  • Firstly, I don't see about block production and block finalization in your terminal. Secondly, Do you restart your local node again after modifying your chain spec json?
    – CocDap
    May 22, 2023 at 3:57
  • I generated CustomSpecRaw.json using this command ./target/release/node-template build-spec --chain=customSpec.json --raw --disable-default-bootnode > customSpecRaw.json @ShubhamGupta but still the same balance doesn't change
    – Ganesh11
    May 22, 2023 at 4:13
  • Did you purge the chain before restarting it? May 22, 2023 at 4:40
  • yes @ShubhamGupta
    – Ganesh11
    May 22, 2023 at 5:24

1 Answer 1

1

I have made the change you wanted. I did the following:

  1. Cloned the repo:
git clone https://github.com/XcavateBlockchain/default-substrate-node-template.git
  1. Compiled
cargo build –release 
  1. Followed the tutorial for change the specs:
./target/release/node-template build-spec --disable-default-bootnode --chain local > customSpec.json 

Convert it to raw without change

./target/release/node-template build-spec --chain=customSpec.json --raw --disable-default-bootnode > customSpecRaw.json 
  1. Run it:
./target/release/node-template \ 
  --base-path /tmp/node01 \ 
  --chain ./customSpecRaw.json \ 
  --port 30333 \ 
  --ws-port 9945 \ 
  --rpc-port 9933 \ 
  --telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \ 
  --validator \ 
  --rpc-methods Unsafe \ 
  --name MyNode01

Take capture:

enter image description here

Stop it

  1. modify the specs

enter image description here

Convert it to raw after change

./target/release/node-template build-spec --chain=customSpec.json --raw --disable-default-bootnode > customSpecRaw.json
  1. Removed /tmp/node01 folder
rm -rf /tmp/node01  
  1. run it again:
./target/release/node-template \  --base-path /tmp/node01 \ 
  --chain ./customSpecRaw.json \ 
  --port 30333 \ 
  --ws-port 9945 \ 
  --rpc-port 9933 \ 
  --telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \ 
  --validator \ 
  --rpc-methods Unsafe \ 
  --name MyNode01 

Take capture:

enter image description here

5
  • thank you @Xavier, is this the way to set total_supply for the chain?
    – Ganesh11
    May 22, 2023 at 7:43
  • @Ganesh11 no, I think your answer is in this other question substrate.stackexchange.com/questions/3717/…
    – Xavier
    May 22, 2023 at 8:24
  • I am confused @Xavier, Whats that total balance is then?
    – Ganesh11
    May 22, 2023 at 10:35
  • @Ganesh11 since you are not giving context, i guess you are refering to the total amount an account have of an specific token.
    – Xavier
    May 22, 2023 at 11:03
  • yes exactly @Xavier
    – Ganesh11
    May 22, 2023 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.