app

package
v0.19.9 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: Apache-2.0 Imports: 58 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultCLIHome sets the default home directories for the application CLI
	DefaultCLIHome = os.ExpandEnv("$HOME/.exchaincli")

	// DefaultNodeHome sets the folder where the applcation data and configuration will be stored
	DefaultNodeHome = os.ExpandEnv("$HOME/.exchaind")

	// 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{},
		supply.AppModuleBasic{},
		genutil.AppModuleBasic{},
		bank.AppModuleBasic{},
		staking.AppModuleBasic{},
		mint.AppModuleBasic{},
		distr.AppModuleBasic{},
		gov.NewAppModuleBasic(
			paramsclient.ProposalHandler, distr.ProposalHandler,
			dexclient.DelistProposalHandler, farmclient.ManageWhiteListProposalHandler,
			evmclient.ManageContractDeploymentWhitelistProposalHandler,
			evmclient.ManageContractBlockedListProposalHandler,
		),
		params.AppModuleBasic{},
		crisis.AppModuleBasic{},
		slashing.AppModuleBasic{},
		evidence.AppModuleBasic{},
		upgrade.AppModuleBasic{},
		evm.AppModuleBasic{},

		token.AppModuleBasic{},
		dex.AppModuleBasic{},
		order.AppModuleBasic{},
		backend.AppModuleBasic{},
		stream.AppModuleBasic{},
		debug.AppModuleBasic{},
		ammswap.AppModuleBasic{},
		farm.AppModuleBasic{},
	)

	GlobalGpIndex = GasPriceIndex{}
)

Functions

func GetMaccPerms

func GetMaccPerms() map[string][]string

GetMaccPerms returns a copy of the module account permissions

func NewAccHandler

func NewAccHandler(ak auth.AccountKeeper) sdk.AccHandler

func NewDefaultGenesisState

func NewDefaultGenesisState() simapp.GenesisState

NewDefaultGenesisState generates the default state for the application.

Types

type GasPriceIndex

type GasPriceIndex struct {
	RecommendGp *big.Int `json:"recommend-gp"`
}

func CalBlockGasPriceIndex

func CalBlockGasPriceIndex(blockGasPrice []*big.Int, weight int) GasPriceIndex

type OKExChainApp

type OKExChainApp struct {
	*bam.BaseApp

	// keepers
	AccountKeeper  auth.AccountKeeper
	BankKeeper     bank.Keeper
	SupplyKeeper   supply.Keeper
	StakingKeeper  staking.Keeper
	SlashingKeeper slashing.Keeper
	MintKeeper     mint.Keeper
	DistrKeeper    distr.Keeper
	GovKeeper      gov.Keeper
	CrisisKeeper   crisis.Keeper
	UpgradeKeeper  upgrade.Keeper
	ParamsKeeper   params.Keeper
	EvidenceKeeper evidence.Keeper
	EvmKeeper      *evm.Keeper
	TokenKeeper    token.Keeper
	DexKeeper      dex.Keeper
	OrderKeeper    order.Keeper
	SwapKeeper     ammswap.Keeper
	FarmKeeper     farm.Keeper
	BackendKeeper  backend.Keeper
	StreamKeeper   stream.Keeper
	// contains filtered or unexported fields
}

OKExChainApp implements an extended ABCI application. It is an application that may process transactions through Ethereum's EVM running atop of Tendermint consensus.

func NewOKExChainApp

func NewOKExChainApp(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	skipUpgradeHeights map[int64]bool,
	invCheckPeriod uint,
	baseAppOptions ...func(*bam.BaseApp),
) *OKExChainApp

NewOKExChainApp returns a reference to a new initialized OKExChain application.

func Setup

func Setup(isCheckTx bool) *OKExChainApp

Setup initializes a new OKExChainApp. A Nop logger is set in OKExChainApp.

func (*OKExChainApp) BeginBlock

func (app *OKExChainApp) BeginBlock(req abci.RequestBeginBlock) (res abci.ResponseBeginBlock)

BeginBlock implements the Application interface

func (*OKExChainApp) BeginBlocker

BeginBlocker updates every begin block

func (*OKExChainApp) Codec

func (app *OKExChainApp) Codec() *codec.Codec

Codec returns OKExChain's 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 (*OKExChainApp) Commit

func (app *OKExChainApp) Commit() abci.ResponseCommit

Commit implements the Application interface

func (*OKExChainApp) DeliverTx

func (app *OKExChainApp) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)

func (*OKExChainApp) EndBlock

func (app *OKExChainApp) EndBlock(req abci.RequestEndBlock) (res abci.ResponseEndBlock)

EndBlock implements the Application interface

func (*OKExChainApp) EndBlocker

func (app *OKExChainApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock

EndBlocker updates every end block

func (*OKExChainApp) ExportAppStateAndValidators

func (app *OKExChainApp) ExportAppStateAndValidators(
	forZeroHeight bool, jailWhiteList []string,
) (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)

ExportAppStateAndValidators exports the state of the application for a genesis file.

func (*OKExChainApp) GetKey

func (app *OKExChainApp) GetKey(storeKey string) *sdk.KVStoreKey

GetKey returns the KVStoreKey for the provided store key.

NOTE: This is solely to be used for testing purposes.

func (*OKExChainApp) GetSubspace

func (app *OKExChainApp) GetSubspace(moduleName string) params.Subspace

GetSubspace returns a param subspace for a given module name.

NOTE: This is solely to be used for testing purposes.

func (*OKExChainApp) InitChainer

func (app *OKExChainApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain

InitChainer updates at chain initialization

func (*OKExChainApp) LoadHeight

func (app *OKExChainApp) LoadHeight(height int64) error

LoadHeight loads state at a particular height

func (*OKExChainApp) LoadStartVersion

func (app *OKExChainApp) LoadStartVersion(height int64) error

func (*OKExChainApp) ModuleAccountAddrs

func (app *OKExChainApp) ModuleAccountAddrs() map[string]bool

ModuleAccountAddrs returns all the app's module account addresses.

func (*OKExChainApp) Name

func (app *OKExChainApp) Name() string

Name returns the name of the App

func (*OKExChainApp) SimulationManager

func (app *OKExChainApp) 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).
crypto
hd
rpc
Package rpc contains RPC handler methods, namespaces and utilities to start Ethermint's Web3-compatible JSON-RPC server.
Package rpc contains RPC handler methods, namespaces and utilities to start Ethermint's Web3-compatible JSON-RPC server.

Jump to

Keyboard shortcuts

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