Skip to content

Commit

Permalink
feat(ibc): add wasm stack to ibc router
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yang committed Jun 19, 2024
1 parent 98c2b24 commit 3bed648
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,11 +562,16 @@ func (app *NibiruApp) InitKeepers(
// channel.RecvPacket -> fee.OnRecvPacket -> icaHost.OnRecvPacket
icaHostStack := icahost.NewIBCModule(app.icaHostKeeper)

var wasmStack porttypes.IBCModule
wasmStack = wasm.NewIBCHandler(app.WasmKeeper, app.ibcKeeper.ChannelKeeper, app.ibcFeeKeeper)
wasmStack = ibcfee.NewIBCMiddleware(wasmStack, app.ibcFeeKeeper)

// Add transfer stack to IBC Router
ibcRouter.
AddRoute(icahosttypes.SubModuleName, icaHostStack).
AddRoute(icacontrollertypes.SubModuleName, icaControllerStack).
AddRoute(ibctransfertypes.ModuleName, transferStack)
AddRoute(ibctransfertypes.ModuleName, transferStack).
AddRoute(wasmtypes.ModuleName, wasmStack)

// Create Mock IBC Fee module stack for testing
// SendPacket, since it is originating from the application to core IBC:
Expand Down

0 comments on commit 3bed648

Please sign in to comment.