Skip to content

Commit baf0038

Browse files
committed
Problem: ibc-go v9.x is not used
1 parent 9d69185 commit baf0038

File tree

20 files changed

+178
-201
lines changed

20 files changed

+178
-201
lines changed

app/ante.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
sdk "github.com/cosmos/cosmos-sdk/types"
66
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
77
"github.com/cosmos/cosmos-sdk/x/auth/ante"
8-
ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante"
9-
"github.com/cosmos/ibc-go/v8/modules/core/keeper"
8+
ibcante "github.com/cosmos/ibc-go/v9/modules/core/ante"
9+
"github.com/cosmos/ibc-go/v9/modules/core/keeper"
1010
nfttypes "github.com/crypto-org-chain/chain-main/v4/x/nft-transfer/types"
1111
)
1212

app/app.go

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -109,28 +109,28 @@ import (
109109

110110
// ibc-go imports
111111

112-
ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts"
113-
icacontroller "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller"
114-
icacontrollerkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/keeper"
115-
icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types"
116-
icahost "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host"
117-
icahostkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/keeper"
118-
icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types"
119-
icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types"
120-
ibcfee "github.com/cosmos/ibc-go/v8/modules/apps/29-fee"
121-
ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper"
122-
ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types"
123-
transfer "github.com/cosmos/ibc-go/v8/modules/apps/transfer"
124-
ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper"
125-
ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
126-
ibc "github.com/cosmos/ibc-go/v8/modules/core"
127-
ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types"
128-
ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types"
129-
porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types"
130-
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
131-
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
132-
solom "github.com/cosmos/ibc-go/v8/modules/light-clients/06-solomachine"
133-
ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"
112+
ica "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts"
113+
icacontroller "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller"
114+
icacontrollerkeeper "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/keeper"
115+
icacontrollertypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/types"
116+
icahost "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/host"
117+
icahostkeeper "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/host/keeper"
118+
icahosttypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/host/types"
119+
icatypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/types"
120+
ibcfee "github.com/cosmos/ibc-go/v9/modules/apps/29-fee"
121+
ibcfeekeeper "github.com/cosmos/ibc-go/v9/modules/apps/29-fee/keeper"
122+
ibcfeetypes "github.com/cosmos/ibc-go/v9/modules/apps/29-fee/types"
123+
transfer "github.com/cosmos/ibc-go/v9/modules/apps/transfer"
124+
ibctransferkeeper "github.com/cosmos/ibc-go/v9/modules/apps/transfer/keeper"
125+
ibctransfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types"
126+
ibc "github.com/cosmos/ibc-go/v9/modules/core"
127+
ibcclienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types"
128+
ibcconnectiontypes "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types"
129+
porttypes "github.com/cosmos/ibc-go/v9/modules/core/05-port/types"
130+
ibcexported "github.com/cosmos/ibc-go/v9/modules/core/exported"
131+
ibckeeper "github.com/cosmos/ibc-go/v9/modules/core/keeper"
132+
solom "github.com/cosmos/ibc-go/v9/modules/light-clients/06-solomachine"
133+
ibctm "github.com/cosmos/ibc-go/v9/modules/light-clients/07-tendermint"
134134

135135
// chain-main imports
136136

@@ -433,7 +433,6 @@ func New(
433433
appCodec,
434434
keys[ibcexported.StoreKey],
435435
app.GetSubspace(ibcexported.ModuleName),
436-
app.StakingKeeper,
437436
app.UpgradeKeeper,
438437
scopedIBCKeeper,
439438
authAddr,
@@ -512,13 +511,13 @@ func New(
512511
app.IBCFeeKeeper, // ISC4 Wrapper: fee IBC middleware
513512
app.IBCKeeper.ChannelKeeper, app.IBCKeeper.PortKeeper,
514513
app.AccountKeeper, scopedICAHostKeeper, app.MsgServiceRouter(),
514+
app.GRPCQueryRouter(),
515515
authAddr,
516516
)
517-
app.ICAHostKeeper.WithQueryRouter(app.GRPCQueryRouter())
518517
icaModule := ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper)
519518

520519
var icaControllerStack porttypes.IBCModule
521-
icaControllerStack = icacontroller.NewIBCMiddleware(nil, app.ICAControllerKeeper)
520+
icaControllerStack = icacontroller.NewIBCMiddleware(app.ICAControllerKeeper)
522521
icaControllerStack = ibcfee.NewIBCMiddleware(icaControllerStack, app.IBCFeeKeeper)
523522

524523
var icaHostStack porttypes.IBCModule
@@ -532,6 +531,14 @@ func New(
532531
ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferStack)
533532
ibcRouter.AddRoute(nfttransfertypes.ModuleName, nftTransferStack)
534533
app.IBCKeeper.SetRouter(ibcRouter)
534+
clientKeeper := app.IBCKeeper.ClientKeeper
535+
storeProvider := clientKeeper.GetStoreProvider()
536+
537+
tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider)
538+
clientKeeper.AddRoute(ibctm.ModuleName, &tmLightClientModule)
539+
540+
smLightClientModule := solom.NewLightClientModule(appCodec, storeProvider)
541+
clientKeeper.AddRoute(solom.ModuleName, &smLightClientModule)
535542

