From 91abb151612a808612bdbffd646b7216e6ee919f Mon Sep 17 00:00:00 2001 From: Facundo Medica Date: Wed, 28 Jun 2023 15:40:34 +0200 Subject: [PATCH] remove gravity begin and end blocker --- app/app.go | 2 -- app/upgrades.go | 18 +++++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/app/app.go b/app/app.go index 55e42cd13e..0c65eeaed0 100644 --- a/app/app.go +++ b/app/app.go @@ -736,7 +736,6 @@ func New( icatypes.ModuleName, // ibcfeetypes.ModuleName, leveragetypes.ModuleName, oracletypes.ModuleName, - gravitytypes.ModuleName, bech32ibctypes.ModuleName, uibc.ModuleName, ugov.ModuleName, @@ -756,7 +755,6 @@ func New( paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, icatypes.ModuleName, // ibcfeetypes.ModuleName, leveragetypes.ModuleName, - gravitytypes.ModuleName, bech32ibctypes.ModuleName, uibc.ModuleName, ugov.ModuleName, diff --git a/app/upgrades.go b/app/upgrades.go index 28028107e8..1374c5c1c2 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -3,6 +3,13 @@ package app import ( "cosmossdk.io/errors" "github.com/CosmWasm/wasmd/x/wasm" + ica "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts" + icagenesis "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/genesis/types" + icahosttypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types" + ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" + bech32ibctypes "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -15,12 +22,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/nft" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ica "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts" - icagenesis "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/genesis/types" - icahosttypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types" - ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" - bech32ibctypes "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types" "github.com/umee-network/umee/v5/app/upgradev3" "github.com/umee-network/umee/v5/app/upgradev3x3" @@ -52,7 +53,6 @@ func (app UmeeApp) RegisterUpgradeHandlers(bool) { app.registerUpgrade4_3(upgradeInfo) app.registerUpgrade("v4.4", upgradeInfo) app.registerUpgrade("v5.0", upgradeInfo, ugov.ModuleName, wasm.ModuleName) - app.registerUpgrade("v5.1-alpha1", upgradeInfo, incentive.ModuleName) app.registerUpgrade5_1(upgradeInfo) // TODO: set correct 5.1 name and add borrowFactor migration } @@ -61,6 +61,10 @@ func (app *UmeeApp) registerUpgrade5_1(upgradeInfo upgradetypes.Plan) { planName := "v5.1" app.UpgradeKeeper.SetUpgradeHandler(planName, func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + app.storeUpgrade(planName, upgradeInfo, storetypes.StoreUpgrades{ + Added: []string{incentive.ModuleName}, + }) + // TODO: set the correct drain account. This will panic if executed. if err := app.GravityKeeper.MigrateFundsToDrainAccount(ctx, sdk.MustAccAddressFromBech32("the_drain_account")); err != nil { return nil, err