Documentation ¶
Index ¶
Constants ¶
View Source
const Name = "v5.0"
Variables ¶
View Source
var Upgrade = upgrades.Upgrade{ UpgradeName: Name, CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator) upgradetypes.UpgradeHandler { return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { fromVM[ecocredit.ModuleName] = 2 fromVM[data.ModuleName] = 1 oldIcaVersion := fromVM[icatypes.ModuleName] fromVM[icatypes.ModuleName] = mm.Modules[icatypes.ModuleName].ConsensusVersion() controllerParams := icacontrollertypes.Params{ControllerEnabled: false} hostParams := icahosttypes.Params{ HostEnabled: false, AllowMessages: []string{}, } mod, found := mm.Modules[icatypes.ModuleName] if !found { panic(fmt.Sprintf("module %s is not in the module manager", icatypes.ModuleName)) } icaMod, ok := mod.(ica.AppModule) if !ok { panic(fmt.Sprintf("expected module %s to be type %T, got %T", icatypes.ModuleName, ica.AppModule{}, mod)) } if oldIcaVersion != fromVM[icatypes.ModuleName] { icaMod.InitModule(ctx, controllerParams, hostParams) } return mm.RunMigrations(ctx, cfg, fromVM) } }, StoreUpgrades: storetypes.StoreUpgrades{ Added: []string{ group.ModuleName, icahosttypes.StoreKey, ibcfeetypes.StoreKey, icacontrollertypes.StoreKey, }, }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.