diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index cbd5b6742c6..ed91bb343c5 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -33,6 +33,9 @@ import ( "github.com/cosmos/cosmos-sdk/x/upgrade" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + icq "github.com/strangelove-ventures/async-icq/v4" + icqtypes "github.com/strangelove-ventures/async-icq/v4/types" + downtimedetector "github.com/osmosis-labs/osmosis/v14/x/downtime-detector" downtimetypes "github.com/osmosis-labs/osmosis/v14/x/downtime-detector/types" "github.com/osmosis-labs/osmosis/v14/x/gamm" @@ -44,8 +47,6 @@ import ( ibchooks "github.com/osmosis-labs/osmosis/x/ibc-hooks" ibchookskeeper "github.com/osmosis-labs/osmosis/x/ibc-hooks/keeper" ibchookstypes "github.com/osmosis-labs/osmosis/x/ibc-hooks/types" - icq "github.com/strangelove-ventures/async-icq/v4" - icqtypes "github.com/strangelove-ventures/async-icq/v4/types" icahost "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host" icahostkeeper "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/keeper" @@ -503,15 +504,13 @@ func (appKeepers *AppKeepers) WireICS20PreWasmKeeper( ) // ChannelKeeper wrapper for rate limiting SendPacket(). The wasmKeeper needs to be added after it's created - rateLimitingParams := appKeepers.GetSubspace(ibcratelimittypes.ModuleName) - rateLimitingParams = rateLimitingParams.WithKeyTable(ibcratelimittypes.ParamKeyTable()) rateLimitingICS4Wrapper := ibcratelimit.NewICS4Middleware( appKeepers.HooksICS4Wrapper, appKeepers.AccountKeeper, // wasm keeper we set later. nil, appKeepers.BankKeeper, - rateLimitingParams, + appKeepers.GetSubspace(ibcratelimittypes.ModuleName), ) appKeepers.RateLimitingICS4Wrapper = &rateLimitingICS4Wrapper diff --git a/x/ibc-rate-limit/ics4_wrapper.go b/x/ibc-rate-limit/ics4_wrapper.go index 68bbc21c903..7d2a5903cba 100644 --- a/x/ibc-rate-limit/ics4_wrapper.go +++ b/x/ibc-rate-limit/ics4_wrapper.go @@ -11,6 +11,8 @@ import ( channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" porttypes "github.com/cosmos/ibc-go/v4/modules/core/05-port/types" "github.com/cosmos/ibc-go/v4/modules/core/exported" + + "github.com/osmosis-labs/osmosis/v14/x/ibc-rate-limit/types" ) var ( @@ -35,6 +37,9 @@ func NewICS4Middleware( accountKeeper *authkeeper.AccountKeeper, contractKeeper *wasmkeeper.PermissionedKeeper, bankKeeper *bankkeeper.BaseKeeper, paramSpace paramtypes.Subspace, ) ICS4Wrapper { + if !paramSpace.HasKeyTable() { + paramSpace = paramSpace.WithKeyTable(types.ParamKeyTable()) + } return ICS4Wrapper{ channel: channel, accountKeeper: accountKeeper, diff --git a/x/ibc-rate-limit/rate_limit.go b/x/ibc-rate-limit/rate_limit.go index a44c13b24ff..e38241aacd1 100644 --- a/x/ibc-rate-limit/rate_limit.go +++ b/x/ibc-rate-limit/rate_limit.go @@ -2,6 +2,7 @@ package ibc_rate_limit import ( "encoding/json" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"