Skip to content

Commit 0b86795

Browse files
authored
chore: update ibc-go v10 to rc.3
1 parent eb23128 commit 0b86795

File tree

10 files changed

+46
-504
lines changed

10 files changed

+46
-504
lines changed

app/app.go

Lines changed: 19 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
1313
dbm "github.com/cosmos/cosmos-db"
1414
"github.com/cosmos/gogoproto/proto"
15-
ibccallbacks "github.com/cosmos/ibc-go/modules/apps/callbacks"
1615
ica "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts"
1716
icacontroller "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller"
1817
icacontrollerkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller/keeper"
@@ -21,16 +20,16 @@ import (
2120
icahostkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/keeper"
2221
icahosttypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/types"
2322
icatypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/types"
24-
ibcfee "github.com/cosmos/ibc-go/v10/modules/apps/29-fee"
25-
ibcfeekeeper "github.com/cosmos/ibc-go/v10/modules/apps/29-fee/keeper"
26-
ibcfeetypes "github.com/cosmos/ibc-go/v10/modules/apps/29-fee/types"
23+
ibccallbacks "github.com/cosmos/ibc-go/v10/modules/apps/callbacks"
2724
"github.com/cosmos/ibc-go/v10/modules/apps/transfer"
2825
ibctransferkeeper "github.com/cosmos/ibc-go/v10/modules/apps/transfer/keeper"
2926
ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
27+
transferv2 "github.com/cosmos/ibc-go/v10/modules/apps/transfer/v2"
3028
ibc "github.com/cosmos/ibc-go/v10/modules/core"
3129
ibcclienttypes "github.com/cosmos/ibc-go/v10/modules/core/02-client/types"
3230
ibcconnectiontypes "github.com/cosmos/ibc-go/v10/modules/core/03-connection/types"
3331
porttypes "github.com/cosmos/ibc-go/v10/modules/core/05-port/types"
32+
ibcapi "github.com/cosmos/ibc-go/v10/modules/core/api"
3433
ibcexported "github.com/cosmos/ibc-go/v10/modules/core/exported"
3534
ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper"
3635
ibctm "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint"
@@ -173,7 +172,6 @@ var maccPerms = map[string][]string{
173172
nft.ModuleName: nil,
174173
// non sdk modules
175174
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
176-
ibcfeetypes.ModuleName: nil,
177175
icatypes.ModuleName: nil,
178176
wasmtypes.ModuleName: {authtypes.Burner},
179177
}
@@ -215,7 +213,6 @@ type WasmApp struct {
215213
CircuitKeeper circuitkeeper.Keeper
216214

217215
IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
218-
IBCFeeKeeper ibcfeekeeper.Keeper
219216
ICAControllerKeeper icacontrollerkeeper.Keeper
220217
ICAHostKeeper icahostkeeper.Keeper
221218
TransferKeeper ibctransferkeeper.Keeper
@@ -309,7 +306,7 @@ func NewWasmApp(
309306
evidencetypes.StoreKey, circuittypes.StoreKey,
310307
authzkeeper.StoreKey, nftkeeper.StoreKey, group.StoreKey,
311308
// non sdk store keys
312-
ibcexported.StoreKey, ibctransfertypes.StoreKey, ibcfeetypes.StoreKey,
309+
ibcexported.StoreKey, ibctransfertypes.StoreKey,
313310
wasmtypes.StoreKey, icahosttypes.StoreKey,
314311
icacontrollertypes.StoreKey,
315312
)
@@ -543,21 +540,14 @@ func NewWasmApp(
543540
// If evidence needs to be handled for the app, set routes in router here and seal
544541
app.EvidenceKeeper = *evidenceKeeper
545542

546-
// IBC Fee Module keeper
547-
app.IBCFeeKeeper = ibcfeekeeper.NewKeeper(
548-
appCodec, runtime.NewKVStoreService(keys[ibcfeetypes.StoreKey]),
549-
app.IBCKeeper.ChannelKeeper, // may be replaced with IBC middleware
550-
app.IBCKeeper.ChannelKeeper,
551-
app.AccountKeeper, app.BankKeeper,
552-
)
553-
554543
// Create Transfer Keepers
555544
app.TransferKeeper = ibctransferkeeper.NewKeeper(
556545
appCodec,
557546
runtime.NewKVStoreService(keys[ibctransfertypes.StoreKey]),
558547
app.GetSubspace(ibctransfertypes.ModuleName),
559-
app.IBCFeeKeeper, // ISC4 Wrapper: fee IBC middleware
560548
app.IBCKeeper.ChannelKeeper,
549+
app.IBCKeeper.ChannelKeeper,
550+
app.MsgServiceRouter(),
561551
app.AccountKeeper,
562552
app.BankKeeper,
563553
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
@@ -567,7 +557,7 @@ func NewWasmApp(
567557
appCodec,
568558
runtime.NewKVStoreService(keys[icahosttypes.StoreKey]),
569559
app.GetSubspace(icahosttypes.SubModuleName),
570-
app.IBCFeeKeeper, // use ics29 fee as ics4Wrapper in middleware stack
560+
app.IBCKeeper.ChannelKeeper,
571561
app.IBCKeeper.ChannelKeeper,
572562
app.AccountKeeper,
573563
app.MsgServiceRouter(),
@@ -579,7 +569,7 @@ func NewWasmApp(
579569
appCodec,
580570
runtime.NewKVStoreService(keys[icacontrollertypes.StoreKey]),
581571
app.GetSubspace(icacontrollertypes.SubModuleName),
582-
app.IBCFeeKeeper, // use ics29 fee as ics4Wrapper in middleware stack
572+
app.IBCKeeper.ChannelKeeper,
583573
app.IBCKeeper.ChannelKeeper,
584574
app.MsgServiceRouter(),
585575
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
@@ -600,7 +590,7 @@ func NewWasmApp(
600590
app.BankKeeper,
601591
app.StakingKeeper,
602592
distrkeeper.NewQuerier(app.DistrKeeper),
603-
app.IBCFeeKeeper, // ISC4 Wrapper: fee IBC middleware
593+
app.IBCKeeper.ChannelKeeper,
604594
app.IBCKeeper.ChannelKeeper,
605595
app.TransferKeeper,
606596
app.MsgServiceRouter(),
@@ -614,9 +604,7 @@ func NewWasmApp(
614604
)
615605

616606
// Create fee enabled wasm ibc Stack
617-
var wasmStack porttypes.IBCModule
618-
wasmStackIBCHandler := wasm.NewIBCHandler(app.WasmKeeper, app.IBCKeeper.ChannelKeeper, app.IBCFeeKeeper)
619-
wasmStack = ibcfee.NewIBCMiddleware(wasmStackIBCHandler, app.IBCFeeKeeper)
607+
wasmStackIBCHandler := wasm.NewIBCHandler(app.WasmKeeper, app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper)
620608

621609
// Create Interchain Accounts Stack
622610
// SendPacket, since it is originating from the application to core IBC:
@@ -628,35 +616,35 @@ func NewWasmApp(
628616
icaControllerStack = icacontroller.NewIBCMiddlewareWithAuth(noAuthzModule, app.ICAControllerKeeper)
629617
// app.ICAAuthModule = icaControllerStack.(ibcmock.IBCModule)
630618
icaControllerStack = icacontroller.NewIBCMiddlewareWithAuth(icaControllerStack, app.ICAControllerKeeper)
631-
icaControllerStack = ibccallbacks.NewIBCMiddleware(icaControllerStack, app.IBCFeeKeeper, wasmStackIBCHandler, wasm.DefaultMaxIBCCallbackGas)
619+
icaControllerStack = ibccallbacks.NewIBCMiddleware(icaControllerStack, app.IBCKeeper.ChannelKeeper, wasmStackIBCHandler, wasm.DefaultMaxIBCCallbackGas)
632620
icaICS4Wrapper := icaControllerStack.(porttypes.ICS4Wrapper)
633-
icaControllerStack = ibcfee.NewIBCMiddleware(icaControllerStack, app.IBCFeeKeeper)
634621
// Since the callbacks middleware itself is an ics4wrapper, it needs to be passed to the ica controller keeper
635622
app.ICAControllerKeeper.WithICS4Wrapper(icaICS4Wrapper)
636623

637624
// RecvPacket, message that originates from core IBC and goes down to app, the flow is:
638-
// channel.RecvPacket -> fee.OnRecvPacket -> icaHost.OnRecvPacket
639-
var icaHostStack porttypes.IBCModule
640-
icaHostStack = icahost.NewIBCModule(app.ICAHostKeeper)
641-
icaHostStack = ibcfee.NewIBCMiddleware(icaHostStack, app.IBCFeeKeeper)
625+
// channel.RecvPacket -> icaHost.OnRecvPacket
626+
icaHostStack := icahost.NewIBCModule(app.ICAHostKeeper)
642627

643628
// Create Transfer Stack
644629
var transferStack porttypes.IBCModule
645630
transferStack = transfer.NewIBCModule(app.TransferKeeper)
646-
transferStack = ibccallbacks.NewIBCMiddleware(transferStack, app.IBCFeeKeeper, wasmStackIBCHandler, wasm.DefaultMaxIBCCallbackGas)
631+
transferStack = ibccallbacks.NewIBCMiddleware(transferStack, app.IBCKeeper.ChannelKeeper, wasmStackIBCHandler, wasm.DefaultMaxIBCCallbackGas)
647632
transferICS4Wrapper := transferStack.(porttypes.ICS4Wrapper)
648-
transferStack = ibcfee.NewIBCMiddleware(transferStack, app.IBCFeeKeeper)
649633
// Since the callbacks middleware itself is an ics4wrapper, it needs to be passed to the ica controller keeper
650634
app.TransferKeeper.WithICS4Wrapper(transferICS4Wrapper)
651635

652636
// Create static IBC router, add app routes, then set and seal it
653637
ibcRouter := porttypes.NewRouter().
654638
AddRoute(ibctransfertypes.ModuleName, transferStack).
655-
AddRoute(wasmtypes.ModuleName, wasmStack).
639+
AddRoute(wasmtypes.ModuleName, wasmStackIBCHandler).
656640
AddRoute(icacontrollertypes.SubModuleName, icaControllerStack).
657641
AddRoute(icahosttypes.SubModuleName, icaHostStack)
658642
app.IBCKeeper.SetRouter(ibcRouter)
659643

644+
ibcRouterV2 := ibcapi.NewRouter().
645+
AddRoute(ibctransfertypes.PortID, transferv2.NewIBCModule(app.TransferKeeper))
646+
app.IBCKeeper.SetRouterV2(ibcRouterV2)
647+
660648
clientKeeper := app.IBCKeeper.ClientKeeper
661649
storeProvider := app.IBCKeeper.ClientKeeper.GetStoreProvider()
662650

@@ -699,7 +687,6 @@ func NewWasmApp(
699687
wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.MsgServiceRouter(), app.GetSubspace(wasmtypes.ModuleName)),
700688
ibc.NewAppModule(app.IBCKeeper),
701689
transfer.NewAppModule(app.TransferKeeper),
702-
ibcfee.NewAppModule(app.IBCFeeKeeper),
703690
ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper),
704691
ibctm.NewAppModule(tmLightClientModule),
705692
// sdk
@@ -744,7 +731,6 @@ func NewWasmApp(
744731
ibctransfertypes.ModuleName,
745732
ibcexported.ModuleName,
746733
icatypes.ModuleName,
747-
ibcfeetypes.ModuleName,
748734
wasmtypes.ModuleName,
749735
)
750736

@@ -759,7 +745,6 @@ func NewWasmApp(
759745
ibctransfertypes.ModuleName,
760746
ibcexported.ModuleName,
761747
icatypes.ModuleName,
762-
ibcfeetypes.ModuleName,
763748
wasmtypes.ModuleName,
764749
)
765750

@@ -782,7 +767,6 @@ func NewWasmApp(
782767
ibctransfertypes.ModuleName,
783768
ibcexported.ModuleName,
784769
icatypes.ModuleName,
785-
ibcfeetypes.ModuleName,
786770
// wasm after ibc transfer
787771
wasmtypes.ModuleName,
788772
}

go.mod

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.23.6
55
require (
66
github.com/CosmWasm/wasmvm/v2 v2.2.1
77
github.com/cosmos/cosmos-proto v1.0.0-beta.5
8-
github.com/cosmos/cosmos-sdk v0.50.11
8+
github.com/cosmos/cosmos-sdk v0.50.12
99
github.com/cosmos/gogogateway v1.2.0 // indirect
1010
github.com/cosmos/gogoproto v1.7.0
1111
github.com/cosmos/iavl v1.2.4
@@ -45,8 +45,7 @@ require (
4545
cosmossdk.io/x/upgrade v0.1.4
4646
github.com/cometbft/cometbft v0.38.15
4747
github.com/cosmos/cosmos-db v1.1.1
48-
github.com/cosmos/ibc-go/modules/apps/callbacks v0.3.1-0.20250218182253-128014f4f785
49-
github.com/cosmos/ibc-go/v10 v10.0.0-beta.0
48+
github.com/cosmos/ibc-go/v10 v10.0.0-rc.3
5049
github.com/distribution/reference v0.5.0
5150
github.com/rs/zerolog v1.33.0
5251
github.com/spf13/viper v1.19.0
@@ -91,7 +90,7 @@ require (
9190
github.com/cometbft/cometbft-db v0.14.1 // indirect
9291
github.com/cosmos/btcutil v1.0.5 // indirect
9392
github.com/cosmos/go-bip39 v1.0.0 // indirect
94-
github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect
93+
github.com/cosmos/ledger-cosmos-go v0.14.0 // indirect
9594
github.com/creachadair/atomicfile v0.3.1 // indirect
9695
github.com/creachadair/tomledit v0.0.24 // indirect
9796
github.com/danieljoos/wincred v1.2.1 // indirect
@@ -211,7 +210,7 @@ require (
211210
golang.org/x/time v0.5.0 // indirect
212211
google.golang.org/api v0.186.0 // indirect
213212
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect
214-
google.golang.org/protobuf v1.36.1 // indirect
213+
google.golang.org/protobuf v1.36.5 // indirect
215214
gopkg.in/ini.v1 v1.67.0 // indirect
216215
gopkg.in/yaml.v3 v3.0.1 // indirect
217216
gotest.tools/v3 v3.5.1 // indirect

go.sum

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,8 @@ github.com/cosmos/cosmos-db v1.1.1 h1:FezFSU37AlBC8S98NlSagL76oqBRWq/prTPvFcEJNC
362362
github.com/cosmos/cosmos-db v1.1.1/go.mod h1:AghjcIPqdhSLP/2Z0yha5xPH3nLnskz81pBx3tcVSAw=
363363
github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA=
364364
github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec=
365-
github.com/cosmos/cosmos-sdk v0.50.11 h1:LxR1aAc8kixdrs3itO+3a44sFoc+vjxVAOyPFx22yjk=
366-
github.com/cosmos/cosmos-sdk v0.50.11/go.mod h1:gt14Meok2IDCjbDtjwkbUcgVNEpUBDN/4hg9cCUtLgw=
365+
github.com/cosmos/cosmos-sdk v0.50.12 h1:WizeD4K74737Gq46/f9fq+WjyZ1cP/1bXwVR3dvyp0g=
366+
github.com/cosmos/cosmos-sdk v0.50.12/go.mod h1:hrWEFMU1eoXqLJeE6VVESpJDQH67FS1nnMrQIjO2daw=
367367
github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY=
368368
github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw=
369369
github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE=
@@ -373,16 +373,14 @@ github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fr
373373
github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0=
374374
github.com/cosmos/iavl v1.2.4 h1:IHUrG8dkyueKEY72y92jajrizbkZKPZbMmG14QzsEkw=
375375
github.com/cosmos/iavl v1.2.4/go.mod h1:GiM43q0pB+uG53mLxLDzimxM9l/5N9UuSY3/D0huuVw=
376-
github.com/cosmos/ibc-go/modules/apps/callbacks v0.3.1-0.20250218182253-128014f4f785 h1:cBXpWY8TUTRwS1O9aiLmPyUYfpJ96mfLQjTb/YfYfME=
377-
github.com/cosmos/ibc-go/modules/apps/callbacks v0.3.1-0.20250218182253-128014f4f785/go.mod h1:GywBRZpiFPqyrb15IYQc5nwowvzWduEkJDcQpgKDP7w=
378-
github.com/cosmos/ibc-go/v10 v10.0.0-beta.0 h1:9iNxbMXWWphbkGCX8Eeq63RV0mMFmA392YVKcajl4xc=
379-
github.com/cosmos/ibc-go/v10 v10.0.0-beta.0/go.mod h1:HL9gEJtUG3zu9TwC/P8/uAMwle2YLQjkXEbtLKLP6bE=
376+
github.com/cosmos/ibc-go/v10 v10.0.0-rc.3 h1:p/p5j36Pd8UiWxHLJX0XS6V1Xb6mja4ATs+VUTkT01I=
377+
github.com/cosmos/ibc-go/v10 v10.0.0-rc.3/go.mod h1:YaoF0Q04cdCJVx/S/9vn7gj8ESLd13idfl58kmjaxBM=
380378
github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU=
381379
github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0=
382380
github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo=
383381
github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA=
384-
github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM=
385-
github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8=
382+
github.com/cosmos/ledger-cosmos-go v0.14.0 h1:WfCHricT3rPbkPSVKRH+L4fQGKYHuGOK9Edpel8TYpE=
383+
github.com/cosmos/ledger-cosmos-go v0.14.0/go.mod h1:E07xCWSBl3mTGofZ2QnL4cIUzMbbGVyik84QYKbX3RA=
386384
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
387385
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
388386
github.com/creachadair/atomicfile v0.3.1 h1:yQORkHjSYySh/tv5th1dkKcn02NEW5JleB84sjt+W4Q=
@@ -1659,8 +1657,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ
16591657
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
16601658
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
16611659
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
1662-
google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk=
1663-
google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
1660+
google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM=
1661+
google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
16641662
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
16651663
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
16661664
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

tests/e2e/ibc_callbacks_test.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"time"
88

99
wasmvmtypes "github.com/CosmWasm/wasmvm/v2/types"
10-
ibcfee "github.com/cosmos/ibc-go/v10/modules/apps/29-fee/types"
1110
ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
1211
channeltypes "github.com/cosmos/ibc-go/v10/modules/core/04-channel/types"
1312
ibctesting "github.com/cosmos/ibc-go/v10/testing"
@@ -18,7 +17,6 @@ import (
1817

1918
sdk "github.com/cosmos/cosmos-sdk/types"
2019

21-
"github.com/CosmWasm/wasmd/app"
2220
"github.com/CosmWasm/wasmd/tests/e2e"
2321
wasmibctesting "github.com/CosmWasm/wasmd/tests/wasmibctesting"
2422
"github.com/CosmWasm/wasmd/x/wasm/types"
@@ -32,7 +30,6 @@ func TestIBCCallbacks(t *testing.T) {
3230
// when the contract on A sends an IBCMsg::Transfer to the contract on B
3331
// then the contract on B should receive a destination chain callback
3432
// and the contract on A should receive a source chain callback with the result (ack or timeout)
35-
marshaler := app.MakeEncodingConfig(t).Codec
3633
coord := wasmibctesting.NewCoordinator(t, 2)
3734
chainA := wasmibctesting.NewWasmTestChain(coord.GetChain(ibctesting.GetChainID(1)))
3835
chainB := wasmibctesting.NewWasmTestChain(coord.GetChain(ibctesting.GetChainID(2)))
@@ -43,12 +40,12 @@ func TestIBCCallbacks(t *testing.T) {
4340
path := wasmibctesting.NewWasmPath(chainA, chainB)
4441
path.EndpointA.ChannelConfig = &ibctesting.ChannelConfig{
4542
PortID: ibctransfertypes.PortID,
46-
Version: string(marshaler.MustMarshalJSON(&ibcfee.Metadata{FeeVersion: ibcfee.Version, AppVersion: ibctransfertypes.V1})),
43+
Version: ibctransfertypes.V1,
4744
Order: channeltypes.UNORDERED,
4845
}
4946
path.EndpointB.ChannelConfig = &ibctesting.ChannelConfig{
5047
PortID: ibctransfertypes.PortID,
51-
Version: string(marshaler.MustMarshalJSON(&ibcfee.Metadata{FeeVersion: ibcfee.Version, AppVersion: ibctransfertypes.V1})),
48+
Version: ibctransfertypes.V1,
5249
Order: channeltypes.UNORDERED,
5350
}
5451
// with an ics-20 transfer channel setup between both chains
@@ -177,7 +174,6 @@ func TestIBCCallbacksWithoutEntrypoints(t *testing.T) {
177174
// when the contract on A sends an IBCMsg::Transfer to the contract on B
178175
// then the VM should try to call the callback on B and fail gracefully
179176
// and should try to call the callback on A and fail gracefully
180-
marshaler := app.MakeEncodingConfig(t).Codec
181177
coord := wasmibctesting.NewCoordinator(t, 2)
182178
chainA := wasmibctesting.NewWasmTestChain(coord.GetChain(ibctesting.GetChainID(1)))
183179
chainB := wasmibctesting.NewWasmTestChain(coord.GetChain(ibctesting.GetChainID(2)))
@@ -187,12 +183,12 @@ func TestIBCCallbacksWithoutEntrypoints(t *testing.T) {
187183
path := wasmibctesting.NewWasmPath(chainA, chainB)
188184
path.EndpointA.ChannelConfig = &ibctesting.ChannelConfig{
189185
PortID: ibctransfertypes.PortID,
190-
Version: string(marshaler.MustMarshalJSON(&ibcfee.Metadata{FeeVersion: ibcfee.Version, AppVersion: ibctransfertypes.V1})),
186+
Version: ibctransfertypes.V1,
191187
Order: channeltypes.UNORDERED,
192188
}
193189
path.EndpointB.ChannelConfig = &ibctesting.ChannelConfig{
194190
PortID: ibctransfertypes.PortID,
195-
Version: string(marshaler.MustMarshalJSON(&ibcfee.Metadata{FeeVersion: ibcfee.Version, AppVersion: ibctransfertypes.V1})),
191+
Version: ibctransfertypes.V1,
196192
Order: channeltypes.UNORDERED,
197193
}
198194
// with an ics-20 transfer channel setup between both chains

0 commit comments

Comments
 (0)