2

I am using susbstrate node-template, I am trying to create my own native token d-coin with xxxxx amount of total supply, I am using auro consensus, I was able to add some properties to genesis state, below is code, which is working fine, but I am looking set total supply and transaction fees.

pub fn properties() -> Properties {
    let mut properties = Properties::new();
    properties.insert("ss58Format".into(), x.into());
    properties.insert("tokenSymbol".into(), "D".into());
    properties.insert("tokenDecimals".into(), "xx".into());
    properties.insert("totalSupply".into(), "xxxxxxxxx".into());
    properties
}
0

2 Answers 2

2

Considering that you are using the pallet_balances your answer is given here. Have a look at the seminar: 6 ways to launch a token it provides information you are probably interested in.

As for transaction fees you should look into pallet_transaction_payment, see here how the default is implemented in the node-template. The seminar provides information about this as well.

2
  • balance inside GenesisConfig of chain_spec.rs what is this for? Shouldn't we considered as total_insuance?
    – go11li
    Commented Mar 17, 2023 at 12:48
  • Those are the balances that are set at genesis (e.g. ICO of a chain ). Yes you can view this as the total issuance at genesis. You can also query this if you are using pallet-balances. Commented Mar 20, 2023 at 13:59
1

As my understanding, you can't configure totalSupply Properties in Substrate.

Substrate has no limit on the total supply of the native token.

It would be helpful if someone could confirm whether I am correct or not.

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.