Skip to content

Commit

Permalink
added upgrade plan (#259)
Browse files Browse the repository at this point in the history
Co-authored-by: Yarom Swisa <[email protected] git config --global user.name Yarom>
  • Loading branch information
Yaroms and Yarom Swisa authored Jan 24, 2023
1 parent ace005d commit 47c842c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
var Upgrades = []upgrades.Upgrade{upgrades.Upgrade_0_4_0, upgrades.Upgrade_0_4_3, upgrades.Upgrade_0_4_4, upgrades.Upgrade_0_4_5}

// this line is used by starport scaffolding # stargate/wasm/app/enabledProposals

Expand Down
10 changes: 10 additions & 0 deletions app/upgrades/empty_upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,13 @@ var Upgrade_0_4_4 = 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_5 = Upgrade{
UpgradeName: "v0.4.5", // 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
}

0 comments on commit 47c842c

Please sign in to comment.