From d3cdb15a4ab78bc36de12ba33204339c0629b817 Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Wed, 19 Jun 2024 13:29:03 -0400 Subject: [PATCH] feat(ibc): add wasm stack to ibc router (#1931) * feat(ibc): add wasm stack to ibc router * Update CHANGELOG.md --- CHANGELOG.md | 1 + app/keepers.go | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc83a06d7..8406c721c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#1874](https://github.com/NibiruChain/nibiru/pull/1874) - chore(proto): remove the proto stringer as per Cosmos SDK migration guidelines - [#1906](https://github.com/NibiruChain/nibiru/pull/1906) - feat(wasm): increase contract size limit to 3MB - [#1908](https://github.com/NibiruChain/nibiru/pull/1908) - chore: make pebbledb the default db backend +- [#1931](https://github.com/NibiruChain/nibiru/pull/1931) - feat(ibc): add `wasm` route to IBC router #### Nibiru EVM diff --git a/app/keepers.go b/app/keepers.go index 4d8be0114..be8e4a8c0 100644 --- a/app/keepers.go +++ b/app/keepers.go @@ -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: