From 673ee0461c02d63328db719e8844e883f1a5191c Mon Sep 17 00:00:00 2001 From: Dan Kanefsky Date: Mon, 21 Aug 2023 12:59:52 -0700 Subject: [PATCH] update denom metadata --- app/upgrades/neon/upgrade.go | 45 ++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/app/upgrades/neon/upgrade.go b/app/upgrades/neon/upgrade.go index 3c7915f3..70951df4 100644 --- a/app/upgrades/neon/upgrade.go +++ b/app/upgrades/neon/upgrade.go @@ -61,21 +61,48 @@ func initialFiatTokenFactoryState() fiattokenfactorytypes.GenesisState { } var ( - denomMetadataUsdc = banktypes.Metadata{ - - Description: "USD Coin", - Name: "usdc", - Base: "uusdc", + // denomMetadataUsdc = banktypes.Metadata{ + + // Description: "USD Coin", + // Name: "usdc", + // Base: "uusdc", + // DenomUnits: []*banktypes.DenomUnit{ + // { + // Denom: "uusdc", + // Aliases: []string{ + // "microusdc", + // }, + // Exponent: 0, + // }, + // { + // Denom: "usdc", + // Exponent: 6, + // }, + // }, + // } + + denomMetadataDrachma = banktypes.Metadata{ + Display: "drachma", + Base: "udrachma", + Name: "drachma", + Symbol: "DRACHMA", DenomUnits: []*banktypes.DenomUnit{ { - Denom: "uusdc", + Denom: "udrachma", Aliases: []string{ - "microusdc", + "microdrachma", }, Exponent: 0, }, { - Denom: "usdc", + Denom: "mdrachma", + Aliases: []string{ + "millidrachma", + }, + Exponent: 3, + }, + { + Denom: "drachma", Exponent: 6, }, }, @@ -95,7 +122,7 @@ func CreateNeonUpgradeHandler( // NOTE: denomMetadata must be set before setting the minting denom logger.Debug("adding usdc to bank denom metadata") - bankKeeper.SetDenomMetaData(ctx, denomMetadataUsdc) + bankKeeper.SetDenomMetaData(ctx, denomMetadataDrachma) logger.Debug("setting fiat-tokenfactory params") fiatTokenFactoryParams := initialFiatTokenFactoryState()