Skip to content

Commit

Permalink
docs: add migration guide for #2867
Browse files Browse the repository at this point in the history
  • Loading branch information
tbruyelle committed Nov 2, 2022
1 parent 6b327ea commit 94459d3
Showing 1 changed file with 109 additions and 0 deletions.
109 changes: 109 additions & 0 deletions docs/docs/migration/v0.25.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -1049,3 +1049,112 @@ func DefaultConfig() network.Config {
}
}
```

---

## Fix ICA controller keeper wiring

Related issue: https://github.com/ignite/cli/issues/2867

Apply the following changes to `app/app.go` file :

```go
package app

import (

// highlight-start
icacontrollerkeeper "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/keeper"
icacontrollertypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types"
// highlight-end
// ...
)

// New returns a reference to an initialized blockchain app
func New(
logger log.Logger,
db dbm.DB,
traceStore io.Writer,
loadLatest bool,
skipUpgradeHeights map[int64]bool,
homePath string,
invCheckPeriod uint,
encodingConfig appparams.EncodingConfig,
appOpts servertypes.AppOptions,
baseAppOptions ...func(*baseapp.BaseApp),
) *App {

// ...

keys := sdk.NewKVStoreKeys(
authtypes.StoreKey, authz.ModuleName, banktypes.StoreKey,
stakingtypes.StoreKey,
minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey,
govtypes.StoreKey,
paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey,
feegrant.StoreKey, evidencetypes.StoreKey,
ibctransfertypes.StoreKey, icahosttypes.StoreKey,
capabilitytypes.StoreKey, group.StoreKey,
// highlight-next-line
icacontrollertypes.StoreKey,
yourchainmoduletypes.StoreKey,
// this line is used by starport scaffolding # stargate/app/storeKey
)

// ...

app.ICAHostKeeper = icahostkeeper.NewKeeper(
appCodec, keys[icahosttypes.StoreKey],
app.GetSubspace(icahosttypes.SubModuleName),
app.IBCKeeper.ChannelKeeper,
// highlight-next-line
app.IBCKeeper.ChannelKeeper,
&app.IBCKeeper.PortKeeper,
app.AccountKeeper,
scopedICAHostKeeper,
app.MsgServiceRouter(),
)
// remove-next-line
icaModule := ica.NewAppModule(nil, &app.ICAHostKeeper)
// highlight-start
icaControllerKeeper := icacontrollerkeeper.NewKeeper(
appCodec, keys[icacontrollertypes.StoreKey],
app.GetSubspace(icacontrollertypes.SubModuleName),
app.IBCKeeper.ChannelKeeper, // may be replaced with middleware such as ics29 fee
app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper,
scopedICAControllerKeeper, app.MsgServiceRouter(),
)
icaModule := ica.NewAppModule(&icaControllerKeeper, &app.ICAHostKeeper)
// highlight-end
icaHostIBCModule := icahost.NewIBCModule(app.ICAHostKeeper)

// ...
}

// ...

// initParamsKeeper init params keeper and its subspaces
func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey storetypes.StoreKey) paramskeeper.Keeper {
paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey)

paramsKeeper.Subspace(authtypes.ModuleName)
paramsKeeper.Subspace(banktypes.ModuleName)
paramsKeeper.Subspace(stakingtypes.ModuleName)
paramsKeeper.Subspace(minttypes.ModuleName)
paramsKeeper.Subspace(distrtypes.ModuleName)
paramsKeeper.Subspace(slashingtypes.ModuleName)
paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable())
paramsKeeper.Subspace(crisistypes.ModuleName)
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibchost.ModuleName)
// highlight-next-line
paramsKeeper.Subspace(icacontrollertypes.SubModuleName)
paramsKeeper.Subspace(icahosttypes.SubModuleName)
paramsKeeper.Subspace(mychainmoduletypes.ModuleName)
// this line is used by starport scaffolding # stargate/app/paramSubspace

return paramsKeeper
}
```


0 comments on commit 94459d3

Please sign in to comment.