diff --git a/app/app.go b/app/app.go index b4db528842..b929268456 100644 --- a/app/app.go +++ b/app/app.go @@ -563,9 +563,10 @@ func NewWasmApp( icaHostStack = ibcfee.NewIBCMiddleware(icaHostStack, app.IBCFeeKeeper) // Create fee enabled wasm ibc Stack - var wasmStack porttypes.IBCModule + var wasmStack porttypes.IBCModule //nolint:gosimple wasmStack = wasm.NewIBCHandler(app.WasmKeeper, app.IBCKeeper.ChannelKeeper) - wasmStack = ibcfee.NewIBCMiddleware(wasmStack, app.IBCFeeKeeper) + // Note: IBC29 fee middleware is currently not supported due to version decoding issues in wasm/ibc.go + // wasmStack = ibcfee.NewIBCMiddleware(wasmStack, app.IBCFeeKeeper) // Create static IBC router, add app routes, then set and seal it ibcRouter := porttypes.NewRouter(). diff --git a/tests/e2e/ibc_fees_test.go b/tests/e2e/ibc_fees_test.go index fa315ffe60..ef3b89d3c8 100644 --- a/tests/e2e/ibc_fees_test.go +++ b/tests/e2e/ibc_fees_test.go @@ -106,6 +106,7 @@ func TestIBCFeesTransfer(t *testing.T) { } func TestIBCFeesWasm(t *testing.T) { + t.Skip("Deactivated until ibc middleware is setup for wasm") // scenario: // given 2 chains with cw20-ibc on chain A and native ics20 module on B // and an ibc channel established diff --git a/x/wasm/ibc.go b/x/wasm/ibc.go index 489e3e7ef8..e98206a3f5 100644 --- a/x/wasm/ibc.go +++ b/x/wasm/ibc.go @@ -2,13 +2,11 @@ package wasm import ( "math" - "strings" wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - ibcfees "github.com/cosmos/ibc-go/v4/modules/apps/29-fee/types" channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" porttypes "github.com/cosmos/ibc-go/v4/modules/core/05-port/types" host "github.com/cosmos/ibc-go/v4/modules/core/24-host" @@ -230,19 +228,11 @@ func (i IBCHandler) OnChanCloseConfirm(ctx sdk.Context, portID, channelID string } func toWasmVMChannel(portID, channelID string, channelInfo channeltypes.Channel) wasmvmtypes.IBCChannel { - version := channelInfo.Version - if strings.TrimSpace(version) != "" { - // check for ics-29 middleware versions - var versionMetadata ibcfees.Metadata - if err := types.ModuleCdc.UnmarshalJSON([]byte(channelInfo.Version), &versionMetadata); err == nil { - version = versionMetadata.AppVersion - } - } return wasmvmtypes.IBCChannel{ Endpoint: wasmvmtypes.IBCEndpoint{PortID: portID, ChannelID: channelID}, CounterpartyEndpoint: wasmvmtypes.IBCEndpoint{PortID: channelInfo.Counterparty.PortId, ChannelID: channelInfo.Counterparty.ChannelId}, Order: channelInfo.Ordering.String(), - Version: version, + Version: channelInfo.Version, // this is the raw version and will cause issues when overloaded in ibc middleware ConnectionID: channelInfo.ConnectionHops[0], // At the moment this list must be of length 1. In the future multi-hop channels may be supported. } }