Skip to content

Commit

Permalink
added upgrade plan
Browse files Browse the repository at this point in the history
  • Loading branch information
Yarom Swisa authored and Yarom Swisa committed Dec 25, 2022
1 parent c42323e commit e2c69db
Show file tree
Hide file tree
Showing 2 changed files with 20 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{}
var Upgrades = []upgrades.Upgrade{upgrades.Upgrade_0_4_0}

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

Expand Down
19 changes: 19 additions & 0 deletions app/upgrades/empty_upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package upgrades

import (
store "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
"github.com/lavanet/lava/app/keepers"
)

var Upgrade_0_4_0 = Upgrade{
UpgradeName: "v0.4.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
}

0 comments on commit e2c69db

Please sign in to comment.