@@ -66,9 +66,6 @@ import (
6666 "github.com/cosmos/cosmos-sdk/x/bank"
6767 bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
6868 banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
69- "github.com/cosmos/cosmos-sdk/x/capability"
70- capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper"
71- capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
7269 consensus "github.com/cosmos/cosmos-sdk/x/consensus"
7370 consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper"
7471 consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
@@ -117,7 +114,6 @@ var (
117114 auth.AppModuleBasic {},
118115 genutil .NewAppModuleBasic (genutiltypes .DefaultMessageValidator ),
119116 bank.AppModuleBasic {},
120- capability.AppModuleBasic {},
121117 staking.AppModuleBasic {},
122118 mint.AppModuleBasic {},
123119 distr.AppModuleBasic {},
@@ -174,7 +170,6 @@ type SimApp struct {
174170 // keepers
175171 AccountKeeper authkeeper.AccountKeeper
176172 BankKeeper bankkeeper.Keeper
177- CapabilityKeeper * capabilitykeeper.Keeper
178173 StakingKeeper * stakingkeeper.Keeper
179174 SlashingKeeper slashingkeeper.Keeper
180175 MintKeeper mintkeeper.Keeper
@@ -261,14 +256,13 @@ func NewSimApp(
261256 authtypes .StoreKey , banktypes .StoreKey , stakingtypes .StoreKey , crisistypes .StoreKey ,
262257 minttypes .StoreKey , distrtypes .StoreKey , slashingtypes .StoreKey ,
263258 govtypes .StoreKey , paramstypes .StoreKey , consensusparamtypes .StoreKey , upgradetypes .StoreKey , feegrant .StoreKey ,
264- evidencetypes .StoreKey , capabilitytypes .StoreKey ,
265- authzkeeper .StoreKey , nftkeeper .StoreKey , group .StoreKey ,
259+ evidencetypes .StoreKey , authzkeeper .StoreKey , nftkeeper .StoreKey , group .StoreKey ,
266260 )
267261
268262 tkeys := storetypes .NewTransientStoreKeys (paramstypes .TStoreKey )
269263 // NOTE: The testingkey is just mounted for testing purposes. Actual applications should
270264 // not include this key.
271- memKeys := storetypes .NewMemoryStoreKeys (capabilitytypes . MemStoreKey , "testingkey" )
265+ memKeys := storetypes .NewMemoryStoreKeys ("testingkey" )
272266
273267 // register the streaming service with the BaseApp
274268 if err := bApp .SetStreamingService (appOpts , appCodec , keys ); err != nil {
@@ -292,11 +286,6 @@ func NewSimApp(
292286 app .ConsensusParamsKeeper = consensusparamkeeper .NewKeeper (appCodec , keys [consensusparamtypes .StoreKey ], authtypes .NewModuleAddress (govtypes .ModuleName ).String ())
293287 bApp .SetParamStore (& app .ConsensusParamsKeeper )
294288
295- app .CapabilityKeeper = capabilitykeeper .NewKeeper (appCodec , keys [capabilitytypes .StoreKey ], memKeys [capabilitytypes .MemStoreKey ])
296- // Applications that wish to enforce statically created ScopedKeepers should call `Seal` after creating
297- // their scoped modules in `NewApp` with `ScopeToModule`
298- app .CapabilityKeeper .Seal ()
299-
300289 // add keepers
301290 app .AccountKeeper = authkeeper .NewAccountKeeper (appCodec , keys [authtypes .StoreKey ], authtypes .ProtoBaseAccount , maccPerms , sdk .Bech32MainPrefix , authtypes .NewModuleAddress (govtypes .ModuleName ).String ())
302291
@@ -400,7 +389,6 @@ func NewSimApp(
400389 auth .NewAppModule (appCodec , app .AccountKeeper , authsims .RandomGenesisAccounts , app .GetSubspace (authtypes .ModuleName )),
401390 vesting .NewAppModule (app .AccountKeeper , app .BankKeeper ),
402391 bank .NewAppModule (appCodec , app .BankKeeper , app .AccountKeeper , app .GetSubspace (banktypes .ModuleName )),
403- capability .NewAppModule (appCodec , * app .CapabilityKeeper , false ),
404392 crisis .NewAppModule (app .CrisisKeeper , skipGenesisInvariants , app .GetSubspace (crisistypes .ModuleName )),
405393 feegrantmodule .NewAppModule (appCodec , app .AccountKeeper , app .BankKeeper , app .FeeGrantKeeper , app .interfaceRegistry ),
406394 gov .NewAppModule (appCodec , & app .GovKeeper , app .AccountKeeper , app .BankKeeper , app .GetSubspace (govtypes .ModuleName )),
@@ -421,10 +409,8 @@ func NewSimApp(
421409 // there is nothing left over in the validator fee pool, so as to keep the
422410 // CanWithdrawInvariant invariant.
423411 // NOTE: staking module is required if HistoricalEntries param > 0
424- // NOTE: capability module's beginblocker must come before any modules using capabilities (e.g. IBC)
425412 app .ModuleManager .SetOrderBeginBlockers (
426413 upgradetypes .ModuleName ,
427- capabilitytypes .ModuleName ,
428414 minttypes .ModuleName ,
429415 distrtypes .ModuleName ,
430416 slashingtypes .ModuleName ,
@@ -445,11 +431,7 @@ func NewSimApp(
445431 // NOTE: The genutils module must occur after staking so that pools are
446432 // properly initialized with tokens from genesis accounts.
447433 // NOTE: The genutils module must also occur after auth so that it can access the params from auth.
448- // NOTE: Capability module must occur first so that it can initialize any capabilities
449- // so that other modules that want to create or claim capabilities afterwards in InitChain
450- // can do so safely.
451- genesisModuleOrder := []string {
452- capabilitytypes .ModuleName , authtypes .ModuleName , banktypes .ModuleName ,
434+ genesisModuleOrder := []string {authtypes .ModuleName , banktypes .ModuleName ,
453435 distrtypes .ModuleName , stakingtypes .ModuleName , slashingtypes .ModuleName , govtypes .ModuleName ,
454436 minttypes .ModuleName , crisistypes .ModuleName , genutiltypes .ModuleName , evidencetypes .ModuleName , authz .ModuleName ,
455437 feegrant .ModuleName , nft .ModuleName , group .ModuleName , paramstypes .ModuleName , upgradetypes .ModuleName ,
0 commit comments