app

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 145 Imported by: 5

Documentation

Index

Constants

View Source
const (
	FlagStartHeight       string = "start-height"
	FlagEnableRepairState string = "enable-repair-state"
)
View Source
const (
	Elapsed = "elapsed"
)

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,
			paramsclient.UpgradeProposalHandler,
			distr.CommunityPoolSpendProposalHandler,
			distr.ChangeDistributionTypeProposalHandler,
			distr.WithdrawRewardEnabledProposalHandler,
			distr.RewardTruncatePrecisionProposalHandler,
			dexclient.DelistProposalHandler, farmclient.ManageWhiteListProposalHandler,
			evmclient.ManageContractDeploymentWhitelistProposalHandler,
			evmclient.ManageContractBlockedListProposalHandler,
			evmclient.ManageContractMethodGuFactorProposalHandler,
			evmclient.ManageContractMethodBlockedListProposalHandler,
			evmclient.ManageSysContractAddressProposalHandler,
			evmclient.ManageContractByteCodeProposalHandler,
			govclient.ManageTreasuresProposalHandler,
			govclient.ModifyNextBlockUpdateProposalHandler,
			erc20client.TokenMappingProposalHandler,
			erc20client.ProxyContractRedirectHandler,
			erc20client.ContractTemplateProposalHandler,
			client.UpdateClientProposalHandler,
			fsclient.FeeSplitSharesProposalHandler,
			wasmclient.MigrateContractProposalHandler,
			wasmclient.UpdateContractAdminProposalHandler,
			wasmclient.PinCodesProposalHandler,
			wasmclient.UnpinCodesProposalHandler,
			wasmclient.UpdateDeploymentWhitelistProposalHandler,
			wasmclient.UpdateWASMContractMethodBlockedListProposalHandler,
			wasmclient.GetCmdExtraProposal,
		),
		params.AppModuleBasic{},
		crisis.AppModuleBasic{},
		slashing.AppModuleBasic{},
		evidence.AppModuleBasic{},
		upgrade.AppModuleBasic{},
		evm.AppModuleBasic{},
		token.AppModuleBasic{},
		dex.AppModuleBasic{},
		order.AppModuleBasic{},
		ammswap.AppModuleBasic{},
		farm.AppModuleBasic{},
		infura.AppModuleBasic{},
		capabilityModule.AppModuleBasic{},
		ibc.AppModuleBasic{},
		ibctransfer.AppModuleBasic{},
		erc20.AppModuleBasic{},
		wasm.AppModuleBasic{},
		feesplit.AppModuleBasic{},
		ica.AppModuleBasic{},
		ibcfee.AppModuleBasic{},
		icamauth.AppModuleBasic{},
	)

	FlagGolangMaxThreads string = "golang-max-threads"
)
View Source
var (
	DefaultElapsedSchemas string
)

Functions

func GetMaccPerms

func GetMaccPerms() map[string][]string

GetMaccPerms returns a copy of the module account permissions

func NewAccNonceHandler added in v1.5.0

func NewAccNonceHandler(ak auth.AccountKeeper) sdk.AccNonceHandler

func NewDefaultGenesisState

func NewDefaultGenesisState() simapp.GenesisState

NewDefaultGenesisState generates the default state for the application.

func NewEvmModuleStopLogic added in v1.5.0

func NewEvmModuleStopLogic(ak *evm.Keeper) sdk.CustomizeOnStop

func NewEvmSysContractAddressHandler added in v1.6.6

func NewEvmSysContractAddressHandler(ak *evm.Keeper) sdk.EvmSysContractAddressHandler

func NewGetBlockConfigHandler added in v1.8.0

func NewGetBlockConfigHandler(pk params.Keeper) sdk.GetBlockConfigHandler

func NewGetGasConfigHandler added in v1.7.6

func NewGetGasConfigHandler(pk params.Keeper) sdk.GetGasConfigHandler

func NewMptCommitHandler added in v1.5.0

