Skip to content

Commit

Permalink
Update app_upgrades.go
Browse files Browse the repository at this point in the history
v1.2.4
  • Loading branch information
beb4now authored Jun 10, 2024
1 parent 1131dd5 commit 688ae41
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions app/app_upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func (app *App) SetUpgradeHandlers() {
setHandlerForVersion_1_2(app)
setHandlerForVersion_1_2_2(app)
setHandlerForVersion_1_2_3(app)
setHandlerForVersion_1_2_4(app)
}

func setHandlerForVersion_1_0(app *App) {
Expand Down Expand Up @@ -161,3 +162,29 @@ func setHandlerForVersion_1_2_3(app *App) {
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))
}
}
func setHandlerForVersion_1_2_4(app *App) {
const upgradeVersion string = "v1.2.4"

app.UpgradeKeeper.SetUpgradeHandler(upgradeVersion, func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return app.mm.RunMigrations(ctx, app.configurator, fromVM)
})

upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk()
if err != nil {
panic(err)
}

if upgradeInfo.Name == upgradeVersion && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
storeUpgrades := storetypes.StoreUpgrades{
Added: []string{},
Deleted: []string{
AddressBookModuleName,
MarketplaceModuleName,
NftModuleName,
GroupModuleName,
},
}

app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))
}
}

0 comments on commit 688ae41

Please sign in to comment.