From 6ce2ccfd45b8919d5d5f033ec9e7efc1c245a0a7 Mon Sep 17 00:00:00 2001 From: Yarom Swisa Date: Sun, 12 Mar 2023 07:24:09 +0000 Subject: [PATCH 1/2] added upgrade plan for v0.8.0 --- app/app.go | 1 + app/upgrades/empty_upgrades.go | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/app/app.go b/app/app.go index 343020fe88..ad938be435 100644 --- a/app/app.go +++ b/app/app.go @@ -140,6 +140,7 @@ var Upgrades = []upgrades.Upgrade{ upgrades.Upgrade_0_6_0_RC3, upgrades.Upgrade_0_6_1, upgrades.Upgrade_0_7_0, + upgrades.Upgrade_0_8_0, } // 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 d897a9a9de..1eb3856063 100644 --- a/app/upgrades/empty_upgrades.go +++ b/app/upgrades/empty_upgrades.go @@ -90,3 +90,13 @@ var Upgrade_0_7_0 = Upgrade{ }, // create CreateUpgradeHandler in upgrades.go below StoreUpgrades: store.StoreUpgrades{Added: []string{plansmoduletypes.StoreKey, projectsmoduletypes.StoreKey, subscriptionmoduletypes.StoreKey}}, // StoreUpgrades has 3 fields: Added/Renamed/Deleted any module that fits these description should be added in the way below } + +var Upgrade_0_8_0 = Upgrade{ + UpgradeName: "v0.8.0", // 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 +} From c3895196d433951c8a34316cfc05e51c050bc93a Mon Sep 17 00:00:00 2001 From: Yarom Swisa Date: Sun, 12 Mar 2023 07:33:12 +0000 Subject: [PATCH 2/2] upgrade plan 0.7.1 --- app/app.go | 4 ++-- app/upgrades/empty_upgrades.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/app.go b/app/app.go index ad938be435..3de6f0bce5 100644 --- a/app/app.go +++ b/app/app.go @@ -136,11 +136,11 @@ var Upgrades = []upgrades.Upgrade{ v0_5_0.Upgrade, v0_5_1.Upgrade, v0_5_2.Upgrade, - upgrades.Upgrade_0_6_0, upgrades.Upgrade_0_6_0_RC3, + upgrades.Upgrade_0_6_0, upgrades.Upgrade_0_6_1, upgrades.Upgrade_0_7_0, - upgrades.Upgrade_0_8_0, + upgrades.Upgrade_0_7_1, } // 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 1eb3856063..f3c2aa34e7 100644 --- a/app/upgrades/empty_upgrades.go +++ b/app/upgrades/empty_upgrades.go @@ -91,8 +91,8 @@ var Upgrade_0_7_0 = Upgrade{ StoreUpgrades: store.StoreUpgrades{Added: []string{plansmoduletypes.StoreKey, projectsmoduletypes.StoreKey, subscriptionmoduletypes.StoreKey}}, // StoreUpgrades has 3 fields: Added/Renamed/Deleted any module that fits these description should be added in the way below } -var Upgrade_0_8_0 = Upgrade{ - UpgradeName: "v0.8.0", // upgrade name defined few lines above +var Upgrade_0_7_1 = Upgrade{ + UpgradeName: "v0.7.1", // 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)