Skip to content

Commit dd45afe

Browse files
authored
fix: wasm ibc transaction panic (#1816)
* fix wasm ibc transaction panic * remove comment * add changelog entry
1 parent 2c241ed commit dd45afe

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6363
- [#1796](https://github.com/NibiruChain/nibiru/pull/1796) - fix(inflation): fix num skipped epoch when inflation is added to an existing chain
6464
- [#1797](https://github.com/NibiruChain/nibiru/pull/1797) - fix(inflation): fix num skipped epoch updates logic
6565
- [#1804](https://github.com/NibiruChain/nibiru/pull/1804) - fix(inflation): update default parameters
66+
- [#1816](https://github.com/NibiruChain/nibiru/pull/1816) - fix(ibc): fix ibc transaction from wasm contract
6667

6768
#### Dapp modules: perp, spot, etc
6869

app/keepers.go

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,18 @@ func (app *NibiruApp) InitKeepers(
411411
app.BankKeeper,
412412
)
413413

414+
app.ibcTransferKeeper = ibctransferkeeper.NewKeeper(
415+
appCodec,
416+
keys[ibctransfertypes.StoreKey],
417+
/* paramSubspace */ app.GetSubspace(ibctransfertypes.ModuleName),
418+
/* ibctransfertypes.ICS4Wrapper */ app.ibcFeeKeeper,
419+
/* ibctransfertypes.ChannelKeeper */ app.ibcKeeper.ChannelKeeper,
420+
/* ibctransfertypes.PortKeeper */ &app.ibcKeeper.PortKeeper,
421+
app.AccountKeeper,
422+
app.BankKeeper,
423+
app.ScopedTransferKeeper,
424+
)
425+
414426
app.ScopedWasmKeeper = app.capabilityKeeper.ScopeToModule(wasmtypes.ModuleName)
415427

416428
wasmDir := filepath.Join(homePath, "data")
@@ -478,21 +490,6 @@ func (app *NibiruApp) InitKeepers(
478490
app.slashingKeeper,
479491
)
480492

481-
/* Create IBC module and a static IBC router */
482-
ibcRouter := porttypes.NewRouter()
483-
484-
app.ibcTransferKeeper = ibctransferkeeper.NewKeeper(
485-
appCodec,
486-
keys[ibctransfertypes.StoreKey],
487-
/* paramSubspace */ app.GetSubspace(ibctransfertypes.ModuleName),
488-
/* ibctransfertypes.ICS4Wrapper */ app.ibcFeeKeeper,
489-
/* ibctransfertypes.ChannelKeeper */ app.ibcKeeper.ChannelKeeper,
490-
/* ibctransfertypes.PortKeeper */ &app.ibcKeeper.PortKeeper,
491-
app.AccountKeeper,
492-
app.BankKeeper,
493-
app.ScopedTransferKeeper,
494-
)
495-
496493
// Mock Module setup for testing IBC and also acts as the interchain accounts authentication module
497494
// NOTE: the IBC mock keeper and application module is used only for testing core IBC. Do
498495
// not replicate if you do not need to test core IBC or light clients.
@@ -509,6 +506,8 @@ func (app *NibiruApp) InitKeepers(
509506
// - IBC Fee Middleware
510507
// - Transfer
511508

509+
ibcRouter := porttypes.NewRouter()
510+
512511
// create IBC module from bottom to top of stack
513512
var transferStack porttypes.IBCModule
514513
transferStack = ibctransfer.NewIBCModule(app.ibcTransferKeeper)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require (
1616
github.com/cosmos/cosmos-sdk v0.47.10
1717
github.com/cosmos/go-bip39 v1.0.0
1818
github.com/cosmos/gogoproto v1.4.10
19-
github.com/cosmos/ibc-go/v7 v7.3.1
19+
github.com/cosmos/ibc-go/v7 v7.3.2
2020
github.com/gogo/protobuf v1.3.3
2121
github.com/golang/mock v1.6.0
2222
github.com/golang/protobuf v1.5.3

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoK
415415
github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek=
416416
github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38=
417417
github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A=
418-
github.com/cosmos/ibc-go/v7 v7.3.1 h1:bil1IjnHdyWDASFYKfwdRiNtFP6WK3osW7QFEAgU4I8=
419-
github.com/cosmos/ibc-go/v7 v7.3.1/go.mod h1:wvx4pPBofe5ZdMNV3OFRxSI4auEP5Qfqf8JXLLNV04g=
418+
github.com/cosmos/ibc-go/v7 v7.3.2 h1:FeUDcBX7VYY0e0iRmcVkPPUjYfAqIc//QuHXo8JHz9c=
419+
github.com/cosmos/ibc-go/v7 v7.3.2/go.mod h1:IMeOXb7gwpZ+/nOG5BuUkdW4weM1ezvN4PQPws4uzOI=
420420
github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM=
421421
github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0=
422422
github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw=

0 commit comments

Comments
 (0)