Skip to content

Commit

Permalink
feat(ibc): add wasm stack to ibc router (#1931)
Browse files Browse the repository at this point in the history
* feat(ibc): add wasm stack to ibc router

* Update CHANGELOG.md
  • Loading branch information
k-yang committed Jun 19, 2024
1 parent 9ff225a commit 0ed9d8a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Features

* [#1931](https://github.com/NibiruChain/nibiru/pull/1931) - feat(ibc): add `wasm` route to IBC router

## [v1.4.0](https://github.com/NibiruChain/nibiru/releases/tag/v1.4.0) - 2024-06-04

Nibiru v1.4.0 adds PebbleDB support and increases the wasm contract size limit to 3MB.
Expand Down
7 changes: 6 additions & 1 deletion app/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,11 +541,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 0ed9d8a

Please sign in to comment.