Documentation
¶
Overview ¶
Copyright 2022 Evmos Foundation This file is part of the Evmos Network packages.
Evmos is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The Evmos packages are distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the Evmos packages. If not, see https://github.com/evmos/evmos/blob/main/LICENSE
Index ¶
- Constants
- Variables
- func GenesisStateWithValSet(app *Mezo, genesisState simapp.GenesisState, owner sdk.AccAddress, ...) simapp.GenesisState
- func NewDefaultGenesisState() simapp.GenesisState
- func NewTestGenesisState(codec codec.Codec) simapp.GenesisState
- func ObservabilityViews() (views []*view.View)
- func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)
- type ConnectVEExtractionCodec
- type Mezo
- func (app *Mezo) AppCodec() codec.Codec
- func (app *Mezo) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)
- func (app *Mezo) BlockedAddrs() map[string]bool
- func (app *Mezo) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)
- func (app *Mezo) ExportAppStateAndValidators(forZeroHeight bool, _ []string) (servertypes.ExportedApp, error)
- func (app *Mezo) FinalizeBlock(req *abci.RequestFinalizeBlock) (res *abci.ResponseFinalizeBlock, err error)
- func (app *Mezo) GetBaseApp() *baseapp.BaseApp
- func (app *Mezo) GetKeepers() *upgrades.Keepers
- func (app *Mezo) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *Mezo) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *Mezo) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *Mezo) GetTxConfig() client.TxConfig
- func (app *Mezo) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
- func (app *Mezo) InterfaceRegistry() types.InterfaceRegistry
- func (app *Mezo) LegacyAmino() *codec.LegacyAmino
- func (app *Mezo) LoadHeight(height int64) error
- func (app *Mezo) ModuleAccountAddrs() map[string]bool
- func (app *Mezo) Name() string
- func (app *Mezo) PreBlocker(ctx sdk.Context, req *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
- func (app *Mezo) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *Mezo) RegisterNodeService(clientCtx client.Context, cfg config.Config)
- func (app *Mezo) RegisterTendermintService(clientCtx client.Context)
- func (app *Mezo) RegisterTxService(clientCtx client.Context)
Constants ¶
const Name = "mezod"
Name defines the application binary name
Variables ¶
var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string DefaultOracleTimeout = time.Second // 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( consensusparams.AppModuleBasic{}, auth.AppModuleBasic{}, bank.AppModuleBasic{}, poa.AppModuleBasic{}, params.AppModuleBasic{}, crisis.AppModuleBasic{}, authzmodule.AppModuleBasic{}, upgrade.AppModuleBasic{}, evm.AppModuleBasic{}, feemarket.AppModuleBasic{}, bridge.AppModuleBasic{}, marketmap.AppModuleBasic{}, oracle.AppModuleBasic{}, ) )
var ( // MainnetMinGasPrices defines 20B abtc as the minimum gas price value on the fee market module. // See https://commonwealth.im/evmos/discussion/5073-global-min-gas-price-value-for-cosmos-sdk-and-evm-transaction-choosing-a-value for reference MainnetMinGasPrices = sdkmath.LegacyNewDec(20_000_000_000) // MainnetMinGasMultiplier defines the min gas multiplier value on the fee market module. // 50% of the leftover gas will be refunded MainnetMinGasMultiplier = sdkmath.LegacyNewDecWithPrec(5, 1) )
var DefaultConsensusParams = &tmproto.ConsensusParams{ Block: &tmproto.BlockParams{ MaxBytes: 200000, MaxGas: 10000000, }, 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 Mezo testing.
Functions ¶
func GenesisStateWithValSet ¶
func GenesisStateWithValSet( app *Mezo, genesisState simapp.GenesisState, owner sdk.AccAddress, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance, ) simapp.GenesisState
func NewDefaultGenesisState ¶
func NewDefaultGenesisState() simapp.GenesisState
NewDefaultGenesisState generates the default state for the application.
func NewTestGenesisState ¶
func NewTestGenesisState(codec codec.Codec) simapp.GenesisState
NewTestGenesisState generate genesis state with single validator
func ObservabilityViews ¶
Types ¶
type ConnectVEExtractionCodec ¶
type ConnectVEExtractionCodec struct {
// contains filtered or unexported fields
}
func NewConnectVEExtractionCodec ¶
func NewConnectVEExtractionCodec(codec compression.VoteExtensionCodec) *ConnectVEExtractionCodec
func (*ConnectVEExtractionCodec) Decode ¶
func (c *ConnectVEExtractionCodec) Decode(veBytes []byte) (vetypes.OracleVoteExtension, error)
Decode takes a set of vote extension data and returns the OracleVoteExtension
func (*ConnectVEExtractionCodec) Encode ¶
func (c *ConnectVEExtractionCodec) Encode(vetypes.OracleVoteExtension) ([]byte, error)
Encode just passes through to the wrapped VoteExtensionCodec
type Mezo ¶
type Mezo struct { *baseapp.BaseApp // keepers ConsensusParamsKeeper consensusparamskeeper.Keeper AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper PoaKeeper poakeeper.Keeper CrisisKeeper *crisiskeeper.Keeper UpgradeKeeper *upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper AuthzKeeper authzkeeper.Keeper EvmKeeper *evmkeeper.Keeper FeeMarketKeeper feemarketkeeper.Keeper BridgeKeeper bridgekeeper.Keeper OracleKeeper oraclekeeper.Keeper MarketMapKeeper marketmapkeeper.Keeper // contains filtered or unexported fields }
Mezo implements an extended ABCI application. It is an application that may process transactions through Ethereum's EVM running atop of Tendermint consensus.
func EthSetup ¶
func EthSetup(isCheckTx bool, patchGenesis func(*Mezo, simapp.GenesisState) simapp.GenesisState) *Mezo
EthSetup initializes a new MezoApp. A Nop logger is set in MezoApp.
func EthSetupWithDB ¶
func EthSetupWithDB(isCheckTx bool, patchGenesis func(*Mezo, simapp.GenesisState) simapp.GenesisState, db dbm.DB) *Mezo
EthSetupWithDB initializes a new MezoApp. A Nop logger is set in MezoApp.
func NewMezo ¶
func NewMezo( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encodingConfig simappparams.EncodingConfig, ethereumSidecarClient bridgeabci.EthereumSidecarClient, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *Mezo
NewMezo returns a reference to a new initialized Ethermint application.
func Setup ¶
func Setup( isCheckTx bool, feemarketGenesis *feemarkettypes.GenesisState, ) *Mezo
Setup initializes a new Mezo. A Nop logger is set in Mezo.
func (*Mezo) AppCodec ¶
AppCodec returns Mezo'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 (*Mezo) BeginBlocker ¶
func (*Mezo) BlockedAddrs ¶
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*Mezo) ExportAppStateAndValidators ¶
func (app *Mezo) ExportAppStateAndValidators( forZeroHeight bool, _ []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*Mezo) FinalizeBlock ¶
func (app *Mezo) FinalizeBlock(req *abci.RequestFinalizeBlock) ( res *abci.ResponseFinalizeBlock, err error, )
FinalizeBlock method is intentionally decomposed to calculate the transactions per second.
func (*Mezo) GetBaseApp ¶
GetBaseApp implements the TestingApp interface.
func (*Mezo) GetKeepers ¶
func (*Mezo) GetKey ¶
func (app *Mezo) 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 (*Mezo) GetSubspace ¶
func (app *Mezo) 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 (*Mezo) GetTKey ¶
func (app *Mezo) 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 (*Mezo) GetTxConfig ¶
GetTxConfig implements the TestingApp interface.
func (*Mezo) InitChainer ¶
func (app *Mezo) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
InitChainer updates at chain initialization
func (*Mezo) InterfaceRegistry ¶
func (app *Mezo) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns Mezo's InterfaceRegistry
func (*Mezo) LegacyAmino ¶
func (app *Mezo) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns Mezo'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 (*Mezo) LoadHeight ¶
LoadHeight loads state at a particular height
func (*Mezo) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*Mezo) PreBlocker ¶
func (app *Mezo) PreBlocker( ctx sdk.Context, req *abci.RequestFinalizeBlock, ) (*sdk.ResponsePreBlock, error)
func (*Mezo) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*Mezo) RegisterNodeService ¶
RegisterNodeService registers the node gRPC service on the provided application gRPC query router.
func (*Mezo) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*Mezo) RegisterTxService ¶
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package ante defines the SDK auth module's AnteHandler as well as an internal AnteHandler for an Ethereum transaction (i.e MsgEthereumTx).
|
Package ante defines the SDK auth module's AnteHandler as well as an internal AnteHandler for an Ethereum transaction (i.e MsgEthereumTx). |