Documentation ¶
Index ¶
- Constants
- Variables
- func GenesisStateWithValSet(app *EvmM, genesisState types.GenesisState, valSet *tmtypes.ValidatorSet, ...) types.GenesisState
- func GetMaccPerms() map[string][]string
- func NewDefaultGenesisState() types.GenesisState
- func NewTestGenesisState(codec codec.Codec) types.GenesisState
- func ObservabilityViews() (views []*view.View)
- func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)
- type EvmM
- func (app *EvmM) AppCodec() codec.Codec
- func (app *EvmM) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *EvmM) BlockedAddrs() map[string]bool
- func (app *EvmM) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
- func (app *EvmM) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *EvmM) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *EvmM) GetBaseApp() *baseapp.BaseApp
- func (app *EvmM) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *EvmM) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *EvmM) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *EvmM) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *EvmM) GetTxConfig() client.TxConfig
- func (app *EvmM) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *EvmM) InterfaceRegistry() types.InterfaceRegistry
- func (app *EvmM) LegacyAmino() *codec.LegacyAmino
- func (app *EvmM) LoadHeight(height int64) error
- func (app *EvmM) ModuleAccountAddrs() map[string]bool
- func (app *EvmM) Name() string
- func (app *EvmM) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *EvmM) RegisterNodeService(clientCtx client.Context)
- func (app *EvmM) RegisterTendermintService(clientCtx client.Context)
- func (app *EvmM) RegisterTxService(clientCtx client.Context)
- func (app *EvmM) SimulationManager() *module.SimulationManager
Constants ¶
const (
// Name defines the application binary name
Name = "evmmd"
)
const PremintAmount = 20_000_000_000
Variables ¶
var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string // ModuleBasics defines the module BasicManager is in charge of setting up basic, // non-dependant module elements, such as codec registration // and genesis verification. ModuleBasics = module.NewBasicManager( auth.AppModuleBasic{}, genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic( []govclient.ProposalHandler{ paramsclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler, }, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, authzmodule.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, evm.AppModuleBasic{}, feemarket.AppModuleBasic{}, consensus.AppModuleBasic{}, ) )
var ( MinGasPrices = sdk.NewDec(20_000_000_000) MinGasMultiplier = sdk.NewDecWithPrec(5, 1) )
var DefaultConsensusParams = &tmproto.ConsensusParams{ Block: &tmproto.BlockParams{ MaxBytes: 200000, MaxGas: -1, }, Evidence: &tmproto.EvidenceParams{ MaxAgeNumBlocks: 302400, MaxAgeDuration: 504 * time.Hour, MaxBytes: 10000, }, Validator: &tmproto.ValidatorParams{ PubKeyTypes: []string{ tmtypes.ABCIPubKeyTypeEd25519, }, }, }
DefaultConsensusParams defines the default Tendermint consensus params used in Evmos testing.
var EthDefaultConsensusParams = &tmproto.ConsensusParams{ Block: &tmproto.BlockParams{ MaxBytes: 200000, MaxGas: -1, }, Evidence: &tmproto.EvidenceParams{ MaxAgeNumBlocks: 302400, MaxAgeDuration: 504 * time.Hour, MaxBytes: 10000, }, Validator: &tmproto.ValidatorParams{ PubKeyTypes: []string{ tmtypes.ABCIPubKeyTypeEd25519, }, }, }
EthDefaultConsensusParams defines the default Tendermint consensus params used in EvmmApp testing.
Functions ¶
func GenesisStateWithValSet ¶
func GenesisStateWithValSet(app *EvmM, genesisState types.GenesisState, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance, ) types.GenesisState
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
func NewDefaultGenesisState ¶
func NewDefaultGenesisState() types.GenesisState
NewDefaultGenesisState generates the default state for the application.
func NewTestGenesisState ¶
func NewTestGenesisState(codec codec.Codec) types.GenesisState
NewTestGenesisState generate genesis state with single validator
func ObservabilityViews ¶
Types ¶
type EvmM ¶
type EvmM struct { *baseapp.BaseApp // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper StakingKeeper stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper DistrKeeper distrkeeper.Keeper GovKeeper govkeeper.Keeper CrisisKeeper crisiskeeper.Keeper UpgradeKeeper upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper AuthzKeeper authzkeeper.Keeper EvidenceKeeper evidencekeeper.Keeper ConsensusParamsKeeper consensusparamkeeper.Keeper // EVM keepers EvmKeeper *evmkeeper.Keeper FeeMarketKeeper feemarketkeeper.Keeper // contains filtered or unexported fields }
EvmM implements an extended ABCI application. It is an application that may process transactions through Ethereum's EVM running atop of CometBFT consensus.
func EthSetup ¶
func EthSetup(isCheckTx bool, patchGenesis func(*EvmM, types.GenesisState) types.GenesisState) *EvmM
EthSetup initializes a new EvmmApp. A Nop logger is set in EvmmApp.
func EthSetupWithDB ¶
func EthSetupWithDB(isCheckTx bool, patchGenesis func(*EvmM, types.GenesisState) types.GenesisState, db dbm.DB) *EvmM
EthSetupWithDB initializes a new EvmmApp. A Nop logger is set in EvmmApp.
func NewEvmM ¶
func NewEvmM( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encodingConfig simappparams.EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *EvmM
NewEvmM returns a reference to a new initialized Ethermint application.
func Setup ¶
func Setup( isCheckTx bool, feemarketGenesis *feemarkettypes.GenesisState, ) (*EvmM, []byte)
Setup initializes a new Evmos. A Nop logger is set in Evmos.
func (*EvmM) AppCodec ¶
AppCodec returns EvmM's app codec.
NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.
func (*EvmM) BeginBlocker ¶
func (app *EvmM) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker runs the CometBFT ABCI BeginBlock logic. It executes state changes at the beginning of the new block for every registered module. If there is a registered fork at the current height, BeginBlocker will schedule the upgrade plan and perform the state migration (if any).
func (*EvmM) BlockedAddrs ¶
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*EvmM) DeliverTx ¶
func (app *EvmM) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
We are intentionally decomposing the DeliverTx method so as to calculate the transactions per second.
func (*EvmM) EndBlocker ¶
func (app *EvmM) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker updates every end block
func (*EvmM) ExportAppStateAndValidators ¶
func (app *EvmM) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*EvmM) GetBaseApp ¶
GetBaseApp implements the TestingApp interface.
func (*EvmM) GetKey ¶
func (app *EvmM) GetKey(storeKey string) *storetypes.KVStoreKey
GetKey returns the KVStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*EvmM) GetMemKey ¶
func (app *EvmM) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*EvmM) GetSubspace ¶
func (app *EvmM) GetSubspace(moduleName string) paramstypes.Subspace
GetSubspace returns a param subspace for a given module name.
NOTE: This is solely to be used for testing purposes.
func (*EvmM) GetTKey ¶
func (app *EvmM) GetTKey(storeKey string) *storetypes.TransientStoreKey
GetTKey returns the TransientStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*EvmM) GetTxConfig ¶
GetTxConfig implements the TestingApp interface.
func (*EvmM) InitChainer ¶
func (app *EvmM) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer updates at chain initialization
func (*EvmM) InterfaceRegistry ¶
func (app *EvmM) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns EvmM's InterfaceRegistry
func (*EvmM) LegacyAmino ¶
func (app *EvmM) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns EvmM's amino codec.
NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.
func (*EvmM) LoadHeight ¶
LoadHeight loads state at a particular height
func (*EvmM) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*EvmM) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*EvmM) RegisterNodeService ¶
RegisterNodeService registers the node gRPC service on the provided application gRPC query router.
func (*EvmM) RegisterTendermintService ¶
func (*EvmM) RegisterTxService ¶
func (*EvmM) SimulationManager ¶
func (app *EvmM) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface