From bcb202dca4c7fbc1ee0be8b7f4ff066718d99553 Mon Sep 17 00:00:00 2001 From: Yaroms <103432884+Yaroms@users.noreply.github.com> Date: Thu, 19 Jan 2023 11:05:42 +0200 Subject: [PATCH] add upgrade plan (#243) Co-authored-by: Yarom Swisa --- 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 20c246f67c..bfb6eb49f8 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} +var Upgrades = []upgrades.Upgrade{upgrades.Upgrade_0_4_0, upgrades.Upgrade_0_4_3, upgrades.Upgrade_0_4_4} // 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 20f3d659a8..6a8407bf01 100644 --- a/app/upgrades/empty_upgrades.go +++ b/app/upgrades/empty_upgrades.go @@ -27,3 +27,13 @@ var Upgrade_0_4_3 = 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_4 = Upgrade{ + UpgradeName: "v0.4.4", // 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 +}