@@ -13,17 +13,18 @@ import (
13
13
"github.com/cosmos/ibc-go/modules/capability"
14
14
capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper"
15
15
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
16
- "github.com/cosmos/ibc-go/v8/modules/apps/transfer"
17
- ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper"
18
- ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
19
- ibc "github.com/cosmos/ibc-go/v8/modules/core"
20
- ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types"
21
- porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types"
22
- ibchost "github.com/cosmos/ibc-go/v8/modules/core/exported"
23
- ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
24
- ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"
25
- ibctesting "github.com/cosmos/ibc-go/v8/testing"
26
- ibctestingtypes "github.com/cosmos/ibc-go/v8/testing/types"
16
+ "github.com/cosmos/ibc-go/v10/modules/apps/transfer"
17
+ ibctransferkeeper "github.com/cosmos/ibc-go/v10/modules/apps/transfer/keeper"
18
+ ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
19
+ ibc "github.com/cosmos/ibc-go/v10/modules/core"
20
+ ibcconnectiontypes "github.com/cosmos/ibc-go/v10/modules/core/03-connection/types"
21
+ porttypes "github.com/cosmos/ibc-go/v10/modules/core/05-port/types"
22
+ ibchost "github.com/cosmos/ibc-go/v10/modules/core/exported"
23
+ ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper"
24
+ ibctm "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint"
25
+ ibctesting "github.com/cosmos/ibc-go/v10/testing"
26
+ // TODO eric
27
+ // ibctestingtypes "github.com/cosmos/ibc-go/v10/testing/types"
27
28
"github.com/spf13/cast"
28
29
29
30
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
@@ -38,7 +39,6 @@ import (
38
39
"cosmossdk.io/x/feegrant"
39
40
feegrantkeeper "cosmossdk.io/x/feegrant/keeper"
40
41
feegrantmodule "cosmossdk.io/x/feegrant/module"
41
-
42
42
// add mint
43
43
"cosmossdk.io/x/upgrade"
44
44
upgradekeeper "cosmossdk.io/x/upgrade/keeper"
@@ -109,13 +109,14 @@ import (
109
109
tmjson "github.com/cometbft/cometbft/libs/json"
110
110
tmos "github.com/cometbft/cometbft/libs/os"
111
111
112
- appencoding "github.com/cosmos/interchain-security/v6/app/encoding"
113
- testutil "github.com/cosmos/interchain-security/v6/testutil/integration"
114
- consumer "github.com/cosmos/interchain-security/v6/x/ccv/consumer"
115
- consumerkeeper "github.com/cosmos/interchain-security/v6/x/ccv/consumer/keeper"
116
- consumertypes "github.com/cosmos/interchain-security/v6/x/ccv/consumer/types"
117
- ccvdistr "github.com/cosmos/interchain-security/v6/x/ccv/democracy/distribution"
118
- ccvstaking "github.com/cosmos/interchain-security/v6/x/ccv/democracy/staking"
112
+ appencoding "github.com/cosmos/interchain-security/v7/app/encoding"
113
+ testutil "github.com/cosmos/interchain-security/v7/testutil/integration"
114
+ consumer "github.com/cosmos/interchain-security/v7/x/ccv/consumer"
115
+ consumerkeeper "github.com/cosmos/interchain-security/v7/x/ccv/consumer/keeper"
116
+ consumertypes "github.com/cosmos/interchain-security/v7/x/ccv/consumer/types"
117
+ ccvdistr "github.com/cosmos/interchain-security/v7/x/ccv/democracy/distribution"
118
+ ccvstaking "github.com/cosmos/interchain-security/v7/x/ccv/democracy/staking"
119
+ ccvtypes "github.com/cosmos/interchain-security/v7/x/ccv/types"
119
120
)
120
121
121
122
const (
@@ -438,37 +439,21 @@ func New(
438
439
app .ConsumerKeeper = consumerkeeper .NewNonZeroKeeper (
439
440
appCodec ,
440
441
keys [consumertypes .StoreKey ],
441
- app .GetSubspace (consumertypes .ModuleName ),
442
442
)
443
443
444
444
app .IBCKeeper = ibckeeper .NewKeeper (
445
445
appCodec ,
446
- keys [ibchost .StoreKey ],
446
+ runtime . NewKVStoreService ( keys [ibchost .StoreKey ]) ,
447
447
app .GetSubspace (ibchost .ModuleName ),
448
- app .ConsumerKeeper ,
449
448
app .UpgradeKeeper ,
450
- scopedIBCKeeper ,
451
- authtypes .NewModuleAddress (govtypes .ModuleName ).String (),
452
- )
453
-
454
- app .IBCKeeper = ibckeeper .NewKeeper (
455
- appCodec ,
456
- keys [ibchost .StoreKey ],
457
- app .GetSubspace (ibchost .ModuleName ),
458
- & app .ConsumerKeeper ,
459
- app .UpgradeKeeper ,
460
- scopedIBCKeeper ,
461
449
authtypes .NewModuleAddress (govtypes .ModuleName ).String (),
462
450
)
463
451
464
452
// Create CCV consumer and modules
465
453
app .ConsumerKeeper = consumerkeeper .NewKeeper (
466
454
appCodec ,
467
455
keys [consumertypes .StoreKey ],
468
- app .GetSubspace (consumertypes .ModuleName ),
469
- scopedIBCConsumerKeeper ,
470
456
app .IBCKeeper .ChannelKeeper ,
471
- app .IBCKeeper .PortKeeper ,
472
457
app .IBCKeeper .ConnectionKeeper ,
473
458
app .IBCKeeper .ClientKeeper ,
474
459
app .SlashingKeeper ,
@@ -501,14 +486,12 @@ func New(
501
486
502
487
app .TransferKeeper = ibctransferkeeper .NewKeeper (
503
488
appCodec ,
504
- keys [ibctransfertypes .StoreKey ],
489
+ runtime . NewKVStoreService ( keys [ibctransfertypes .StoreKey ]) ,
505
490
app .GetSubspace (ibctransfertypes .ModuleName ),
506
491
app .IBCKeeper .ChannelKeeper ,
507
492
app .IBCKeeper .ChannelKeeper ,
508
- app .IBCKeeper .PortKeeper ,
509
493
app .AccountKeeper ,
510
494
app .BankKeeper ,
511
- scopedTransferKeeper ,
512
495
authtypes .NewModuleAddress (govtypes .ModuleName ).String (),
513
496
)
514
497
transferModule := transfer .NewAppModule (app .TransferKeeper )
@@ -517,7 +500,7 @@ func New(
517
500
// create static IBC router, add transfer route, then set and seal it
518
501
ibcRouter := porttypes .NewRouter ()
519
502
ibcRouter .AddRoute (ibctransfertypes .ModuleName , ibcmodule )
520
- ibcRouter .AddRoute (consumertypes . ModuleName , consumerModule )
503
+ ibcRouter .AddRoute (ccvtypes . ConsumerPortID , consumerModule )
521
504
app .IBCKeeper .SetRouter (ibcRouter )
522
505
523
506
// create evidence keeper with router
@@ -534,6 +517,9 @@ func New(
534
517
535
518
skipGenesisInvariants := cast .ToBool (appOpts .Get (crisis .FlagSkipGenesisInvariants ))
536
519
520
+ tmLightClientModule := ibctm .NewLightClientModule (appCodec , app .IBCKeeper .ClientKeeper .GetStoreProvider ())
521
+ app .IBCKeeper .ClientKeeper .AddRoute (ibctm .ModuleName , tmLightClientModule )
522
+
537
523
// NOTE: Any module instantiated in the module manager that is later modified
538
524
// must be passed by reference here.
539
525
app .MM = module .NewManager (
@@ -559,7 +545,7 @@ func New(
559
545
params .NewAppModule (app .ParamsKeeper ),
560
546
authzmodule .NewAppModule (appCodec , app .AuthzKeeper , app .AccountKeeper , app .BankKeeper , app .interfaceRegistry ),
561
547
ibc .NewAppModule (app .IBCKeeper ),
562
- ibctm .NewAppModule (),
548
+ ibctm .NewAppModule (tmLightClientModule ),
563
549
transferModule ,
564
550
consumerModule ,
565
551
consensus .NewAppModule (appCodec , app .ConsensusParamsKeeper ),
@@ -933,8 +919,8 @@ func (app *App) GetBaseApp() *baseapp.BaseApp {
933
919
}
934
920
935
921
// GetStakingKeeper implements the TestingApp interface.
936
- func (app * App ) GetStakingKeeper () ibctestingtypes. StakingKeeper {
937
- return app .ConsumerKeeper
922
+ func (app * App ) GetStakingKeeper () * consumerkeeper. Keeper {
923
+ return & app .ConsumerKeeper
938
924
}
939
925
940
926
// GetIBCKeeper implements the TestingApp interface.
0 commit comments