Skip to content

Commit

Permalink
Merge pull request #701 from UnUniFi/fix/ibc-hooks
Browse files Browse the repository at this point in the history
fix: ics20 wasm hooks
  • Loading branch information
Senna46 authored Sep 25, 2023
2 parents a3d461a + 7adc510 commit 7590b81
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 7590b81

Please sign in to comment.