Skip to content

Commit

Permalink
add v1.2.5 handler
Browse files Browse the repository at this point in the history
  • Loading branch information
jgtormo committed Jul 9, 2024
1 parent 5f4720c commit 8c6a265
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 @@ -24,6 +24,7 @@ func (app *App) SetUpgradeHandlers() {
setHandlerForVersion_1_2_2(app)
setHandlerForVersion_1_2_3(app)
setHandlerForVersion_1_2_4(app)
setHandlerForVersion_1_2_5(app)
}

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

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 8c6a265

Please sign in to comment.