func NewMptCommitHandler(ak *evm.Keeper) sdk.MptCommitHandler

func NewUpdateCMTxNonceHandler added in v1.7.0

func NewUpdateCMTxNonceHandler() sdk.UpdateCMTxNonceHandler

func PreRun added in v0.19.14

func PreRun(ctx *server.Context, cmd *cobra.Command) error

func RepairState added in v1.0.0

func RepairState(ctx *server.Context, onStart bool)

Types

type ElapsedTimeInfos added in v0.19.10

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

func (*ElapsedTimeInfos) AddInfo added in v0.19.10

func (e *ElapsedTimeInfos) AddInfo(key string, info string)

func (*ElapsedTimeInfos) Dump added in v0.19.10

func (e *ElapsedTimeInfos) Dump(input interface{})

func (*ElapsedTimeInfos) GetElapsedTime added in v0.19.12

func (e *ElapsedTimeInfos) GetElapsedTime() int64

func (*ElapsedTimeInfos) SetElapsedTime added in v0.19.12

func (e *ElapsedTimeInfos) SetElapsedTime(elapsedTime int64)

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
	WasmKeeper           wasm.Keeper
	WasmPermissionKeeper wasm.ContractOpsKeeper
	InfuraKeeper         infura.Keeper
	FeeSplitKeeper       feesplit.Keeper

	// ibc
	ScopedIBCKeeper      capabilitykeeper.ScopedKeeper
	ScopedTransferKeeper capabilitykeeper.ScopedKeeper
	ScopedIBCMockKeeper  capabilitykeeper.ScopedKeeper
	TransferKeeper       ibctransferkeeper.Keeper
	CapabilityKeeper     *capabilitykeeper.Keeper
	IBCKeeper            *ibc.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
	IBCFeeKeeper         ibcfeekeeper.Keeper

	Erc20Keeper         erc20.Keeper
	ICAMauthKeeper      icamauthkeeper.Keeper
	ICAControllerKeeper icacontrollerkeeper.Keeper
	ICAHostKeeper       icahostkeeper.Keeper
	VMBridgeKeeper      *vmbridge.Keeper

	WasmHandler wasmkeeper.HandlerOption
	// 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, options ...Option) *OKExChainApp

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

func SetupWithGenesisAccounts added in v1.8.0

func SetupWithGenesisAccounts(isCheckTx bool, genAccs []authexported.GenesisAccount, options ...Option) *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) CollectUpgradeModules added in v1.3.0

func (*OKExChainApp) Commit

Commit implements the Application interface

func (*OKExChainApp) DeliverRealTx added in v1.3.0

func (app *OKExChainApp) DeliverRealTx(req abci.TxEssentials) (res abci.ResponseDeliverTx)

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) InitUpgrade added in v1.7.4

func (app *OKExChainApp) InitUpgrade(ctx sdk.Context)

func (*OKExChainApp) LoadHeight

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

LoadHeight loads state at a particular height

func (*OKExChainApp) LoadStartVersion added in v0.19.4

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

func (*OKExChainApp) Marshal added in v1.3.0

func (app *OKExChainApp) Marshal() *codec.CodecProxy

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) PreDeliverRealTx added in v1.3.0

func (app *OKExChainApp) PreDeliverRealTx(req []byte) (res abci.TxEssentials)

func (*OKExChainApp) RegisterTxService added in v1.6.7

func (app *OKExChainApp) RegisterTxService(clientCtx cliContext.CLIContext)

func (*OKExChainApp) SetOption added in v1.0.2

func (app *OKExChainApp) SetOption(req abci.RequestSetOption) (res abci.ResponseSetOption)

func (*OKExChainApp) SimulationManager

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

SimulationManager implements the SimulationApp interface

type Option added in v1.5.0

type Option func(option *SetupOption)

func WithChainId added in v1.5.0

func WithChainId(chainId string) Option

type SchemaConfig added in v1.5.0

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

type SetupOption added in v1.5.0

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

Directories

Path Synopsis
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