Skip to content

Commit

Permalink
added upgrade plan and fixed projects query
Browse files Browse the repository at this point in the history
  • Loading branch information
Yarom Swisa authored and Yarom Swisa committed Mar 4, 2023
1 parent 39b7d1e commit 6d318ab
Show file tree
Hide file tree
Showing 9 changed files with 914 additions and 98 deletions.
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ var Upgrades = []upgrades.Upgrade{
upgrades.Upgrade_0_6_0,
upgrades.Upgrade_0_6_0_RC3,
upgrades.Upgrade_0_6_1,
upgrades.Upgrade_0_6_2,
upgrades.Upgrade_0_7_0,
}

// this line is used by starport scaffolding # stargate/wasm/app/enabledProposals
Expand Down
9 changes: 6 additions & 3 deletions app/upgrades/empty_upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
"github.com/lavanet/lava/app/keepers"
plansmoduletypes "github.com/lavanet/lava/x/plans/types"
projectsmoduletypes "github.com/lavanet/lava/x/projects/types"
subscriptionmoduletypes "github.com/lavanet/lava/x/subscription/types"
)

var Upgrade_0_4_0 = Upgrade{
Expand Down Expand Up @@ -78,12 +81,12 @@ var Upgrade_0_6_1 = Upgrade{
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_6_2 = Upgrade{
UpgradeName: "v0.6.2", // upgrade name defined few lines above
var Upgrade_0_7_0 = Upgrade{
UpgradeName: "v0.7.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
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
}
Loading

0 comments on commit 6d318ab

Please sign in to comment.