Skip to content

Commit

Permalink
Merge pull request #706 from UnUniFi/fix_HooksICS4Wrapper
Browse files Browse the repository at this point in the history
update HooksICS4Wrapper initialization
  • Loading branch information
Senna46 authored Oct 25, 2023
2 parents ad18faf + 818edbf commit 6e1db9c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,10 @@ func NewAppKeeper(
appKeepers.keys[ibchookstypes.StoreKey],
)
appKeepers.Ics20WasmHooks = ibchooks.NewWasmHooks(&appKeepers.IBCHooksKeeper, nil, accountAddressPrefix) // The contract keeper needs to be set later
appKeepers.HooksICS4Wrapper = ibchooks.NewICS4Middleware(
appKeepers.IBCKeeper.ChannelKeeper,
&appKeepers.Ics20WasmHooks,
)

// Create Transfer Keepers
appKeepers.TransferKeeper = ibctransferkeeper.NewKeeper(
Expand Down Expand Up @@ -454,10 +458,6 @@ func NewAppKeeper(
// Pass the contract keeper to all the structs (generally ICS4Wrappers for ibc middlewares) that need it
appKeepers.ContractKeeper = wasmkeeper.NewDefaultPermissionKeeper(appKeepers.WasmKeeper)
appKeepers.Ics20WasmHooks.ContractKeeper = &appKeepers.WasmKeeper
appKeepers.HooksICS4Wrapper = ibchooks.NewICS4Middleware(
appKeepers.IBCKeeper.ChannelKeeper,
appKeepers.Ics20WasmHooks,
)

// Instantiate the builder keeper, store keys, and module manager
appKeepers.BuilderKeeper = builderkeeper.NewKeeper(
Expand Down

0 comments on commit 6e1db9c

Please sign in to comment.