From 6dce8769258edcc320cf0397d4d203fd6c7d4159 Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Fri, 22 Jan 2021 20:04:08 -0800 Subject: [PATCH 1/3] Set the denom metadata for the cosmoshub in the stargate migration --- app/migrate.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/app/migrate.go b/app/migrate.go index 9b5f197ef58..98b836c104a 100644 --- a/app/migrate.go +++ b/app/migrate.go @@ -130,6 +130,24 @@ $ %s migrate /path/to/genesis.json --chain-id=cosmoshub-4 --genesis-time=2019-04 } + var bankGenesis bank.GenesisState + + clientCtx.JSONMarshaler.MustUnmarshalJSON(newGenState[bank.ModuleName], &bankGenesis) + + bankGenesis.DenomMetadata = []bank.Metadata{ + { + Description: "The native staking token of the Cosmos Hub.", + DenomUnits: []*bank.DenomUnit{ + {Denom: "uatom", Exponent: uint32(0), Aliases: []string{"microatom"}}, + {Denom: "matom", Exponent: uint32(3), Aliases: []string{"milliatom"}}, + {Denom: "atom", Exponent: uint32(6), Aliases: nil}, + }, + Base: "uatom", + Display: "atom", + }, + } + newGenState[bank.ModuleName] = clientCtx.JSONMarshaler.MustMarshalJSON(&bankGenesis) + var stakingGenesis staking.GenesisState clientCtx.JSONMarshaler.MustUnmarshalJSON(newGenState[staking.ModuleName], &stakingGenesis) From 5f7cf945b50151c51dad4bf044054e5e34b6ef1f Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Sun, 24 Jan 2021 11:38:18 -0300 Subject: [PATCH 2/3] Update app/migrate.go --- app/migrate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/migrate.go b/app/migrate.go index 98b836c104a..00dd0fa50c6 100644 --- a/app/migrate.go +++ b/app/migrate.go @@ -140,7 +140,7 @@ $ %s migrate /path/to/genesis.json --chain-id=cosmoshub-4 --genesis-time=2019-04 DenomUnits: []*bank.DenomUnit{ {Denom: "uatom", Exponent: uint32(0), Aliases: []string{"microatom"}}, {Denom: "matom", Exponent: uint32(3), Aliases: []string{"milliatom"}}, - {Denom: "atom", Exponent: uint32(6), Aliases: nil}, + {Denom: "atom", Exponent: uint32(6), Aliases: []string{}}, }, Base: "uatom", Display: "atom", From 55c5f14e236e3a6deb0cf007e2d6215f08418e91 Mon Sep 17 00:00:00 2001 From: Federico Kunze Date: Sun, 24 Jan 2021 11:40:58 -0300 Subject: [PATCH 3/3] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index acf8d317f3b..4544f9f6856 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +### Improvements + +* (app) [\#564](https://github.com/cosmos/gaia/pull/564) Add client denomination metadata for atoms. + ### Bug Fixes * (cmd) [\#563](https://github.com/cosmos/gaia/pull/563) Add balance coin to supply when adding a new genesis account