Skip to content

Commit

Permalink
refactor: remove v4.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hoank101 committed Mar 4, 2024
1 parent 35ae4f2 commit 4f02037
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 108 deletions.
50 changes: 0 additions & 50 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ import (

// unnamed import of statik for swagger UI support
_ "github.com/cosmos/cosmos-sdk/client/docs/statik"

v4 "github.com/White-Whale-Defi-Platform/migaloo-chain/v4/app/upgrades/v4_1_1"
)

const (
Expand Down Expand Up @@ -1119,54 +1117,6 @@ func RegisterSwaggerAPI(rtr *mux.Router) {

// Setup Upgrade Handler
func (app *MigalooApp) setupUpgradeHandlers() {

// !! ATTENTION !!
// v4 upgrade handler
// !! WHEN UPGRADING TO SDK v0.47 MAKE SURE TO INCLUDE THIS
// source: https://github.com/cosmos/cosmos-sdk/blob/release/v0.47.x/UPGRADING.md#xconsensus
app.UpgradeKeeper.SetUpgradeHandler(
v4.UpgradeName,
v4.CreateUpgradeHandler(
app.mm,
app.configurator,
app.IBCKeeper.ClientKeeper,
app.ParamsKeeper,
app.ConsensusParamsKeeper,
app.ICAControllerKeeper,
app.AccountKeeper,
),
)

// When a planned update height is reached, the old binary will panic
// writing on disk the height and name of the update that triggered it
// This will read that value, and execute the preparations for the upgrade.
upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk()
if err != nil {
panic(fmt.Errorf("failed to read upgrade info from disk: %w", err))
}

if app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
return
}

if upgradeInfo.Name == v4.UpgradeName {
// !! ATTENTION !!
// !! WHEN UPGRADING TO SDK v0.47 MAKE SURE TO INCLUDE THIS
// source: https://github.com/cosmos/cosmos-sdk/blob/release/v0.47.x/UPGRADING.md
storeUpgrades := &storetypes.StoreUpgrades{
Added: []string{
consensusparamtypes.StoreKey,
crisistypes.StoreKey,
icqtypes.StoreKey,
feeburnmoduletypes.StoreKey,
},
Deleted: []string{
"intertx",
},
}
// configure store loader that checks if version == upgradeHeight and applies store upgrades
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, storeUpgrades))
}
}

// GetMaccPerms returns a copy of the module account permissions
Expand Down
7 changes: 0 additions & 7 deletions app/upgrades/v4_1_1/constants.go

This file was deleted.

51 changes: 0 additions & 51 deletions app/upgrades/v4_1_1/upgrades.go

This file was deleted.

0 comments on commit 4f02037

Please sign in to comment.