From e65fd365b0189a58543a6b653fa991cba251d8ea Mon Sep 17 00:00:00 2001 From: Yarom Swisa Date: Thu, 26 Jan 2023 13:19:15 +0000 Subject: [PATCH] added upgrade plan --- app/app.go | 2 +- app/upgrades/empty_upgrades.go | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/app.go b/app/app.go index 16d1c67036..cc370a8bee 100644 --- a/app/app.go +++ b/app/app.go @@ -115,7 +115,7 @@ const ( ) // Upgrades add here future upgrades (upgrades.Upgrade) -var Upgrades = []upgrades.Upgrade{upgrades.Upgrade_0_4_0, upgrades.Upgrade_0_4_3, upgrades.Upgrade_0_4_4, upgrades.Upgrade_0_4_5} +var Upgrades = []upgrades.Upgrade{upgrades.Upgrade_0_4_0, upgrades.Upgrade_0_4_3, upgrades.Upgrade_0_4_4, upgrades.Upgrade_0_4_5, upgrades.Upgrade_0_4_6} // this line is used by starport scaffolding # stargate/wasm/app/enabledProposals diff --git a/app/upgrades/empty_upgrades.go b/app/upgrades/empty_upgrades.go index 8b286a3137..aefc2b0217 100644 --- a/app/upgrades/empty_upgrades.go +++ b/app/upgrades/empty_upgrades.go @@ -47,3 +47,13 @@ var Upgrade_0_4_5 = Upgrade{ }, // create CreateUpgradeHandler in upgrades.go below StoreUpgrades: store.StoreUpgrades{}, // StoreUpgrades has 3 fields: Added/Renamed/Deleted any module that fits these description should be added in the way below } + +var Upgrade_0_4_6 = Upgrade{ + UpgradeName: "v0.4.6", // upgrade name defined few lines above + CreateUpgradeHandler: func(m *module.Manager, c module.Configurator, bapm BaseAppParamManager, lk *keepers.LavaKeepers) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { + return m.RunMigrations(ctx, c, vm) + } + }, // create CreateUpgradeHandler in upgrades.go below + StoreUpgrades: store.StoreUpgrades{}, // StoreUpgrades has 3 fields: Added/Renamed/Deleted any module that fits these description should be added in the way below +}