Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
TraderWithPython opened this issue Jan 1, 2023 · 2 comments
Labels
type:error Something isn't working

Comments

@TraderWithPython
Copy link

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.

@TraderWithPython TraderWithPython added the type:error Something isn't working label Jan 1, 2023
@tbruyelle
Copy link
Contributor

tbruyelle commented Jan 1, 2023

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
Copy link
Author

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.

tbruyelle added a commit to tbruyelle/cosmos-sdk that referenced this issue Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:error Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants