ignite / cli

Ignite is a CLI tool and hub designed for constructing Proof of Stake Blockchains rooted in Cosmos-SDK
https://ignite.com
Other
1.26k stars 547 forks source link

Failure to use genesis.json to update the genesis state of denom_metadata #3351

Closed TraderWithPython closed 1 year ago

TraderWithPython commented 1 year ago

Describe the bug I want to use config.yml to cover genesis.json, and initialize genesis state of denom_metadata in bank module.

To reproduce The code is in config.yml

genesis:
  app_state:
    bank:
      denom_metadata: 
        - description: The native staking token of the Cosmos Hub.
          denom_units: 
            - denom: uatom
              exponent: "0"
              aliases:
                - microatom
            - denom: matom
              exponent: 3
              aliases:
                - milliatom
            - denom: atom
              exponent: 6
          base: uatom
          display: atom

The info I used is from ADR 024: Coin Metadata. https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-024-coin-metadata.md

The feedback is that

Error: failed to validate genesis state: name field cannot be blank

When I comment the code above, it works. It confuses me very much, and waht should I do to make it work.

What version are you using?

The version of ignite i use is v0.25.2.

tbruyelle commented 1 year ago

Hey @TraderWithPython, the error message comes from the cosmos-sdk, more precisely here : https://github.com/cosmos/cosmos-sdk/blob/main/x/bank/types/metadata.go#L20

Can you retry with adding a name field near description ?

TraderWithPython commented 1 year ago

Hey @TraderWithPython, the error message comes from the cosmos-sdk, more precisely here : https://github.com/cosmos/cosmos-sdk/blob/main/x/bank/types/metadata.go#L20

Can you retry with adding a name field near description ?

Ur right. Thank u very much.