Documentation ¶
Index ¶
- Variables
- func GetMaccPerms() map[string][]string
- func NewDefaultGenesisState() simapp.GenesisState
- func NewTestGenesisState(codec codec.Codec) simapp.GenesisState
- func RandomAccounts(r *rand.Rand, n int) []simtypes.Account
- func RandomGenesisAccounts(simState *module.SimulationState) authtypes.GenesisAccounts
- func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)
- func StateFn(cdc codec.JSONCodec, simManager *module.SimulationManager) simtypes.AppStateFn
- type EthermintApp
- func (app *EthermintApp) AppCodec() codec.Codec
- func (app *EthermintApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *EthermintApp) BlockedAddrs() map[string]bool
- func (app *EthermintApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *EthermintApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *EthermintApp) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *EthermintApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *EthermintApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *EthermintApp) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *EthermintApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *EthermintApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *EthermintApp) LegacyAmino() *codec.LegacyAmino
- func (app *EthermintApp) LoadHeight(height int64) error
- func (app *EthermintApp) ModuleAccountAddrs() map[string]bool
- func (app *EthermintApp) Name() string
- func (app *EthermintApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *EthermintApp) RegisterTendermintService(clientCtx client.Context)
- func (app *EthermintApp) RegisterTxService(clientCtx client.Context)
- func (app *EthermintApp) SimulationManager() *module.SimulationManager
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{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic([]govclient.ProposalHandler{ paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, }), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, ibc.AppModuleBasic{}, authzmodule.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, vesting.AppModuleBasic{}, evm.AppModuleBasic{}, feemarket.AppModuleBasic{}, ) )
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 EthermintApp testing.
Functions ¶
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 ¶ added in v0.1.2
func NewTestGenesisState(codec codec.Codec) simapp.GenesisState
NewTestGenesisState generate genesis state with single validator
func RandomAccounts ¶
RandomAccounts creates random accounts with an ethsecp256k1 private key TODO: replace secp256k1.GenPrivKeyFromSecret() with similar function in go-ethereum
func RandomGenesisAccounts ¶
func RandomGenesisAccounts(simState *module.SimulationState) authtypes.GenesisAccounts
RandomGenesisAccounts is used by the auth module to create random genesis accounts in simulation when a genesis.json is not specified. In contrast, the default auth module's RandomGenesisAccounts implementation creates only base accounts and vestings accounts.
func RegisterSwaggerAPI ¶
RegisterSwaggerAPI registers swagger route with API Server
func StateFn ¶
func StateFn(cdc codec.JSONCodec, simManager *module.SimulationManager) simtypes.AppStateFn
StateFn returns the initial application state using a genesis or the simulation parameters. It is a wrapper of simapp.AppStateFn to replace evm param EvmDenom with staking param BondDenom.
Types ¶
type EthermintApp ¶
type EthermintApp struct { *baseapp.BaseApp // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper StakingKeeper stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper MintKeeper mintkeeper.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 EvidenceKeeper evidencekeeper.Keeper TransferKeeper ibctransferkeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper // Ethermint keepers EvmKeeper *evmkeeper.Keeper FeeMarketKeeper feemarketkeeper.Keeper // contains filtered or unexported fields }
EthermintApp implements an extended ABCI application. It is an application that may process transactions through Ethereum's EVM running atop of Tendermint consensus.
func NewEthermintApp ¶
func NewEthermintApp( 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), ) *EthermintApp
NewEthermintApp returns a reference to a new initialized Ethermint application.
func Setup ¶
func Setup(isCheckTx bool, patchGenesis func(*EthermintApp, simapp.GenesisState) simapp.GenesisState) *EthermintApp
Setup initializes a new EthermintApp. A Nop logger is set in EthermintApp.
func SetupWithDB ¶ added in v0.1.2
func SetupWithDB(isCheckTx bool, patchGenesis func(*EthermintApp, simapp.GenesisState) simapp.GenesisState, db dbm.DB) *EthermintApp
SetupWithDB initializes a new EthermintApp. A Nop logger is set in EthermintApp.
func (*EthermintApp) AppCodec ¶
func (app *EthermintApp) AppCodec() codec.Codec
AppCodec returns EthermintApp'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 (*EthermintApp) BeginBlocker ¶
func (app *EthermintApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker updates every begin block
func (*EthermintApp) BlockedAddrs ¶
func (app *EthermintApp) BlockedAddrs() map[string]bool
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*EthermintApp) EndBlocker ¶
func (app *EthermintApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker updates every end block
func (*EthermintApp) ExportAppStateAndValidators ¶
func (app *EthermintApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*EthermintApp) GetKey ¶
func (app *EthermintApp) 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 (*EthermintApp) GetMemKey ¶
func (app *EthermintApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*EthermintApp) GetSubspace ¶
func (app *EthermintApp) 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 (*EthermintApp) GetTKey ¶
func (app *EthermintApp) 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 (*EthermintApp) InitChainer ¶
func (app *EthermintApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer updates at chain initialization
func (*EthermintApp) InterfaceRegistry ¶
func (app *EthermintApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns EthermintApp's InterfaceRegistry
func (*EthermintApp) LegacyAmino ¶
func (app *EthermintApp) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns EthermintApp'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 (*EthermintApp) LoadHeight ¶
func (app *EthermintApp) LoadHeight(height int64) error
LoadHeight loads state at a particular height
func (*EthermintApp) ModuleAccountAddrs ¶
func (app *EthermintApp) ModuleAccountAddrs() map[string]bool
ModuleAccountAddrs returns all the app's module account addresses.
func (*EthermintApp) RegisterAPIRoutes ¶
func (app *EthermintApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*EthermintApp) RegisterTendermintService ¶
func (app *EthermintApp) RegisterTendermintService(clientCtx client.Context)
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*EthermintApp) RegisterTxService ¶
func (app *EthermintApp) RegisterTxService(clientCtx client.Context)
RegisterTxService implements the Application.RegisterTxService method.
func (*EthermintApp) SimulationManager ¶
func (app *EthermintApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface
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). |