Skip to content

Commit

Permalink
proper order of init once again
Browse files Browse the repository at this point in the history
  • Loading branch information
quasisamurai committed Sep 4, 2024
1 parent 3eb0a8f commit aa66712
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,9 @@ func New(
appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), &app.ConsumerKeeper, app.UpgradeKeeper, scopedIBCKeeper, authtypes.NewModuleAddress(adminmoduletypes.ModuleName).String(),
)

app.PFMModule = packetforward.NewAppModule(app.PFMKeeper, app.GetSubspace(pfmtypes.ModuleName))
app.WireICS20PreWasmKeeper(appCodec)

app.ICAControllerKeeper = icacontrollerkeeper.NewKeeper(
appCodec, keys[icacontrollertypes.StoreKey], app.GetSubspace(icacontrollertypes.SubModuleName),
app.RateLimitingICS4Wrapper, // may be replaced with middleware such as ics29 feerefunder
Expand Down Expand Up @@ -647,8 +650,6 @@ func New(

app.GlobalFeeKeeper = globalfeekeeper.NewKeeper(appCodec, keys[globalfeetypes.StoreKey], authtypes.NewModuleAddress(adminmoduletypes.ModuleName).String())

transferModule := transferSudo.NewAppModule(app.TransferKeeper)

// Create evidence Keeper for to register the IBC light client misbehaviour evidence route
evidenceKeeper := evidencekeeper.NewKeeper(
appCodec, runtime.NewKVStoreService(keys[evidencetypes.StoreKey]), &app.ConsumerKeeper, app.SlashingKeeper,
Expand Down Expand Up @@ -872,9 +873,7 @@ func New(
ibcRateLimitmodule := ibcratelimitmodule.NewAppModule(*app.RateLimitingICS4Wrapper)
ibcHooksModule := ibchooks.NewAppModule(app.AccountKeeper)

app.PFMModule = packetforward.NewAppModule(app.PFMKeeper, app.GetSubspace(pfmtypes.ModuleName))
app.WireICS20PreWasmKeeper(appCodec)

transferModule := transferSudo.NewAppModule(app.TransferKeeper)
app.ContractKeeper = wasmkeeper.NewDefaultPermissionKeeper(app.WasmKeeper)

app.RateLimitingICS4Wrapper.ContractKeeper = app.ContractKeeper
Expand Down Expand Up @@ -1683,7 +1682,7 @@ func (app *App) WireICS20PreWasmKeeper(
appCodec,
app.keys[ibctransfertypes.StoreKey],
app.GetSubspace(ibctransfertypes.ModuleName),
app.RateLimitingICS4Wrapper, // essentially still app.IBCKeeper.ChannelKeeper under the hood because no hook overrides
app.RateLimitingICS4Wrapper,
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.PortKeeper,
app.AccountKeeper,
Expand All @@ -1694,8 +1693,6 @@ func (app *App) WireICS20PreWasmKeeper(
authtypes.NewModuleAddress(adminmoduletypes.ModuleName).String(),
)

app.PFMKeeper.SetTransferKeeper(app.TransferKeeper.Keeper)

// PFMKeeper must be created before TransferKeeper
app.PFMKeeper = pfmkeeper.NewKeeper(
appCodec,
Expand All @@ -1707,6 +1704,9 @@ func (app *App) WireICS20PreWasmKeeper(
app.HooksICS4Wrapper,
authtypes.NewModuleAddress(adminmoduletypes.ModuleName).String(),
)

app.PFMKeeper.SetTransferKeeper(app.TransferKeeper.Keeper)

// app.RawIcs20TransferAppModule = transfer.NewAppModule(*appKeepers.TransferKeeper) ??

// Packet Forward Middleware
Expand Down

0 comments on commit aa66712

Please sign in to comment.