Documentation ¶
Index ¶
- Variables
- func GenesisStateWithValSet(app *Evermint, genesisState simapp.GenesisState, valSet *tmtypes.ValidatorSet, ...) simapp.GenesisState
- func GetMaccPerms() map[string][]string
- func NewDefaultGenesisState() simapp.GenesisState
- func NewTestGenesisState(codec codec.Codec) simapp.GenesisState
- func ObservabilityViews() (views []*view.View)
- func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)
- func SetupTestingApp() (ibctesting.TestingApp, map[string]json.RawMessage)
- type Evermint
- func (app *Evermint) AppCodec() codec.Codec
- func (app *Evermint) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *Evermint) BlockedAddrs() map[string]bool
- func (app *Evermint) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
- func (app *Evermint) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *Evermint) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *Evermint) GetBaseApp() *baseapp.BaseApp
- func (app *Evermint) GetIBCKeeper() *ibckeeper.Keeper
- func (app *Evermint) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *Evermint) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *Evermint) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
- func (app *Evermint) GetStakingKeeper() ibctestingtypes.StakingKeeper
- func (app *Evermint) GetStakingKeeperSDK() stakingkeeper.Keeper
- func (app *Evermint) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *Evermint) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *Evermint) GetTxConfig() client.TxConfig
- func (app *Evermint) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *Evermint) InterfaceRegistry() types.InterfaceRegistry
- func (app *Evermint) LegacyAmino() *codec.LegacyAmino
- func (app *Evermint) LoadHeight(height int64) error
- func (app *Evermint) ModuleAccountAddrs() map[string]bool
- func (app *Evermint) Name() string
- func (app *Evermint) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *Evermint) RegisterNodeService(clientCtx client.Context)
- func (app *Evermint) RegisterTendermintService(clientCtx client.Context)
- func (app *Evermint) RegisterTxService(clientCtx client.Context)
- func (app *Evermint) ScheduleForkUpgrade(ctx sdk.Context)
Constants ¶
This section is empty.
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.AppModuleBasic{}, bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic( []govclient.ProposalHandler{ paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, erc20client.RegisterCoinProposalHandler, erc20client.RegisterERC20ProposalHandler, erc20client.ToggleTokenConversionProposalHandler, incentivesclient.RegisterIncentiveProposalHandler, incentivesclient.CancelIncentiveProposalHandler, }, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, ibc.AppModuleBasic{}, ica.AppModuleBasic{}, authzmodule.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{AppModuleBasic: &ibctransfer.AppModuleBasic{}}, vesting.AppModuleBasic{}, evm.AppModuleBasic{}, feemarket.AppModuleBasic{}, inflation.AppModuleBasic{}, erc20.AppModuleBasic{}, incentives.AppModuleBasic{}, epochs.AppModuleBasic{}, claims.AppModuleBasic{}, recovery.AppModuleBasic{}, revenue.AppModuleBasic{}, ) )
var ( // MainnetMinGasPrices defines 20B (20 gas-wei) 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 = sdk.NewDec(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 = sdk.NewDecWithPrec(5, 1) )
var DefaultConsensusParams = &abci.ConsensusParams{ Block: &abci.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 Evermint testing.
var DefaultTestingAppInit func() (ibctesting.TestingApp, map[string]json.RawMessage) = SetupTestingApp
DefaultTestingAppInit defines the IBC application used for testing
var EthDefaultConsensusParams = &abci.ConsensusParams{ Block: &abci.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 Evermint app testing.
Functions ¶
func GenesisStateWithValSet ¶
func GenesisStateWithValSet(app *Evermint, genesisState simapp.GenesisState, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance, ) simapp.GenesisState
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
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 ¶
func RegisterSwaggerAPI ¶
RegisterSwaggerAPI registers swagger route with API Server
func SetupTestingApp ¶
func SetupTestingApp() (ibctesting.TestingApp, map[string]json.RawMessage)
SetupTestingApp initializes the IBC-go testing application
Types ¶
type Evermint ¶
type Evermint 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 IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly ICAHostKeeper icahostkeeper.Keeper EvidenceKeeper evidencekeeper.Keeper TransferKeeper transferkeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper // Ethermint keepers EvmKeeper *evmkeeper.Keeper FeeMarketKeeper feemarketkeeper.Keeper // Evermint keepers InflationKeeper inflationkeeper.Keeper ClaimsKeeper *claimskeeper.Keeper Erc20Keeper erc20keeper.Keeper IncentivesKeeper incentiveskeeper.Keeper EpochsKeeper epochskeeper.Keeper VestingKeeper vestingkeeper.Keeper RecoveryKeeper *recoverykeeper.Keeper RevenueKeeper revenuekeeper.Keeper // contains filtered or unexported fields }
Evermint 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(*Evermint, simapp.GenesisState) simapp.GenesisState) *Evermint
EthSetup initializes a new Evermint app. A Nop logger is set in Evermint app.
func EthSetupWithDB ¶
func EthSetupWithDB(isCheckTx bool, patchGenesis func(*Evermint, simapp.GenesisState) simapp.GenesisState, db dbm.DB) *Evermint
EthSetupWithDB initializes a new Evermint app. A Nop logger is set in Evermint app.
func NewEvermint ¶
func NewEvermint( 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), ) *Evermint
NewEvermint returns a reference to a new initialized Ethermint application.
func Setup ¶
func Setup( isCheckTx bool, feemarketGenesis *feemarkettypes.GenesisState, chainId string, ) *Evermint
Setup initializes a new Evermint. A Nop logger is set in Evermint.
func (*Evermint) AppCodec ¶
AppCodec returns Evermint'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 (*Evermint) BeginBlocker ¶
func (app *Evermint) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker runs the Tendermint 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 (*Evermint) BlockedAddrs ¶
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*Evermint) DeliverTx ¶
func (app *Evermint) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
The DeliverTx method is intentionally decomposed to calculate the transactions per second.
func (*Evermint) EndBlocker ¶
func (app *Evermint) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker updates every end block
func (*Evermint) ExportAppStateAndValidators ¶
func (app *Evermint) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*Evermint) GetBaseApp ¶
GetBaseApp implements the TestingApp interface.
func (*Evermint) GetIBCKeeper ¶
GetIBCKeeper implements the TestingApp interface.
func (*Evermint) GetKey ¶
func (app *Evermint) 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 (*Evermint) GetMemKey ¶
func (app *Evermint) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*Evermint) GetScopedIBCKeeper ¶
func (app *Evermint) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
GetScopedIBCKeeper implements the TestingApp interface.
func (*Evermint) GetStakingKeeper ¶
func (app *Evermint) GetStakingKeeper() ibctestingtypes.StakingKeeper
GetStakingKeeper implements the TestingApp interface.
func (*Evermint) GetStakingKeeperSDK ¶
func (app *Evermint) GetStakingKeeperSDK() stakingkeeper.Keeper
GetStakingKeeperSDK implements the TestingApp interface.
func (*Evermint) GetSubspace ¶
func (app *Evermint) 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 (*Evermint) GetTKey ¶
func (app *Evermint) 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 (*Evermint) GetTxConfig ¶
GetTxConfig implements the TestingApp interface.
func (*Evermint) InitChainer ¶
func (app *Evermint) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer updates at chain initialization
func (*Evermint) InterfaceRegistry ¶
func (app *Evermint) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns Evermint's InterfaceRegistry
func (*Evermint) LegacyAmino ¶
func (app *Evermint) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns Evermint'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 (*Evermint) LoadHeight ¶
LoadHeight loads state at a particular height
func (*Evermint) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*Evermint) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*Evermint) RegisterNodeService ¶
RegisterNodeService registers the node gRPC service on the provided application gRPC query router.
func (*Evermint) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*Evermint) RegisterTxService ¶
func (*Evermint) ScheduleForkUpgrade ¶
ScheduleForkUpgrade executes any necessary fork logic for based upon the current block height and chain ID (mainnet or testnet). It sets an upgrade plan once the chain reaches the pre-defined upgrade height.
CONTRACT: for this logic to work properly it is required to:
- Release a non-breaking patch version so that the chain can set the scheduled upgrade plan at upgrade-height.
- Release the software defined in the upgrade-info
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). |
upgrades
|
|