app

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2024 License: LGPL-3.0 Imports: 128 Imported by: 0

Documentation

Overview

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library 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 Ethermint library is 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 Ethermint library. If not, see https://github.com/Helios-Chain-Labs/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library 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 Ethermint library is 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 Ethermint library. If not, see https://github.com/Helios-Chain-Labs/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library 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 Ethermint library is 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 Ethermint library. If not, see https://github.com/Helios-Chain-Labs/ethermint/blob/main/LICENSE

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultNodeHome default home directories for the application daemon
	DefaultNodeHome string
)

Functions

func DefaultTxExecutor

func DefaultTxExecutor(_ context.Context,
	blockSize int,
	ms storetypes.MultiStore,
	deliverTxWithMultiStore func(int, storetypes.MultiStore) *abci.ExecTxResult,
) ([]*abci.ExecTxResult, error)

func GetMaccPerms

func GetMaccPerms() map[string][]string

GetMaccPerms returns a copy of the module account permissions

func RegisterSwaggerAPI

func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)

RegisterSwaggerAPI registers swagger route with API Server

Types

type EthSignerExtractionAdapter

type EthSignerExtractionAdapter struct {
	// contains filtered or unexported fields
}

EthSignerExtractionAdapter is the default implementation of SignerExtractionAdapter. It extracts the signers from a cosmos-sdk tx via GetSignaturesV2.

func NewEthSignerExtractionAdapter

func NewEthSignerExtractionAdapter(fallback mempool.SignerExtractionAdapter) EthSignerExtractionAdapter

NewEthSignerExtractionAdapter constructs a new EthSignerExtractionAdapter instance

func (EthSignerExtractionAdapter) GetSigners

func (s EthSignerExtractionAdapter) GetSigners(tx sdk.Tx) ([]mempool.SignerData, error)

GetSigners implements the Adapter interface NOTE: only the first item is used by the mempool

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
	ConsensusParamsKeeper consensusparamkeeper.Keeper

	// make scoped keepers public for test purposes
	ScopedIBCKeeper      capabilitykeeper.ScopedKeeper
	ScopedTransferKeeper capabilitykeeper.ScopedKeeper

	// Ethermint keepers
	EvmKeeper       *evmkeeper.Keeper
	FeeMarketKeeper feemarketkeeper.Keeper

	// the module manager
	ModuleManager      *module.Manager
	BasicModuleManager module.BasicManager
	// 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,
	appOpts servertypes.AppOptions,
	baseAppOptions ...func(*baseapp.BaseApp),
) *EthermintApp

NewEthermintApp returns a reference to a new initialized Ethermint application.

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) AutoCliOpts

func (app *EthermintApp) AutoCliOpts() autocli.AppOptions

AutoCliOpts returns the autocli options for the app.

func (*EthermintApp) BeginBlocker

func (app *EthermintApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)

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) Configurator

func (app *EthermintApp) Configurator() module.Configurator

func (*EthermintApp) DefaultGenesis

func (app *EthermintApp) DefaultGenesis() map[string]json.RawMessage

DefaultGenesis returns a default genesis from the registered AppModuleBasic's.

func (*EthermintApp) EncodingConfig

func (app *EthermintApp) EncodingConfig() ethermint.EncodingConfig

func (*EthermintApp) EndBlocker

func (app *EthermintApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)

EndBlocker updates every end block

func (*EthermintApp) ExportAppStateAndValidators

func (app *EthermintApp) ExportAppStateAndValidators(
	forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []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) GetStoreKey

func (app *EthermintApp) GetStoreKey(name string) storetypes.StoreKey

GetStoreKey is used by unit test

func (*EthermintApp) GetStoreKeys

func (app *EthermintApp) GetStoreKeys() []storetypes.StoreKey

GetStoreKeys returns all the stored store keys.

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, error)

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) Name

func (app *EthermintApp) Name() string

Name returns the name of the App

func (*EthermintApp) PreBlocker

PreBlocker updates every pre begin block

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) RegisterNodeService

func (app *EthermintApp) RegisterNodeService(clientCtx client.Context, cfg config.Config)

func (*EthermintApp) RegisterPendingTxListener

func (app *EthermintApp) RegisterPendingTxListener(listener ante.PendingTxListener)

RegisterPendingTxListener is used by json-rpc server to listen to pending transactions callback.

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) RegisterUpgradeHandlers

func (app *EthermintApp) RegisterUpgradeHandlers()

func (*EthermintApp) SimulationManager

func (app *EthermintApp) SimulationManager() *module.SimulationManager

SimulationManager implements the SimulationApp interface

func (*EthermintApp) TxConfig

func (app *EthermintApp) TxConfig() client.TxConfig

type GenesisState

type GenesisState map[string]json.RawMessage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL