@@ -10,9 +10,6 @@ import (
1010
1111 dbm "github.com/cosmos/cosmos-db"
1212 "github.com/cosmos/gogoproto/proto"
13- "github.com/cosmos/ibc-go/modules/capability"
14- capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper"
15- capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
1613 "github.com/cosmos/ibc-go/v10/modules/apps/transfer"
1714 ibctransferkeeper "github.com/cosmos/ibc-go/v10/modules/apps/transfer/keeper"
1815 ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
@@ -146,7 +143,6 @@ var (
146143 auth.AppModuleBasic {},
147144 genutil .NewAppModuleBasic (genutiltypes .DefaultMessageValidator ),
148145 bank.AppModuleBasic {},
149- capability.AppModuleBasic {},
150146 ccvstaking.AppModuleBasic {},
151147 mint.AppModuleBasic {},
152148 ccvdistr.AppModuleBasic {},
@@ -208,7 +204,6 @@ type App struct { // nolint: golint
208204 // keepers
209205 AccountKeeper authkeeper.AccountKeeper
210206 BankKeeper bankkeeper.Keeper
211- CapabilityKeeper * capabilitykeeper.Keeper
212207 StakingKeeper * stakingkeeper.Keeper
213208 SlashingKeeper slashingkeeper.Keeper
214209 MintKeeper mintkeeper.Keeper
@@ -225,11 +220,6 @@ type App struct { // nolint: golint
225220 ConsumerKeeper consumerkeeper.Keeper
226221 ConsensusParamsKeeper consensusparamkeeper.Keeper
227222
228- // make scoped keepers public for test purposes
229- ScopedIBCKeeper capabilitykeeper.ScopedKeeper
230- ScopedTransferKeeper capabilitykeeper.ScopedKeeper
231- ScopedIBCConsumerKeeper capabilitykeeper.ScopedKeeper
232-
233223 // the module manager
234224 MM * module.Manager
235225
@@ -270,12 +260,10 @@ func New(
270260 authtypes .StoreKey , banktypes .StoreKey , stakingtypes .StoreKey , crisistypes .StoreKey ,
271261 minttypes .StoreKey , distrtypes .StoreKey , slashingtypes .StoreKey ,
272262 govtypes .StoreKey , paramstypes .StoreKey , ibchost .StoreKey , upgradetypes .StoreKey , feegrant .StoreKey ,
273- evidencetypes .StoreKey , ibctransfertypes .StoreKey ,
274- capabilitytypes .StoreKey , authzkeeper .StoreKey , consensusparamtypes .StoreKey ,
263+ evidencetypes .StoreKey , ibctransfertypes .StoreKey , authzkeeper .StoreKey , consensusparamtypes .StoreKey ,
275264 consumertypes .StoreKey ,
276265 )
277266 tkeys := storetypes .NewTransientStoreKeys (paramstypes .TStoreKey )
278- memKeys := storetypes .NewMemoryStoreKeys (capabilitytypes .MemStoreKey )
279267
280268 app := & App {
281269 BaseApp : bApp ,
@@ -285,7 +273,6 @@ func New(
285273 interfaceRegistry : interfaceRegistry ,
286274 keys : keys ,
287275 tkeys : tkeys ,
288- memKeys : memKeys ,
289276 }
290277
291278 app .ParamsKeeper = initParamsKeeper (
@@ -299,17 +286,6 @@ func New(
299286 app .ConsensusParamsKeeper = consensusparamkeeper .NewKeeper (appCodec , runtime .NewKVStoreService (keys [consensusparamtypes .StoreKey ]), authtypes .NewModuleAddress (govtypes .ModuleName ).String (), runtime.EventService {})
300287 bApp .SetParamStore (& app .ConsensusParamsKeeper .ParamsStore )
301288
302- // add capability keeper and ScopeToModule for ibc module
303- app .CapabilityKeeper = capabilitykeeper .NewKeeper (
304- appCodec ,
305- keys [capabilitytypes .StoreKey ],
306- memKeys [capabilitytypes .MemStoreKey ],
307- )
308- scopedIBCKeeper := app .CapabilityKeeper .ScopeToModule (ibchost .ModuleName )
309- scopedTransferKeeper := app .CapabilityKeeper .ScopeToModule (ibctransfertypes .ModuleName )
310- scopedIBCConsumerKeeper := app .CapabilityKeeper .ScopeToModule (consumertypes .ModuleName )
311- app .CapabilityKeeper .Seal ()
312-
313289 // add keepers
314290 app .AccountKeeper = authkeeper .NewAccountKeeper (
315291 appCodec ,
@@ -490,7 +466,7 @@ func New(
490466 app .GetSubspace (ibctransfertypes .ModuleName ),
491467 app .IBCKeeper .ChannelKeeper ,
492468 app .IBCKeeper .ChannelKeeper ,
493- app .IBCKeeper . ChannelKeeperV2 ,
469+ app .MsgServiceRouter () ,
494470 app .AccountKeeper ,
495471 app .BankKeeper ,
496472 authtypes .NewModuleAddress (govtypes .ModuleName ).String (),
@@ -533,7 +509,6 @@ func New(
533509 auth .NewAppModule (appCodec , app .AccountKeeper , nil , app .GetSubspace (authtypes .ModuleName )),
534510 vesting .NewAppModule (app .AccountKeeper , app .BankKeeper ),
535511 bank .NewAppModule (appCodec , app .BankKeeper , app .AccountKeeper , app .GetSubspace (banktypes .ModuleName )),
536- capability .NewAppModule (appCodec , * app .CapabilityKeeper , false ),
537512 crisis .NewAppModule (& app .CrisisKeeper , skipGenesisInvariants , app .GetSubspace (crisistypes .ModuleName )),
538513 feegrantmodule .NewAppModule (appCodec , app .AccountKeeper , app .BankKeeper , app .FeeGrantKeeper , app .interfaceRegistry ),
539514 gov .NewAppModule (appCodec , & app .GovKeeper , app .AccountKeeper , app .BankKeeper , app .GetSubspace (govtypes .ModuleName )),
@@ -566,9 +541,7 @@ func New(
566541 // there is nothing left over in the validator fee pool, so as to keep the
567542 // CanWithdrawInvariant invariant.
568543 // NOTE: staking module is required if HistoricalEntries param > 0
569- // NOTE: capability module's beginblocker must come before any modules using capabilities (e.g. IBC)
570544 app .MM .SetOrderBeginBlockers (
571- capabilitytypes .ModuleName ,
572545 minttypes .ModuleName ,
573546 distrtypes .ModuleName ,
574547 slashingtypes .ModuleName ,
@@ -592,7 +565,6 @@ func New(
592565 crisistypes .ModuleName ,
593566 govtypes .ModuleName ,
594567 stakingtypes .ModuleName ,
595- capabilitytypes .ModuleName ,
596568 authtypes .ModuleName ,
597569 banktypes .ModuleName ,
598570 distrtypes .ModuleName ,
@@ -614,11 +586,7 @@ func New(
614586 // NOTE: The genutils module must occur after staking so that pools are
615587 // properly initialized with tokens from genesis accounts.
616588 // NOTE: The genutils module must also occur after auth so that it can access the params from auth.
617- // NOTE: Capability module must occur first so that it can initialize any capabilities
618- // so that other modules that want to create or claim capabilities afterwards in InitChain
619- // can do so safely.
620589 app .MM .SetOrderInitGenesis (
621- capabilitytypes .ModuleName ,
622590 authtypes .ModuleName ,
623591 banktypes .ModuleName ,
624592 distrtypes .ModuleName ,
@@ -716,7 +684,6 @@ func New(
716684 // initialize stores
717685 app .MountKVStores (keys )
718686 app .MountTransientStores (tkeys )
719- app .MountMemoryStores (memKeys )
720687
721688 anteHandler , err := NewAnteHandler (
722689 HandlerOptions {
@@ -760,10 +727,6 @@ func New(
760727 fmt .Fprintln (os .Stderr , err .Error ())
761728 }
762729
763- app .ScopedIBCKeeper = scopedIBCKeeper
764- app .ScopedTransferKeeper = scopedTransferKeeper
765- app .ScopedIBCConsumerKeeper = scopedIBCConsumerKeeper
766-
767730 return app
768731}
769732
@@ -929,11 +892,6 @@ func (app *App) GetIBCKeeper() *ibckeeper.Keeper {
929892 return app .IBCKeeper
930893}
931894
932- // GetScopedIBCKeeper implements the TestingApp interface.
933- func (app * App ) GetScopedIBCKeeper () capabilitykeeper.ScopedKeeper {
934- return app .ScopedIBCKeeper
935- }
936-
937895// GetTxConfig implements the TestingApp interface.
938896func (app * App ) GetTxConfig () client.TxConfig {
939897 return app .txConfig
0 commit comments