From 7adc51000d16b5ef3865987e07c878347b064e7e Mon Sep 17 00:00:00 2001 From: Senna46 <29295263+Senna46@users.noreply.github.com> Date: Mon, 25 Sep 2023 21:53:55 +0900 Subject: [PATCH] feta: ics20 wasm hooks --- app/keepers/keepers.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index dadd41617..a7ad40dec 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -72,6 +72,7 @@ import ( "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + ibchooks "github.com/cosmos/ibc-apps/modules/ibc-hooks/v7" ibchookskeeper "github.com/cosmos/ibc-apps/modules/ibc-hooks/v7/keeper" ibchookstypes "github.com/cosmos/ibc-apps/modules/ibc-hooks/v7/types" @@ -376,13 +377,18 @@ func NewAppKeeper( appKeepers.IBCHooksKeeper = ibchookskeeper.NewKeeper( appKeepers.keys[ibchookstypes.StoreKey], ) + ics20WasmHooks := ibchooks.NewWasmHooks(&appKeepers.IBCHooksKeeper, nil, accountAddressPrefix) // The contract keeper needs to be set later + hooksICS4Wrapper := ibchooks.NewICS4Middleware( + appKeepers.IBCKeeper.ChannelKeeper, + ics20WasmHooks, + ) // Create Transfer Keepers appKeepers.TransferKeeper = ibctransferkeeper.NewKeeper( appCodec, appKeepers.keys[ibctransfertypes.StoreKey], appKeepers.GetSubspace(ibctransfertypes.ModuleName), - appKeepers.IBCFeeKeeper, + hooksICS4Wrapper, appKeepers.IBCKeeper.ChannelKeeper, &appKeepers.IBCKeeper.PortKeeper, appKeepers.AccountKeeper,