From 68336ed67d2eb8e5a9a1cecaa5aa71707f8239ad Mon Sep 17 00:00:00 2001 From: Lucas Bertrand Date: Fri, 19 Jul 2024 17:07:19 +0200 Subject: [PATCH] refactor(fungible): remove chain name from zrc20 name on gas deployment (#2516) --- x/fungible/keeper/gas_coin_and_pool.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/x/fungible/keeper/gas_coin_and_pool.go b/x/fungible/keeper/gas_coin_and_pool.go index 58fbcff1d0..6d4d71bf92 100644 --- a/x/fungible/keeper/gas_coin_and_pool.go +++ b/x/fungible/keeper/gas_coin_and_pool.go @@ -1,7 +1,6 @@ package keeper import ( - "fmt" "math/big" cosmoserrors "cosmossdk.io/errors" @@ -35,7 +34,6 @@ func (k Keeper) SetupChainGasCoinAndPool( if !found { return ethcommon.Address{}, zetaObserverTypes.ErrSupportedChains } - name := fmt.Sprintf("%s-%s", gasAssetName, chain.ChainName) transferGasLimit := gasLimit @@ -55,7 +53,7 @@ func (k Keeper) SetupChainGasCoinAndPool( zrc20Addr, err := k.DeployZRC20Contract( ctx, - name, + gasAssetName, symbol, decimals, chain.ChainId, @@ -68,7 +66,7 @@ func (k Keeper) SetupChainGasCoinAndPool( } ctx.EventManager().EmitEvent( sdk.NewEvent(sdk.EventTypeMessage, - sdk.NewAttribute(name, zrc20Addr.String()), + sdk.NewAttribute(gasAssetName, zrc20Addr.String()), ), ) err = k.SetGasCoin(ctx, big.NewInt(chain.ChainId), zrc20Addr)