diff --git a/app/app.go b/app/app.go index a60ad07a..c1bcc934 100644 --- a/app/app.go +++ b/app/app.go @@ -157,7 +157,7 @@ import ( "github.com/rakyll/statik/fs" v3_0_2 "github.com/White-Whale-Defi-Platform/migaloo-chain/v4/app/upgrades/v3_0_2" - v4 "github.com/White-Whale-Defi-Platform/migaloo-chain/v4/app/upgrades/v4_1_1" + v4 "github.com/White-Whale-Defi-Platform/migaloo-chain/v4/app/upgrades/v4_1_2" // unnamed import of statik for swagger UI support _ "github.com/White-Whale-Defi-Platform/migaloo-chain/v4/client/docs/statik" @@ -1150,8 +1150,6 @@ func (app *MigalooApp) setupUpgradeHandlers() { app.ConsensusParamsKeeper, app.ICAControllerKeeper, app.AccountKeeper, - *app.StakingKeeper, - app.BankKeeper, ), ) diff --git a/app/upgrades/v4_1_1/constants.go b/app/upgrades/v4_1_1/constants.go deleted file mode 100644 index b3b72b4a..00000000 --- a/app/upgrades/v4_1_1/constants.go +++ /dev/null @@ -1,9 +0,0 @@ -package v4 - -// UpgradeName defines the on-chain upgrade name for the Migaloo v4.1.0 upgrade. -// this upgrade includes the fix for pfm -const ( - UpgradeName = "v4.1.1" - NotionalMultisigVestingAccount = "migaloo1alga5e8vr6ccr9yrg0kgxevpt5xgmgrvqgujs6" - NewNotionalMultisigAccount = "migaloo1tx6f2hetpd9uhveja26kr074496hzk2zzqhsh0" -) diff --git a/app/upgrades/v4_1_1/mainnet_account.go b/app/upgrades/v4_1_1/mainnet_account.go deleted file mode 100644 index ea258d76..00000000 --- a/app/upgrades/v4_1_1/mainnet_account.go +++ /dev/null @@ -1,48 +0,0 @@ -package v4 - -import ( - "encoding/json" - - authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - bankKeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - - "cosmossdk.io/math" - - sdk "github.com/cosmos/cosmos-sdk/types" - vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" -) - -const ( - TestDenom = "test" - TestAmount = 1000000 -) - -func CreateMainnetVestingAccount(ctx sdk.Context, - bankKeeper bankKeeper.Keeper, - accountKeeper authkeeper.AccountKeeper, -) (vestingtypes.ContinuousVestingAccount, math.Int) { - str := `{"@type":"/cosmos.vesting.v1beta1.ContinuousVestingAccount","base_vesting_account":{"base_account":{"address":"migaloo1alga5e8vr6ccr9yrg0kgxevpt5xgmgrvqgujs6","pub_key":{"@type":"/cosmos.crypto.multisig.LegacyAminoPubKey","threshold":4,"public_keys":[{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AlnzK22KrkylnvTCvZZc8eZnydtQuzCWLjJJSMFUvVHf"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Aiw2Ftg+fnoHDU7M3b0VMRsI0qurXlerW0ahtfzSDZA4"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AvEHv+MVYRVau8FbBcJyG0ql85Tbbn7yhSA0VGmAY4ku"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Az5VHWqi3zMJu1rLGcu2EgNXLLN+al4Dy/lj6UZTzTCl"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Ai4GlSH3uG+joMnAFbQC3jQeHl9FPvVTlRmwIFt7d7TI"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A2kAzH2bZr530jmFq/bRFrT2q8SRqdnfIebba+YIBqI1"}]},"account_number":46,"sequence":27},"original_vesting":[{"denom":"uwhale","amount":"22165200000000"}],"delegated_free":[{"denom":"uwhale","amount":"443382497453"}],"delegated_vesting":[{"denom":"uwhale","amount":"22129422502547"}],"end_time":1770994800},"start_time":1676300400}` - - var acc vestingtypes.ContinuousVestingAccount - if err := json.Unmarshal([]byte(str), &acc); err != nil { - panic(err) - } - - vesting := GetVestingCoin(ctx, &acc) - - err := banktestutil.FundAccount(bankKeeper, ctx, acc.BaseAccount.GetAddress(), - acc.GetOriginalVesting()) - if err != nil { - panic(err) - } - - err = banktestutil.FundAccount(bankKeeper, ctx, acc.BaseAccount.GetAddress(), - sdk.NewCoins(sdk.NewCoin(TestDenom, sdk.NewInt(TestAmount)))) - if err != nil { - panic(err) - } - - accountKeeper.SetAccount(ctx, &acc) - return acc, vesting -} diff --git a/app/upgrades/v4_1_1/upgrades.go b/app/upgrades/v4_1_1/upgrades.go deleted file mode 100644 index 195c3f0b..00000000 --- a/app/upgrades/v4_1_1/upgrades.go +++ /dev/null @@ -1,204 +0,0 @@ -package v4 - -import ( - "fmt" - "time" - - vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - - "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/baseapp" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - bankKeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" - paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - stakingKeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - icacontrollerkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/keeper" - icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" - clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper" - ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" -) - -// CreateUpgradeHandler small security fix, can be a no-op, running mm.RunMigarions just to be sure -func CreateUpgradeHandler( - mm *module.Manager, - configurator module.Configurator, - clientKeeper clientkeeper.Keeper, - paramsKeeper paramskeeper.Keeper, - consensusParamsKeeper consensuskeeper.Keeper, - icacontrollerKeeper icacontrollerkeeper.Keeper, - accountKeeper authkeeper.AccountKeeper, - stakingKeeper stakingKeeper.Keeper, - bankKeeper bankKeeper.Keeper, -) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - // READ: https://github.com/cosmos/cosmos-sdk/blob/v0.47.4/UPGRADING.md#xconsensus - baseAppLegacySS := paramsKeeper.Subspace(baseapp.Paramspace). - WithKeyTable(paramstypes.ConsensusParamsKeyTable()) - baseapp.MigrateParams(ctx, baseAppLegacySS, &consensusParamsKeeper) - - // READ: https://github.com/cosmos/ibc-go/blob/v7.2.0/docs/migrations/v7-to-v7_1.md#chains - params := clientKeeper.GetParams(ctx) - params.AllowedClients = append(params.AllowedClients, ibcexported.Localhost) - clientKeeper.SetParams(ctx, params) - - // READ: https://github.com/terra-money/core/issues/166 - icacontrollerKeeper.SetParams(ctx, icacontrollertypes.DefaultParams()) - - // Burning module permissions - moduleAccI := accountKeeper.GetModuleAccount(ctx, authtypes.FeeCollectorName) - moduleAcc := moduleAccI.(*authtypes.ModuleAccount) - moduleAcc.Permissions = []string{authtypes.Burner} - accountKeeper.SetModuleAccount(ctx, moduleAcc) - - migrateMultisigVesting(ctx, stakingKeeper, bankKeeper, accountKeeper) - return mm.RunMigrations(ctx, configurator, fromVM) - } -} - -// migrateMultisigVesting moves the unvested from the ContinuousVestingAccount -> the new ContinuousVestingAccount -// - Retrieves the old multisig vesting account -// - Instantly finish all redelegations, then unbond all tokens. -// - Transfer unvested token to the new multisign ContinuousVestingAccount -func migrateMultisigVesting(ctx sdk.Context, - stakingKeeper stakingKeeper.Keeper, - bankKeeper bankKeeper.Keeper, - accountKeeper authkeeper.AccountKeeper, -) { - currentAddr := sdk.MustAccAddressFromBech32(NotionalMultisigVestingAccount) - newAddr := sdk.MustAccAddressFromBech32(NewNotionalMultisigAccount) - - currentAcc := accountKeeper.GetAccount(ctx, currentAddr) - - currentVestingAcc, ok := currentAcc.(*vestingtypes.ContinuousVestingAccount) - if !ok { - // skip if account invalid - fmt.Printf("err currentAcc.(*vestingtypes.ContinuousVestingAccount): %+v\n", currentAcc) - return - } - // process migrate - processMigrateMultisig(ctx, stakingKeeper, bankKeeper, accountKeeper, currentAddr, newAddr, currentVestingAcc) -} - -func processMigrateMultisig(ctx sdk.Context, stakingKeeper stakingKeeper.Keeper, - bankKeeper bankKeeper.Keeper, - accountKeeper authkeeper.AccountKeeper, - currentAddr, newAddr sdk.AccAddress, - oldAcc *vestingtypes.ContinuousVestingAccount, -) { - redelegated, err := completeAllRedelegations(ctx, ctx.BlockTime(), stakingKeeper, currentAddr) - if err != nil { - panic(err) - } - - unbonded, err := unbondAllAndFinish(ctx, ctx.BlockTime(), stakingKeeper, currentAddr) - if err != nil { - panic(err) - } - - fmt.Printf("currentAddr Instant Redelegations: %s\n", redelegated) - fmt.Printf("currentAddr Instant Unbonding: %s\n", unbonded) - - // get vesting balance - vestingCoin := oldAcc.GetVestingCoins(ctx.BlockTime()) - fmt.Printf("Total vesting balance %v\n", vestingCoin) - if vestingCoin.Empty() { - panic(err) - } - - // setup NewContinuousVestingAccount - newAccount := authtypes.NewBaseAccountWithAddress(newAddr) - newVestingAcc := vestingtypes.NewContinuousVestingAccount(newAccount, vestingCoin, - ctx.BlockTime().Unix(), oldAcc.EndTime) - accountKeeper.SetAccount(ctx, newVestingAcc) - - // end current ContinuousVestingAccount - oldAcc.OriginalVesting = oldAcc.OriginalVesting.Sub(vestingCoin[0]) - oldAcc.DelegatedFree = sdk.NewCoins() - oldAcc.DelegatedVesting = sdk.NewCoins() - oldAcc.EndTime = ctx.BlockTime().Unix() - accountKeeper.SetAccount(ctx, oldAcc) - - // move vesting coin to new ContinuousVestingAccount - err = bankKeeper.SendCoins(ctx, currentAddr, newAddr, vestingCoin) - if err != nil { - panic(err) - } -} - -func GetVestingCoin(ctx sdk.Context, acc *vestingtypes.ContinuousVestingAccount) (unvested math.Int) { - vestingCoin := acc.GetVestingCoins(ctx.BlockTime()) - return vestingCoin[0].Amount -} - -func completeAllRedelegations(ctx sdk.Context, now time.Time, - stakingKeeper stakingKeeper.Keeper, - accAddr sdk.AccAddress, -) (math.Int, error) { - redelegatedAmt := math.ZeroInt() - - for _, activeRedelegation := range stakingKeeper.GetRedelegations(ctx, accAddr, 65535) { - redelegationSrc, _ := sdk.ValAddressFromBech32(activeRedelegation.ValidatorSrcAddress) - redelegationDst, _ := sdk.ValAddressFromBech32(activeRedelegation.ValidatorDstAddress) - - // set all entry completionTime to now so we can complete re-delegation - for i := range activeRedelegation.Entries { - activeRedelegation.Entries[i].CompletionTime = now - redelegatedAmt = redelegatedAmt.Add(math.Int(activeRedelegation.Entries[i].SharesDst)) - } - - stakingKeeper.SetRedelegation(ctx, activeRedelegation) - _, err := stakingKeeper.CompleteRedelegation(ctx, accAddr, redelegationSrc, redelegationDst) - if err != nil { - return redelegatedAmt, err - } - } - - return redelegatedAmt, nil -} - -func unbondAllAndFinish(ctx sdk.Context, now time.Time, - stakingKeeper stakingKeeper.Keeper, - accAddr sdk.AccAddress, -) (math.Int, error) { - unbondedAmt := math.ZeroInt() - - // Unbond all delegations from the account - for _, delegation := range stakingKeeper.GetAllDelegatorDelegations(ctx, accAddr) { - validatorValAddr := delegation.GetValidatorAddr() - _, found := stakingKeeper.GetValidator(ctx, validatorValAddr) - if !found { - continue - } - - _, err := stakingKeeper.Undelegate(ctx, accAddr, validatorValAddr, delegation.GetShares()) - if err != nil { - return math.ZeroInt(), err - } - } - - // Take all unbonding and complete them. - for _, unbondingDelegation := range stakingKeeper.GetAllUnbondingDelegations(ctx, accAddr) { - validatorStringAddr := unbondingDelegation.ValidatorAddress - validatorValAddr, _ := sdk.ValAddressFromBech32(validatorStringAddr) - - // Complete unbonding delegation - for i := range unbondingDelegation.Entries { - unbondingDelegation.Entries[i].CompletionTime = now - unbondedAmt = unbondedAmt.Add(unbondingDelegation.Entries[i].Balance) - } - - stakingKeeper.SetUnbondingDelegation(ctx, unbondingDelegation) - _, err := stakingKeeper.CompleteUnbonding(ctx, accAddr, validatorValAddr) - if err != nil { - return math.ZeroInt(), err - } - } - - return unbondedAmt, nil -} diff --git a/app/upgrades/v4_1_1/upgrades_test.go b/app/upgrades/v4_1_1/upgrades_test.go deleted file mode 100644 index 5179a324..00000000 --- a/app/upgrades/v4_1_1/upgrades_test.go +++ /dev/null @@ -1,102 +0,0 @@ -package v4_test - -import ( - "fmt" - "testing" - - "github.com/White-Whale-Defi-Platform/migaloo-chain/v4/app/params" - v4 "github.com/White-Whale-Defi-Platform/migaloo-chain/v4/app/upgrades/v4_1_1" - sdk "github.com/cosmos/cosmos-sdk/types" - vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - - apptesting "github.com/White-Whale-Defi-Platform/migaloo-chain/v4/app" - "github.com/stretchr/testify/suite" -) - -type UpgradeTestSuite struct { - apptesting.KeeperTestHelper -} - -func TestUpgradeTestSuite(t *testing.T) { - suite.Run(t, new(UpgradeTestSuite)) -} - -// Ensures the test does not error out. -func (s *UpgradeTestSuite) TestUpgrade() { - s.Setup(s.T()) - // == CREATE MOCK VESTING ACCOUNT == - cVesting, unvested := v4.CreateMainnetVestingAccount(s.Ctx, s.App.BankKeeper, s.App.AccountKeeper) - vestingAddr := cVesting.GetAddress() - fmt.Printf("VestingAddr unvested: %+v\n", unvested) - - accVestingBalance := s.App.BankKeeper.GetAllBalances(s.Ctx, vestingAddr) - fmt.Printf("Acc vesting bal: %s\n", accVestingBalance) - // create many validators to confirm the unbonding code works - newVal1 := s.SetupValidator(stakingtypes.Bonded) - newVal2 := s.SetupValidator(stakingtypes.Bonded) - newVal3 := s.SetupValidator(stakingtypes.Bonded) - - // Delegate tokens of the vesting multisig account - s.StakingHelper.Delegate(vestingAddr, newVal1, sdk.NewInt(300)) - s.StakingHelper.Delegate(vestingAddr, newVal2, sdk.NewInt(300)) - s.StakingHelper.Delegate(vestingAddr, newVal3, sdk.NewInt(300)) - - // Undelegate part of the tokens from val2 (test instant unbonding on undelegation started before upgrade) - s.StakingHelper.Undelegate(vestingAddr, newVal3, sdk.NewInt(10), true) - - // Redelegate part of the tokens from val2 -> val3 (test instant unbonding on redelegations started before upgrade) - _, err := s.App.StakingKeeper.BeginRedelegation(s.Ctx, vestingAddr, newVal2, newVal3, sdk.NewDec(1)) - s.Require().NoError(err) - - // Confirm delegated to 3 validators - s.Require().Equal(3, len(s.App.StakingKeeper.GetAllDelegatorDelegations(s.Ctx, vestingAddr))) - - // == UPGRADE == - upgradeHeight := int64(5) - s.ConfirmUpgradeSucceeded(v4.UpgradeName, upgradeHeight) - - // == VERIFICATION FEEBURN == - feeBurnParam := s.App.FeeBurnKeeper.GetParams(s.Ctx) - s.Require().Equal("0", feeBurnParam.GetTxFeeBurnPercent()) - - // VERIFY MULTISIGN MIGRATION - accAfter := s.App.AccountKeeper.GetAccount(s.Ctx, vestingAddr) - accAfterVestingAccount, ok := accAfter.(*vestingtypes.ContinuousVestingAccount) - s.Require().True(ok) - - newNotionalAcc := s.App.AccountKeeper.GetAccount(s.Ctx, sdk.MustAccAddressFromBech32(v4.NewNotionalMultisigAccount)) - newNotionalAccVesting, ok := newNotionalAcc.(*vestingtypes.ContinuousVestingAccount) - s.Require().True(ok) - - s.Require().Equal(2, len(s.App.BankKeeper.GetAllBalances(s.Ctx, vestingAddr))) - // only move uwhale token - s.Require().Equal(1, len(s.App.BankKeeper.GetAllBalances(s.Ctx, sdk.MustAccAddressFromBech32(v4.NewNotionalMultisigAccount)))) - s.Require().Equal(0, len(s.App.StakingKeeper.GetAllDelegatorDelegations(s.Ctx, vestingAddr))) - s.Require().Equal(0, len(s.App.StakingKeeper.GetRedelegations(s.Ctx, vestingAddr, 65535))) - - vestingBalance := cVesting.GetVestingCoins(s.Ctx.BlockTime()) - - // check old multisign address balance - expectedBalance := accVestingBalance.AmountOf(params.BaseDenom).Sub(vestingBalance.AmountOf(params.BaseDenom)) - oldMultisigBalance := s.App.BankKeeper.GetAllBalances(s.Ctx, sdk.MustAccAddressFromBech32(v4.NotionalMultisigVestingAccount)) - fmt.Printf("Old multisign address Upgrade Balance: %s, expectedBalance %s\n", oldMultisigBalance, expectedBalance) - // check base account balance - s.Require().True(oldMultisigBalance.AmountOf(params.BaseDenom).Equal(expectedBalance)) - s.Require().True(oldMultisigBalance.AmountOf(v4.TestDenom).Equal(sdk.NewInt(v4.TestAmount))) - // check vesting info - s.Require().True(accAfterVestingAccount.OriginalVesting.AmountOf(params.BaseDenom).Equal(expectedBalance)) - s.Require().True(accAfterVestingAccount.DelegatedVesting.Empty()) - s.Require().True(accAfterVestingAccount.DelegatedFree.Empty()) - - // check new multisign address balance - fmt.Printf("New multisign Upgrade Balance: %s, vestingBalance %s\n", newNotionalAccVesting.GetOriginalVesting(), vestingBalance) - // check vesting info - s.Require().True(vestingBalance.AmountOf(params.BaseDenom).Equal(newNotionalAccVesting.GetOriginalVesting().AmountOf(params.BaseDenom))) - s.Require().True(newNotionalAccVesting.DelegatedVesting.Empty()) - s.Require().True(newNotionalAccVesting.DelegatedFree.Empty()) - - // check base account balance - newMultisigBalance := s.App.BankKeeper.GetAllBalances(s.Ctx, sdk.MustAccAddressFromBech32(v4.NewNotionalMultisigAccount)) - s.Require().True(newMultisigBalance.AmountOf(params.BaseDenom).Equal(vestingBalance.AmountOf(params.BaseDenom))) -} diff --git a/app/upgrades/v4_1_2/constants.go b/app/upgrades/v4_1_2/constants.go new file mode 100644 index 00000000..36db1968 --- /dev/null +++ b/app/upgrades/v4_1_2/constants.go @@ -0,0 +1,7 @@ +package v4 + +// UpgradeName defines the on-chain upgrade name for the Migaloo v4.1.2 upgrade. +// this upgrade includes the fix for pfm +const ( + UpgradeName = "v4.1.2" +) diff --git a/app/upgrades/v4_1_2/upgrades.go b/app/upgrades/v4_1_2/upgrades.go new file mode 100644 index 00000000..7d857d92 --- /dev/null +++ b/app/upgrades/v4_1_2/upgrades.go @@ -0,0 +1,51 @@ +package v4 + +import ( + "github.com/cosmos/cosmos-sdk/baseapp" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" + paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + icacontrollerkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/keeper" + icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" + clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" +) + +// CreateUpgradeHandler that migrates the chain from v3.0.2 to v4.1.2 +func CreateUpgradeHandler( + mm *module.Manager, + configurator module.Configurator, + clientKeeper clientkeeper.Keeper, + paramsKeeper paramskeeper.Keeper, + consensusParamsKeeper consensuskeeper.Keeper, + icacontrollerKeeper icacontrollerkeeper.Keeper, + accountKeeper authkeeper.AccountKeeper, +) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + // READ: https://github.com/cosmos/cosmos-sdk/blob/v0.47.4/UPGRADING.md#xconsensus + baseAppLegacySS := paramsKeeper.Subspace(baseapp.Paramspace). + WithKeyTable(paramstypes.ConsensusParamsKeyTable()) + baseapp.MigrateParams(ctx, baseAppLegacySS, &consensusParamsKeeper) + + // READ: https://github.com/cosmos/ibc-go/blob/v7.2.0/docs/migrations/v7-to-v7_1.md#chains + params := clientKeeper.GetParams(ctx) + params.AllowedClients = append(params.AllowedClients, ibcexported.Localhost) + clientKeeper.SetParams(ctx, params) + + // READ: https://github.com/terra-money/core/issues/166 + icacontrollerKeeper.SetParams(ctx, icacontrollertypes.DefaultParams()) + + // Burning module permissions + moduleAccI := accountKeeper.GetModuleAccount(ctx, authtypes.FeeCollectorName) + moduleAcc := moduleAccI.(*authtypes.ModuleAccount) + moduleAcc.Permissions = []string{authtypes.Burner} + accountKeeper.SetModuleAccount(ctx, moduleAcc) + + return mm.RunMigrations(ctx, configurator, fromVM) + } +} diff --git a/scripts/upgrade_test.sh b/scripts/upgrade_test.sh index 366e941d..b0e23747 100755 --- a/scripts/upgrade_test.sh +++ b/scripts/upgrade_test.sh @@ -9,7 +9,7 @@ HOME=mytestnet ROOT=$(pwd) DENOM=uwhale CHAIN_ID=localmigaloo -SOFTWARE_UPGRADE_NAME="v4.1.1" +SOFTWARE_UPGRADE_NAME="v4.1.2" ADDITIONAL_PRE_SCRIPTS=${ADDITIONAL_PRE_SCRIPTS:-""} ADDITIONAL_AFTER_SCRIPTS=${ADDITIONAL_AFTER_SCRIPTS:-""}