Documentation
¶
Index ¶
- Constants
- func NewEVMGenesisState() *evmtypes.GenesisState
- func NewErc20GenesisState() *erc20types.GenesisState
- func NewFeeMarketGenesisState() *feemarkettypes.GenesisState
- func NewMintGenesisState() *minttypes.GenesisState
- func SetupTestingApp(chainID string) func() (ibctesting.TestingApp, map[string]json.RawMessage)
- type BankKeeper
- type EVMD
- func (app *EVMD) AppCodec() codec.Codec
- func (app *EVMD) AutoCliOpts() autocli.AppOptions
- func (app *EVMD) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)
- func (app *EVMD) Close() error
- func (app *EVMD) Configurator() module.Configurator
- func (app *EVMD) DefaultGenesis() map[string]json.RawMessage
- func (app *EVMD) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)
- func (app *EVMD) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *EVMD) FinalizeBlock(req *abci.RequestFinalizeBlock) (res *abci.ResponseFinalizeBlock, err error)
- func (app *EVMD) GetAccountKeeper() authkeeper.AccountKeeper
- func (app *EVMD) GetAnteHandler() sdk.AnteHandler
- func (app *EVMD) GetBankKeeper() bankkeeper.Keeper
- func (app *EVMD) GetBaseApp() *baseapp.BaseApp
- func (app *EVMD) GetCallbackKeeper() ibccallbackskeeper.ContractKeeper
- func (app *EVMD) GetConsensusParamsKeeper() consensusparamkeeper.Keeper
- func (app *EVMD) GetDistrKeeper() distrkeeper.Keeper
- func (app *EVMD) GetEVMKeeper() *evmkeeper.Keeper
- func (app *EVMD) GetErc20Keeper() *erc20keeper.Keeper
- func (app *EVMD) GetEvidenceKeeper() *evidencekeeper.Keeper
- func (app *EVMD) GetFeeGrantKeeper() feegrantkeeper.Keeper
- func (app *EVMD) GetFeeMarketKeeper() *feemarketkeeper.Keeper
- func (app *EVMD) GetGovKeeper() govkeeper.Keeper
- func (app *EVMD) GetIBCKeeper() *ibckeeper.Keeper
- func (app *EVMD) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *EVMD) GetMempool() sdkmempool.ExtMempool
- func (app *EVMD) GetMintKeeper() mintkeeper.Keeper
- func (app *EVMD) GetPreciseBankKeeper() *precisebankkeeper.Keeper
- func (app *EVMD) GetSlashingKeeper() slashingkeeper.Keeper
- func (app *EVMD) GetStakingKeeper() *stakingkeeper.Keeper
- func (app *EVMD) GetStakingKeeperSDK() stakingkeeper.Keeper
- func (app *EVMD) GetTransferKeeper() transferkeeper.Keeper
- func (app *EVMD) GetTxConfig() client.TxConfig
- func (app *EVMD) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
- func (app *EVMD) InterfaceRegistry() types.InterfaceRegistry
- func (app *EVMD) LegacyAmino() *codec.LegacyAmino
- func (app *EVMD) LoadHeight(height int64) error
- func (app *EVMD) Name() string
- func (app *EVMD) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
- func (app *EVMD) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *EVMD) RegisterNodeService(clientCtx client.Context, cfg config.Config)
- func (app *EVMD) RegisterPendingTxListener(listener func(common.Hash))
- func (app *EVMD) RegisterTendermintService(clientCtx client.Context)
- func (app *EVMD) RegisterTxService(clientCtx client.Context)
- func (app EVMD) RegisterUpgradeHandlers()
- func (app *EVMD) SetErc20Keeper(erc20Keeper erc20keeper.Keeper)
- func (app *EVMD) SetTransferKeeper(transferKeeper transferkeeper.Keeper)
- func (app *EVMD) SimulationManager() *module.SimulationManager
- func (app *EVMD) TxConfig() client.TxConfig
- type GenesisState
- type SetupOptions
Constants ¶
const UpgradeName = "v0.5.0-to-v0.6.0"
UpgradeName defines the on-chain upgrade name for the sample EVMD upgrade from v0.5.0 to v0.6.0.
NOTE: This upgrade defines a reference implementation of what an upgrade could look like when an application is migrating from EVMD version v0.4.0 to v0.5.x
Variables ¶
This section is empty.
Functions ¶
func NewEVMGenesisState ¶
func NewEVMGenesisState() *evmtypes.GenesisState
NewEVMGenesisState returns the default genesis state for the EVM module.
NOTE: for the example chain implementation we need to set the default EVM denomination, enable ALL precompiles, and include default preinstalls.
func NewErc20GenesisState ¶
func NewErc20GenesisState() *erc20types.GenesisState
NewErc20GenesisState returns the default genesis state for the ERC20 module.
NOTE: for the example chain implementation we are also adding a default token pair, which is the base denomination of the chain (i.e. the WEVMOS contract).
func NewFeeMarketGenesisState ¶
func NewFeeMarketGenesisState() *feemarkettypes.GenesisState
NewFeeMarketGenesisState returns the default genesis state for the feemarket module.
NOTE: for the example chain implementation we are disabling the base fee.
func NewMintGenesisState ¶
func NewMintGenesisState() *minttypes.GenesisState
NewMintGenesisState returns the default genesis state for the mint module.
NOTE: for the example chain implementation we are also adding a default minter.
func SetupTestingApp ¶
func SetupTestingApp(chainID string) func() (ibctesting.TestingApp, map[string]json.RawMessage)
SetupTestingApp initializes the IBC-go testing application need to keep this design to comply with the ibctesting SetupTestingApp func and be able to set the chainID for the tests properly
Types ¶
type BankKeeper ¶
type BankKeeper interface {
evmtypes.BankKeeper
cmn.BankKeeper
}
type EVMD ¶
type EVMD struct {
*baseapp.BaseApp
// keepers
AccountKeeper authkeeper.AccountKeeper
BankKeeper bankkeeper.Keeper
StakingKeeper *stakingkeeper.Keeper
SlashingKeeper slashingkeeper.Keeper
MintKeeper mintkeeper.Keeper
DistrKeeper distrkeeper.Keeper
GovKeeper govkeeper.Keeper
UpgradeKeeper *upgradekeeper.Keeper
AuthzKeeper authzkeeper.Keeper
EvidenceKeeper evidencekeeper.Keeper
FeeGrantKeeper feegrantkeeper.Keeper
ConsensusParamsKeeper consensusparamkeeper.Keeper
// IBC keepers
IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
TransferKeeper transferkeeper.Keeper
CallbackKeeper ibccallbackskeeper.ContractKeeper
// Cosmos EVM keepers
FeeMarketKeeper feemarketkeeper.Keeper
EVMKeeper *evmkeeper.Keeper
Erc20Keeper erc20keeper.Keeper
PreciseBankKeeper precisebankkeeper.Keeper
EVMMempool *evmmempool.ExperimentalEVMMempool
// the module manager
ModuleManager *module.Manager
BasicModuleManager module.BasicManager
// contains filtered or unexported fields
}
EVMD extends an ABCI application, but with most of its parameters exported.
func NewExampleApp ¶
func NewExampleApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *EVMD
NewExampleApp returns a reference to an initialized EVMD.
func SetupWithGenesisValSet ¶
func SetupWithGenesisValSet(t *testing.T, chainID string, evmChainID uint64, valSet *cmttypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *EVMD
SetupWithGenesisValSet initializes a new EVMD with a validator set and genesis accounts that also act as delegators. For simplicity, each validator is bonded with a delegation of one consensus engine unit in the default token of the simapp from first genesis account. A Nop logger is set in EVMD.
func (*EVMD) AppCodec ¶
AppCodec returns EVMD'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 (*EVMD) AutoCliOpts ¶
func (app *EVMD) AutoCliOpts() autocli.AppOptions
AutoCliOpts returns the autocli options for the app.
func (*EVMD) BeginBlocker ¶
BeginBlocker application updates every begin block
func (*EVMD) Close ¶
Close unsubscribes from the CometBFT event bus (if set) and closes the mempool and underlying BaseApp.
func (*EVMD) Configurator ¶
func (app *EVMD) Configurator() module.Configurator
func (*EVMD) DefaultGenesis ¶
func (app *EVMD) DefaultGenesis() map[string]json.RawMessage
DefaultGenesis returns a default genesis from the registered AppModuleBasic's.
func (*EVMD) EndBlocker ¶
EndBlocker application updates every end block
func (*EVMD) ExportAppStateAndValidators ¶
func (app *EVMD) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*EVMD) FinalizeBlock ¶
func (app *EVMD) FinalizeBlock(req *abci.RequestFinalizeBlock) (res *abci.ResponseFinalizeBlock, err error)
func (*EVMD) GetAccountKeeper ¶
func (app *EVMD) GetAccountKeeper() authkeeper.AccountKeeper
func (*EVMD) GetAnteHandler ¶
func (app *EVMD) GetAnteHandler() sdk.AnteHandler
func (*EVMD) GetBankKeeper ¶
func (app *EVMD) GetBankKeeper() bankkeeper.Keeper
func (*EVMD) GetBaseApp ¶
GetBaseApp implements the TestingApp interface.
func (*EVMD) GetCallbackKeeper ¶
func (app *EVMD) GetCallbackKeeper() ibccallbackskeeper.ContractKeeper
func (*EVMD) GetConsensusParamsKeeper ¶
func (app *EVMD) GetConsensusParamsKeeper() consensusparamkeeper.Keeper
func (*EVMD) GetDistrKeeper ¶
func (app *EVMD) GetDistrKeeper() distrkeeper.Keeper
func (*EVMD) GetEVMKeeper ¶
func (*EVMD) GetErc20Keeper ¶
func (app *EVMD) GetErc20Keeper() *erc20keeper.Keeper
func (*EVMD) GetEvidenceKeeper ¶
func (app *EVMD) GetEvidenceKeeper() *evidencekeeper.Keeper
func (*EVMD) GetFeeGrantKeeper ¶
func (app *EVMD) GetFeeGrantKeeper() feegrantkeeper.Keeper
func (*EVMD) GetFeeMarketKeeper ¶
func (app *EVMD) GetFeeMarketKeeper() *feemarketkeeper.Keeper
func (*EVMD) GetGovKeeper ¶
func (*EVMD) GetIBCKeeper ¶
GetIBCKeeper implements the TestingApp interface.
func (*EVMD) GetKey ¶
func (app *EVMD) 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 (*EVMD) GetMempool ¶
func (app *EVMD) GetMempool() sdkmempool.ExtMempool
func (*EVMD) GetMintKeeper ¶
func (app *EVMD) GetMintKeeper() mintkeeper.Keeper
func (*EVMD) GetPreciseBankKeeper ¶
func (app *EVMD) GetPreciseBankKeeper() *precisebankkeeper.Keeper
func (*EVMD) GetSlashingKeeper ¶
func (app *EVMD) GetSlashingKeeper() slashingkeeper.Keeper
func (*EVMD) GetStakingKeeper ¶
func (app *EVMD) GetStakingKeeper() *stakingkeeper.Keeper
func (*EVMD) GetStakingKeeperSDK ¶
func (app *EVMD) GetStakingKeeperSDK() stakingkeeper.Keeper
GetStakingKeeperSDK implements the TestingApp interface.
func (*EVMD) GetTransferKeeper ¶
func (app *EVMD) GetTransferKeeper() transferkeeper.Keeper
func (*EVMD) GetTxConfig ¶
GetTxConfig implements the TestingApp interface.
func (*EVMD) InitChainer ¶
func (app *EVMD) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
InitChainer application update at chain initialization
func (*EVMD) InterfaceRegistry ¶
func (app *EVMD) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns EVMD's InterfaceRegistry
func (*EVMD) LegacyAmino ¶
func (app *EVMD) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns EVMD'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 (*EVMD) LoadHeight ¶
LoadHeight loads a particular height
func (*EVMD) PreBlocker ¶
func (app *EVMD) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
func (*EVMD) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*EVMD) RegisterNodeService ¶
func (*EVMD) RegisterPendingTxListener ¶
RegisterPendingTxListener is used by json-rpc server to listen to pending transactions callback.
func (*EVMD) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*EVMD) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
func (EVMD) RegisterUpgradeHandlers ¶
func (app EVMD) RegisterUpgradeHandlers()
func (*EVMD) SetErc20Keeper ¶
func (app *EVMD) SetErc20Keeper(erc20Keeper erc20keeper.Keeper)
func (*EVMD) SetTransferKeeper ¶
func (app *EVMD) SetTransferKeeper(transferKeeper transferkeeper.Keeper)
func (*EVMD) SimulationManager ¶
func (app *EVMD) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface
type GenesisState ¶
type GenesisState map[string]json.RawMessage
GenesisState of the blockchain is represented here as a map of raw json messages key'd by an identifier string. The identifier is used to determine which module genesis information belongs to so it may be appropriately routed during init chain. Within this application default genesis information is retrieved from the ModuleBasicManager which populates json from each BasicModule object provided to it during init.
type SetupOptions ¶
type SetupOptions struct {
Logger log.Logger
DB *dbm.MemDB
AppOpts servertypes.AppOptions
}
SetupOptions defines arguments that are passed into `Simapp` constructor.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
evmd
command
|
|
|
tests
|
|
|
network
Package network implements and exposes a fully operational in-process CometBFT test network that consists of at least one or potentially many validators.
|
Package network implements and exposes a fully operational in-process CometBFT test network that consists of at least one or potentially many validators. |
