Skip to content

Commit

Permalink
remove gravity begin and end blocker
Browse files Browse the repository at this point in the history
  • Loading branch information
facundomedica committed Jun 28, 2023
1 parent 30b3164 commit 91abb15
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 0 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,6 @@ func New(
icatypes.ModuleName, // ibcfeetypes.ModuleName,
leveragetypes.ModuleName,
oracletypes.ModuleName,
gravitytypes.ModuleName,
bech32ibctypes.ModuleName,
uibc.ModuleName,
ugov.ModuleName,
Expand All @@ -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,
Expand Down
18 changes: 11 additions & 7 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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
}
Expand All @@ -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
Expand Down

0 comments on commit 91abb15

Please sign in to comment.