536543
// create evidence keeper with router
537544
evidenceKeeper := evidencekeeper.NewKeeper(
@@ -572,8 +579,9 @@ func New(
572579
upgrade.NewAppModule(&app.UpgradeKeeper, app.AccountKeeper.AddressCodec()),
573580
evidence.NewAppModule(app.EvidenceKeeper),
574581
ibc.NewAppModule(app.IBCKeeper),
575-
ibctm.AppModule{},
576-
solom.AppModule{},
582+
// IBC light clients
583+
ibctm.NewAppModule(tmLightClientModule),
584+
solom.NewAppModule(smLightClientModule),
577585
params.NewAppModule(app.ParamsKeeper),
578586
authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
579587
groupmodule.NewAppModule(appCodec, app.GroupKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),

go.mod

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ require (
2323
github.com/cosmos/cosmos-sdk v0.50.11
2424
github.com/cosmos/gogoproto v1.7.0
2525
github.com/cosmos/ibc-go/modules/capability v1.0.1
26-
github.com/cosmos/ibc-go/v8 v8.5.1
26+
github.com/cosmos/ibc-go/v9 v9.0.2
2727
github.com/cosmos/rosetta v0.50.3-1
2828
github.com/crypto-org-chain/cronos/store v0.0.5-0.20240716081818-7f581a697f6d
2929
github.com/crypto-org-chain/cronos/versiondb v0.0.0-20240716081818-7f581a697f6d
@@ -56,21 +56,22 @@ require (
5656
cosmossdk.io/x/nft v0.1.1 // indirect
5757
filippo.io/edwards25519 v1.1.0 // indirect
5858
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
59-
github.com/99designs/keyring v1.2.1 // indirect
60-
github.com/DataDog/datadog-go v3.2.0+incompatible // indirect
59+
github.com/99designs/keyring v1.2.2 // indirect
60+
github.com/DataDog/datadog-go v4.8.3+incompatible // indirect
6161
github.com/DataDog/zstd v1.5.5 // indirect
62+
github.com/Microsoft/go-winio v0.6.2 // indirect
6263
github.com/alitto/pond v1.8.3 // indirect
6364
github.com/aws/aws-sdk-go v1.44.224 // indirect
6465
github.com/beorn7/perks v1.0.1 // indirect
6566
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
66-
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
67+
github.com/bgentry/speakeasy v0.2.0 // indirect
6768
github.com/bits-and-blooms/bitset v1.8.0 // indirect
68-
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
69+
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
6970
github.com/cespare/xxhash/v2 v2.3.0 // indirect
7071
github.com/chzyer/readline v1.5.1 // indirect
7172
github.com/cockroachdb/apd/v2 v2.0.2 // indirect
7273
github.com/cockroachdb/errors v1.11.3 // indirect
73-
github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect
74+
github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a // indirect
7475
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
7576
github.com/cockroachdb/pebble v1.1.2 // indirect
7677
github.com/cockroachdb/redact v1.1.5 // indirect
@@ -88,19 +89,19 @@ require (
8889
github.com/creachadair/atomicfile v0.3.1 // indirect
8990
github.com/creachadair/tomledit v0.0.24 // indirect
9091
github.com/crypto-org-chain/cronos/memiavl v0.0.5-0.20231225065237-42f2597fca49 // indirect
91-
github.com/danieljoos/wincred v1.1.2 // indirect
92+
github.com/danieljoos/wincred v1.2.1 // indirect
9293
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
9394
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
94-
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
95+
github.com/desertbit/timer v1.0.1 // indirect
9596
github.com/dgraph-io/badger/v4 v4.2.0 // indirect
9697
github.com/dgraph-io/ristretto v0.1.1 // indirect
9798
github.com/dustin/go-humanize v1.0.1 // indirect
98-
github.com/dvsekhvalnov/jose2go v1.6.0 // indirect
99+
github.com/dvsekhvalnov/jose2go v1.7.0 // indirect
99100
github.com/emicklei/dot v1.6.2 // indirect
100-
github.com/fatih/color v1.15.0 // indirect
101+
github.com/fatih/color v1.17.0 // indirect
101102
github.com/felixge/httpsnoop v1.0.4 // indirect
102103
github.com/fsnotify/fsnotify v1.7.0 // indirect
103-
github.com/getsentry/sentry-go v0.27.0 // indirect
104+
github.com/getsentry/sentry-go v0.28.1 // indirect
104105
github.com/go-kit/kit v0.13.0 // indirect
105106
github.com/go-kit/log v0.2.1 // indirect
106107
github.com/go-logfmt/logfmt v0.6.0 // indirect
@@ -113,7 +114,7 @@ require (
113114
github.com/golang/mock v1.6.0 // indirect
114115
github.com/golang/snappy v0.0.4 // indirect
115116
github.com/google/btree v1.1.3 // indirect
116-
github.com/google/flatbuffers v1.12.1 // indirect
117+
github.com/google/flatbuffers v24.3.25+incompatible // indirect
117118
github.com/google/go-cmp v0.6.0 // indirect
118119
github.com/google/orderedcode v0.0.1 // indirect
119120
github.com/google/s2a-go v0.1.7 // indirect
@@ -126,16 +127,16 @@ require (
126127
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
127128
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
128129
github.com/hashicorp/go-getter v1.7.5 // indirect
129-
github.com/hashicorp/go-hclog v1.5.0 // indirect
130+
github.com/hashicorp/go-hclog v1.6.3 // indirect
130131
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
131-
github.com/hashicorp/go-plugin v1.5.2 // indirect
132+
github.com/hashicorp/go-plugin v1.6.1 // indirect
132133
github.com/hashicorp/go-safetemp v1.0.0 // indirect
133134
github.com/hashicorp/go-version v1.6.0 // indirect
134135
github.com/hashicorp/golang-lru v1.0.2 // indirect
135136
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
136137
github.com/hashicorp/hcl v1.0.0 // indirect
137138
github.com/hashicorp/yamux v0.1.1 // indirect
138-
github.com/hdevalence/ed25519consensus v0.1.0 // indirect
139+
github.com/hdevalence/ed25519consensus v0.2.0 // indirect
139140
github.com/huandu/skiplist v1.2.0 // indirect
140141
github.com/iancoleman/strcase v0.3.0 // indirect
141142
github.com/improbable-eng/grpc-web v0.15.0 // indirect
@@ -171,7 +172,7 @@ require (
171172
github.com/rogpeppe/go-internal v1.12.0 // indirect
172173
github.com/rs/cors v1.11.1 // indirect
173174
github.com/rs/zerolog v1.33.0 // indirect
174-
github.com/sagikazarmark/locafero v0.4.0 // indirect
175+
github.com/sagikazarmark/locafero v0.6.0 // indirect
175176
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
176177
github.com/sasha-s/go-deadlock v0.3.5 // indirect
177178
github.com/sourcegraph/conc v0.3.0 // indirect
@@ -190,7 +191,7 @@ require (
190191
github.com/zbiljic/go-filelock v0.0.0-20170914061330-1dbf7103ab7d // indirect
191192
github.com/zondax/hid v0.9.2 // indirect
192193
github.com/zondax/ledger-go v0.14.3 // indirect
193-
go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect
194+
go.etcd.io/bbolt v1.4.0-alpha.1 // indirect
194195
go.opencensus.io v0.24.0 // indirect
195196
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
196197
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
@@ -215,7 +216,7 @@ require (
215216
gopkg.in/yaml.v2 v2.4.0 // indirect
216217
gopkg.in/yaml.v3 v3.0.1 // indirect
217218
gotest.tools/v3 v3.5.1 // indirect
218-
nhooyr.io/websocket v1.8.6 // indirect
219+
nhooyr.io/websocket v1.8.11 // indirect
219220
pgregory.net/rapid v1.1.0 // indirect
220221
sigs.k8s.io/yaml v1.4.0 // indirect
221222
)

0 commit comments

Comments
 (0)