@@ -173,7 +173,8 @@ var (
173173 stakingtypes .BondedPoolName : {authtypes .Burner , authtypes .Staking },
174174 stakingtypes .NotBondedPoolName : {authtypes .Burner , authtypes .Staking },
175175 govtypes .ModuleName : {authtypes .Burner },
176- evmtypes .ModuleName : {authtypes .Minter , authtypes .Burner }, // used for secure addition and subtraction of balance using module account
176+ // used for secure addition and subtraction of balance using module account
177+ evmtypes .ModuleName : {authtypes .Minter , authtypes .Burner },
177178 }
178179
179180 // module accounts that are allowed to receive tokens
@@ -241,7 +242,7 @@ type EthermintApp struct {
241242 sm * module.SimulationManager
242243
243244 // the configurator
244- configurator module.Configurator
245+ configurator module.Configurator //nolint:staticcheck // SA1019: Configurator is still used in runtime v1.
245246
246247 UnorderedTxManager * unorderedtx.Manager
247248}
@@ -357,7 +358,11 @@ func NewEthermintApp(
357358 // add keepers
358359 accountsKeeper , err := accounts .NewKeeper (
359360 appCodec ,
360- runtime .NewEnvironment (runtime .NewKVStoreService (keys [accounts .StoreKey ]), logger .With (log .ModuleKey , "x/accounts" ), runtime .EnvWithMsgRouterService (app .MsgServiceRouter ()), runtime .EnvWithQueryRouterService (app .GRPCQueryRouter ())),
361+ runtime .NewEnvironment (
362+ runtime .NewKVStoreService (keys [accounts .StoreKey ]), logger .With (log .ModuleKey , "x/accounts" ),
363+ runtime .EnvWithMsgRouterService (app .MsgServiceRouter ()),
364+ runtime .EnvWithQueryRouterService (app .GRPCQueryRouter ()),
365+ ),
361366 signingCtx .AddressCodec (),
362367 appCodec .InterfaceRegistry (),
363368 txDecoder ,
@@ -439,19 +444,25 @@ func NewEthermintApp(
439444 authtypes .FeeCollectorName ,
440445 authAddr ,
441446 )
442- if err := app .MintKeeper .SetMintFn (mintkeeper .DefaultMintFn (minttypes .DefaultInflationCalculationFn , app .StakingKeeper , app .MintKeeper )); err != nil {
447+ if err := app .MintKeeper .SetMintFn (
448+ mintkeeper .DefaultMintFn (minttypes .DefaultInflationCalculationFn , app .StakingKeeper , app .MintKeeper ),
449+ ); err != nil {
443450 panic (err )
444451 }
445452 app .PoolKeeper = poolkeeper .NewKeeper (
446453 appCodec ,
447- runtime .NewEnvironment (runtime .NewKVStoreService (keys [pooltypes .StoreKey ]), logger .With (log .ModuleKey , "x/protocolpool" )),
454+ runtime .NewEnvironment (
455+ runtime .NewKVStoreService (keys [pooltypes .StoreKey ]), logger .With (log .ModuleKey , "x/protocolpool" ),
456+ ),
448457 app .AuthKeeper ,
449458 app .BankKeeper ,
450459 authAddr ,
451460 )
452461 app .DistrKeeper = distrkeeper .NewKeeper (
453462 appCodec ,
454- runtime .NewEnvironment (runtime .NewKVStoreService (keys [distrtypes .StoreKey ]), logger .With (log .ModuleKey , "x/distribution" )),
463+ runtime .NewEnvironment (
464+ runtime .NewKVStoreService (keys [distrtypes .StoreKey ]), logger .With (log .ModuleKey , "x/distribution" ),
465+ ),
455466 app .AuthKeeper ,
456467 app .BankKeeper ,
457468 app .StakingKeeper ,
@@ -460,13 +471,17 @@ func NewEthermintApp(
460471 authAddr ,
461472 )
462473 app .SlashingKeeper = slashingkeeper .NewKeeper (
463- runtime .NewEnvironment (runtime .NewKVStoreService (keys [slashingtypes .StoreKey ]), logger .With (log .ModuleKey , "x/slashing" )),
474+ runtime .NewEnvironment (
475+ runtime .NewKVStoreService (keys [slashingtypes .StoreKey ]), logger .With (log .ModuleKey , "x/slashing" ),
476+ ),
464477 appCodec , app .LegacyAmino (),
465478 app .StakingKeeper ,
466479 authAddr ,
467480 )
468481 app .FeeGrantKeeper = feegrantkeeper .NewKeeper (
469- runtime .NewEnvironment (runtime .NewKVStoreService (keys [feegrant .StoreKey ]), logger .With (log .ModuleKey , "x/feegrant" )),
482+ runtime .NewEnvironment (
483+ runtime .NewKVStoreService (keys [feegrant .StoreKey ]), logger .With (log .ModuleKey , "x/feegrant" ),
484+ ),
470485 appCodec ,
471486 app .AuthKeeper .AddressCodec (),
472487 )
@@ -481,8 +496,11 @@ func NewEthermintApp(
481496 }
482497 // set the governance module account as the authority for conducting upgrades
483498 app .UpgradeKeeper = upgradekeeper .NewKeeper (
484- runtime .NewEnvironment (runtime .NewKVStoreService (keys [upgradetypes .StoreKey ]), logger .With (log .ModuleKey , "x/upgrade" ),
485- runtime .EnvWithMsgRouterService (app .MsgServiceRouter ()), runtime .EnvWithQueryRouterService (app .GRPCQueryRouter ())),
499+ runtime .NewEnvironment (
500+ runtime .NewKVStoreService (keys [upgradetypes .StoreKey ]), logger .With (log .ModuleKey , "x/upgrade" ),
501+ runtime .EnvWithMsgRouterService (app .MsgServiceRouter ()),
502+ runtime .EnvWithQueryRouterService (app .GRPCQueryRouter ()),
503+ ),
486504 skipUpgradeHeights ,
487505 appCodec ,
488506 homePath ,
@@ -498,9 +516,11 @@ func NewEthermintApp(
498516 ),
499517 )
500518 app .AuthzKeeper = authzkeeper .NewKeeper (
501- runtime .NewEnvironment (runtime .NewKVStoreService (keys [authzkeeper .StoreKey ]), logger .With (log .ModuleKey , "x/authz" ),
519+ runtime .NewEnvironment (
520+ runtime .NewKVStoreService (keys [authzkeeper .StoreKey ]), logger .With (log .ModuleKey , "x/authz" ),
502521 runtime .EnvWithMsgRouterService (app .MsgServiceRouter ()),
503- runtime .EnvWithQueryRouterService (app .GRPCQueryRouter ())),
522+ runtime .EnvWithQueryRouterService (app .GRPCQueryRouter ()),
523+ ),
504524 appCodec ,
505525 app .AuthKeeper .AddressCodec (),
506526 )
@@ -511,8 +531,11 @@ func NewEthermintApp(
511531 feeMarketSs := app .GetSubspace (feemarkettypes .ModuleName )
512532 app .FeeMarketKeeper = feemarketkeeper .NewKeeper (
513533 appCodec ,
514- runtime .NewEnvironment (runtime .NewKVStoreService (keys [feemarkettypes .StoreKey ]), logger .With (log .ModuleKey , "x/feemarket" ),
515- runtime .EnvWithMsgRouterService (app .MsgServiceRouter ()), runtime .EnvWithQueryRouterService (app .GRPCQueryRouter ())),
534+ runtime .NewEnvironment (
535+ runtime .NewKVStoreService (keys [feemarkettypes .StoreKey ]), logger .With (log .ModuleKey , "x/feemarket" ),
536+ runtime .EnvWithMsgRouterService (app .MsgServiceRouter ()),
537+ runtime .EnvWithQueryRouterService (app .GRPCQueryRouter ()),
538+ ),
516539 authtypes .NewModuleAddress (govtypes .ModuleName ),
517540 feeMarketSs ,
518541 )
@@ -521,8 +544,11 @@ func NewEthermintApp(
521544 evmSs := app .GetSubspace (evmtypes .ModuleName )
522545 app .EvmKeeper = evmkeeper .NewKeeper (
523546 appCodec ,
524- runtime .NewEnvironment (runtime .NewKVStoreService (keys [evmtypes .StoreKey ]), logger .With (log .ModuleKey , "x/evm" ),
525- runtime .EnvWithMsgRouterService (app .MsgServiceRouter ()), runtime .EnvWithQueryRouterService (app .GRPCQueryRouter ())),
547+ runtime .NewEnvironment (
548+ runtime .NewKVStoreService (keys [evmtypes .StoreKey ]), logger .With (log .ModuleKey , "x/evm" ),
549+ runtime .EnvWithMsgRouterService (app .MsgServiceRouter ()),
550+ runtime .EnvWithQueryRouterService (app .GRPCQueryRouter ()),
551+ ),
526552 keys [evmtypes .StoreKey ], okeys [evmtypes .ObjectStoreKey ], authtypes .NewModuleAddress (govtypes .ModuleName ),
527553 app .AuthKeeper , app .BankKeeper , app .StakingKeeper , app .FeeMarketKeeper ,
528554 tracer ,
@@ -541,9 +567,11 @@ func NewEthermintApp(
541567 */
542568 govKeeper := govkeeper .NewKeeper (
543569 appCodec ,
544- runtime .NewEnvironment (runtime .NewKVStoreService (keys [govtypes .StoreKey ]), logger .With (log .ModuleKey , "x/gov" ),
570+ runtime .NewEnvironment (
571+ runtime .NewKVStoreService (keys [govtypes .StoreKey ]), logger .With (log .ModuleKey , "x/gov" ),
545572 runtime .EnvWithMsgRouterService (app .MsgServiceRouter ()),
546- runtime .EnvWithQueryRouterService (app .GRPCQueryRouter ())),
573+ runtime .EnvWithQueryRouterService (app .GRPCQueryRouter ()),
574+ ),
547575 app .AuthKeeper ,
548576 app .BankKeeper ,
549577 app .StakingKeeper ,
@@ -564,7 +592,11 @@ func NewEthermintApp(
564592 // create evidence keeper with router
565593 evidenceKeeper := evidencekeeper .NewKeeper (
566594 appCodec ,
567- runtime .NewEnvironment (runtime .NewKVStoreService (keys [evidencetypes .StoreKey ]), logger .With (log .ModuleKey , "x/evidence" ), runtime .EnvWithMsgRouterService (app .MsgServiceRouter ()), runtime .EnvWithQueryRouterService (app .GRPCQueryRouter ())),
595+ runtime .NewEnvironment (
596+ runtime .NewKVStoreService (keys [evidencetypes .StoreKey ]), logger .With (log .ModuleKey , "x/evidence" ),
597+ runtime .EnvWithMsgRouterService (app .MsgServiceRouter ()),
598+ runtime .EnvWithQueryRouterService (app .GRPCQueryRouter ()),
599+ ),
568600 app .StakingKeeper ,
569601 app .SlashingKeeper ,
570602 app .ConsensusParamsKeeper ,
@@ -819,7 +851,12 @@ func NewEthermintApp(
819851// use Ethermint's custom AnteHandler
820852func (app * EthermintApp ) setAnteHandler (txConfig client.TxConfig , maxGasWanted uint64 , logger log.Logger ) {
821853 anteHandler , err := ante .NewAnteHandler (ante.HandlerOptions {
822- Environment : runtime .NewEnvironment (nil , logger , runtime .EnvWithMsgRouterService (app .MsgServiceRouter ()), runtime .EnvWithQueryRouterService (app .GRPCQueryRouter ())), // nil is set as the kvstoreservice to avoid module access
854+ Environment : runtime .NewEnvironment (
855+ nil ,
856+ logger ,
857+ runtime .EnvWithMsgRouterService (app .MsgServiceRouter ()),
858+ runtime .EnvWithQueryRouterService (app .GRPCQueryRouter ()),
859+ ), // nil is set as the kvstoreservice to avoid module access
823860 ConsensusKeeper : app .ConsensusParamsKeeper ,
824861 AccountKeeper : app .AuthKeeper ,
825862 AccountAbstractionKeeper : app .AccountsKeeper ,
@@ -894,7 +931,7 @@ func (app *EthermintApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) {
894931 return app .ModuleManager .EndBlock (ctx )
895932}
896933
897- func (app * EthermintApp ) Configurator () module.Configurator {
934+ func (app * EthermintApp ) Configurator () module.Configurator { //nolint:staticcheck // SA1019: Configurator is still used in runtime v1.
898935 return app .configurator
899936}
900937
0 commit comments