From 77be9beb6294a36eeb768e3d76a5716db4c1594c Mon Sep 17 00:00:00 2001 From: jiujiteiro Date: Fri, 15 Jul 2022 15:11:20 -0400 Subject: [PATCH] set base denom to ario --- x/staking/keeper/msg_server_test.go | 8 ++++---- x/staking/keeper/params_test.go | 16 ++++++++-------- x/staking/keeper/pool.go | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/x/staking/keeper/msg_server_test.go b/x/staking/keeper/msg_server_test.go index e03a9e7daea6..44bb35a9039a 100644 --- a/x/staking/keeper/msg_server_test.go +++ b/x/staking/keeper/msg_server_test.go @@ -16,9 +16,9 @@ var ( pk2 = ed25519.GenPrivKey().PubKey() addr2 = sdk.AccAddress(pk2.Address()) valAddr2 = sdk.ValAddress(pk2.Address()) - coinRio = sdk.NewInt64Coin("urio", 1000) - coinDefault = sdk.NewInt64Coin(sdk.DefaultBondDenom, 1000) - coinRst = sdk.NewInt64Coin("urst", 1000) + coinRio = sdk.NewInt64Coin("ario", 1000) + coinDefault = sdk.NewInt64Coin(sdk.DefaultBondDenom, 1000) + coinRst = sdk.NewInt64Coin("arst", 1000) commission1 = types.NewCommissionRates(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()) ) @@ -57,7 +57,7 @@ func (suite *KeeperTestSuite) TestMsgServerCreateValidatorMultipleDenoms() { suite.SetupTest() params := suite.app.StakingKeeper.GetParams(suite.ctx) - params.BondDenom = "urio,urst" + params.BondDenom = "ario,arst" suite.app.StakingKeeper.SetParams(suite.ctx, params) // test rst, supported denom diff --git a/x/staking/keeper/params_test.go b/x/staking/keeper/params_test.go index 601f252c90e1..dbad6b6cd626 100644 --- a/x/staking/keeper/params_test.go +++ b/x/staking/keeper/params_test.go @@ -22,12 +22,12 @@ func (suite *KeeperTestSuite) TestSetParamsSetMultiTokenBondDenom() { expParams := types.DefaultParams() suite.Require().Equal(expParams.BondDenom, sdk.DefaultBondDenom) - expParams.BondDenom = "urio,urst" + expParams.BondDenom = "ario,arst" suite.app.StakingKeeper.SetParams(suite.ctx, expParams) //validate save resParams := suite.app.StakingKeeper.GetParams(suite.ctx) - suite.Require().Equal(resParams.BondDenom, "urio,urst") + suite.Require().Equal(resParams.BondDenom, "ario,arst") } func (suite *KeeperTestSuite) TestIsBondDenomSupported() { @@ -35,13 +35,13 @@ func (suite *KeeperTestSuite) TestIsBondDenomSupported() { //validate for default sdk bond denom expParams := types.DefaultParams() - expParams.BondDenom = "urio,urst" + expParams.BondDenom = "ario,arst" suite.app.StakingKeeper.SetParams(suite.ctx, expParams) - res := suite.app.StakingKeeper.IsBondDenomSupported(suite.ctx, "urio") + res := suite.app.StakingKeeper.IsBondDenomSupported(suite.ctx, "ario") suite.Require().True(res) - suite.Require().True(suite.app.StakingKeeper.IsBondDenomSupported(suite.ctx, "urio")) - suite.Require().True(suite.app.StakingKeeper.IsBondDenomSupported(suite.ctx, "urst")) + suite.Require().True(suite.app.StakingKeeper.IsBondDenomSupported(suite.ctx, "ario")) + suite.Require().True(suite.app.StakingKeeper.IsBondDenomSupported(suite.ctx, "arst")) suite.Require().False(suite.app.StakingKeeper.IsBondDenomSupported(suite.ctx, "stake")) } @@ -53,9 +53,9 @@ func (suite *KeeperTestSuite) TestBondDenomSlice() { var expected = []string{"stake"} suite.Require().Equal(suite.app.StakingKeeper.BondDenomSlice(suite.ctx), expected) - expParams.BondDenom = "urio,urst" + expParams.BondDenom = "ario,arst" suite.app.StakingKeeper.SetParams(suite.ctx, expParams) - expected = []string{"urio", "urst"} + expected = []string{"ario", "arst"} suite.Require().Equal(suite.app.StakingKeeper.BondDenomSlice(suite.ctx), expected) } diff --git a/x/staking/keeper/pool.go b/x/staking/keeper/pool.go index 351da2e53209..244c1fe52b34 100644 --- a/x/staking/keeper/pool.go +++ b/x/staking/keeper/pool.go @@ -67,7 +67,7 @@ func (k Keeper) TotalBondedTokens(ctx sdk.Context) sdk.Int { // StakingTokenSupply staking tokens from the total supply func (k Keeper) StakingTokenSupply(ctx sdk.Context) sdk.Int { - return k.bankKeeper.GetSupply(ctx, "urio").Amount + return k.bankKeeper.GetSupply(ctx, "ario").Amount } // BondedRatio the fraction of the staking tokens which are currently bonded