app

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: Apache-2.0 Imports: 163 Imported by: 0

Documentation

Index

Constants

View Source
const AppName = "warden"

Variables

This section is empty.

Functions

func NewAvailableStaticPrecompiles added in v0.6.4

func NewAvailableStaticPrecompiles(
	stakingKeeper stakingkeeper.Keeper,
	distributionKeeper distributionkeeper.Keeper,
	bankKeeper cmn.BankKeeper,
	erc20Keeper *erc20Keeper.Keeper,
	transferKeeper *transferkeeper.Keeper,
	channelKeeper *channelkeeper.Keeper,
	evmKeeper *evmkeeper.Keeper,
	govKeeper govkeeper.Keeper,
	slashingKeeper slashingkeeper.Keeper,
	oracleKeeper *oraclekeeper.Keeper,
	codec codec.Codec,
) map[common.Address]vm.PrecompiledContract

NewAvailableStaticPrecompiles returns the list of all available static precompiled contracts from EVM.

NOTE: this should only be used during initialization of the Keeper.

func NewEVMGenesisState added in v0.6.4

func NewEVMGenesisState() *evmtypes.GenesisState

NewEVMGenesisState returns the default genesis state for the EVM module.

func NewErc20GenesisState added in v0.6.4

func NewErc20GenesisState() *erc20types.GenesisState

NewErc20GenesisState returns the default genesis state for the ERC20 module.

NOTE: for the example chain implementation we are also adding a default token pair, which is the base denomination of the chain (i.e. the WEVMOS contract).

func NewFeeMarketGenesisState added in v0.6.4

func NewFeeMarketGenesisState() *feemarkettypes.GenesisState

NewFeeMarketGenesisState returns the default genesis state for the feemarket module.

NOTE: for the example chain implementation we are disabling the base fee.

func NewMintGenesisState added in v0.6.4

func NewMintGenesisState() *minttypes.GenesisState

NewMintGenesisState returns the default genesis state for the mint module.

NOTE: for the example chain implementation we are also adding a default minter.

func NewTxConfig added in v0.6.3

func NewTxConfig() client.TxConfig

NewTxConfig initializes a new TxConfig, equivalent to the one used by App. This is used by the Go client that needs to build and sign Cosmos transactions. Eventually, the Go client will be replaced by EVM clients.

Types

type App

type App struct {
	*baseapp.BaseApp

	// keepers
	AccountKeeper         authkeeper.AccountKeeper
	BankKeeper            bankkeeper.Keeper
	StakingKeeper         *stakingkeeper.Keeper
	SlashingKeeper        slashingkeeper.Keeper
	MintKeeper            mintkeeper.Keeper
	DistrKeeper           distrkeeper.Keeper
	GovKeeper             govkeeper.Keeper
	UpgradeKeeper         *upgradekeeper.Keeper
	AuthzKeeper           authzkeeper.Keeper
	EvidenceKeeper        evidencekeeper.Keeper
	FeeGrantKeeper        feegrantkeeper.Keeper
	ConsensusParamsKeeper consensusparamkeeper.Keeper

	// IBC keepers
	IBCKeeper      *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
	TransferKeeper transferkeeper.Keeper
	CallbackKeeper ibccallbackskeeper.ContractKeeper

	// Cosmos EVM fields
	FeeMarketKeeper   feemarketkeeper.Keeper
	EVMKeeper         *evmkeeper.Keeper
	Erc20Keeper       erc20keeper.Keeper
	PreciseBankKeeper precisebankkeeper.Keeper
	EVMMempool        *evmmempool.ExperimentalEVMMempool

	// Slinky
	OracleKeeper    *oraclekeeper.Keeper
	MarketMapKeeper *marketmapkeeper.Keeper

	// the module manager
	ModuleManager      *module.Manager
	BasicModuleManager module.BasicManager
	// contains filtered or unexported fields
}

func NewApp added in v0.7.0

func NewApp(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	appOpts servertypes.AppOptions,
	baseAppOptions ...func(*baseapp.BaseApp),
) *App

func (*App) AppCodec

func (app *App) AppCodec() codec.Codec

AppCodec returns EVMD'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 (*App) AutoCliOpts added in v0.7.0

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

AutoCliOpts returns the autocli options for the app.

func (*App) BeginBlocker added in v0.7.0

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

BeginBlocker application updates every begin block.

func (*App) Close added in v0.7.0

func (app *App) Close() error

func (*App) Configurator added in v0.7.0

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

func (*App) DefaultGenesis added in v0.6.4

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

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

func (*App) EndBlocker added in v0.7.0

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

EndBlocker application updates every end block.

func (*App) ExportAppStateAndValidators

func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error)

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

func (*App) FinalizeBlock added in v0.7.0

func (app *App) FinalizeBlock(req *abci.RequestFinalizeBlock) (res *abci.ResponseFinalizeBlock, err error)

func (*App) GetAccountKeeper added in v0.7.0

func (app *App) GetAccountKeeper() authkeeper.AccountKeeper

func (*App) GetAnteHandler added in v0.7.0

func (app *App) GetAnteHandler() sdk.AnteHandler

func (*App) GetAuthzKeeper added in v0.7.0

func (app *App) GetAuthzKeeper() authzkeeper.Keeper

func (*App) GetBankKeeper added in v0.7.0

func (app *App) GetBankKeeper() bankkeeper.Keeper

func (*App) GetBaseApp added in v0.7.0

func (app *App) GetBaseApp() *baseapp.BaseApp

GetBaseApp implements the TestingApp interface.

func (*App) GetCallbackKeeper added in v0.7.0

func (app *App) GetCallbackKeeper() ibccallbackskeeper.ContractKeeper

func (*App) GetConsensusParamsKeeper added in v0.7.0

func (app *App) GetConsensusParamsKeeper() consensusparamkeeper.Keeper

func (*App) GetDistrKeeper added in v0.7.0

func (app *App) GetDistrKeeper() distrkeeper.Keeper

func (*App) GetEVMKeeper added in v0.7.0

func (app *App) GetEVMKeeper() *evmkeeper.Keeper

func (*App) GetErc20Keeper added in v0.7.0

func (app *App) GetErc20Keeper() *erc20keeper.Keeper

func (*App) GetEvidenceKeeper added in v0.7.0

func (app *App) GetEvidenceKeeper() *evidencekeeper.Keeper

func (*App) GetFeeGrantKeeper added in v0.7.0

func (app *App) GetFeeGrantKeeper() feegrantkeeper.Keeper

func (*App) GetFeeMarketKeeper added in v0.7.0

func (app *App) GetFeeMarketKeeper() *feemarketkeeper.Keeper

func (*App) GetGovKeeper added in v0.7.0

func (app *App) GetGovKeeper() govkeeper.Keeper

func (*App) GetIBCKeeper

func (app *App) GetIBCKeeper() *ibckeeper.Keeper

GetIBCKeeper implements the TestingApp interface.

func (*App) GetKey

func (app *App) 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 (*App) GetMemKey

func (app *App) GetMemKey(storeKey string) *storetypes.MemoryStoreKey

GetMemKey returns the MemStoreKey for the provided mem key.

NOTE: This is solely used for testing purposes.

func (*App) GetMempool added in v0.7.0

func (app *App) GetMempool() sdkmempool.ExtMempool

func (*App) GetMintKeeper added in v0.7.0

func (app *App) GetMintKeeper() mintkeeper.Keeper

func (*App) GetPreciseBankKeeper added in v0.7.0

func (app *App) GetPreciseBankKeeper() *precisebankkeeper.Keeper

func (*App) GetSlashingKeeper added in v0.7.0

func (app *App) GetSlashingKeeper() slashingkeeper.Keeper

func (*App) GetStakingKeeper added in v0.7.0

func (app *App) GetStakingKeeper() *stakingkeeper.Keeper

func (*App) GetStakingKeeperSDK added in v0.7.0

func (app *App) GetStakingKeeperSDK() stakingkeeper.Keeper

GetStakingKeeperSDK implements the TestingApp interface.

func (*App) GetTKey added in v0.7.0

func (app *App) 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 (*App) GetTransferKeeper added in v0.7.0

func (app *App) GetTransferKeeper() transferkeeper.Keeper

func (*App) GetTxConfig added in v0.7.0

func (app *App) GetTxConfig() client.TxConfig

GetTxConfig implements the TestingApp interface.

func (*App) InitChainer added in v0.7.0

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

InitChainer application update at chain initialization.

func (*App) InterfaceRegistry added in v0.7.0

func (app *App) InterfaceRegistry() types.InterfaceRegistry

InterfaceRegistry returns EVMD's InterfaceRegistry.

func (*App) LegacyAmino

func (app *App) LegacyAmino() *codec.LegacyAmino

LegacyAmino returns EVMD'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 (*App) LoadHeight added in v0.7.0

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

LoadHeight loads a particular height.

func (*App) Name added in v0.7.0

func (app *App) Name() string

Name returns the name of the App.

func (*App) RegisterAPIRoutes

func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)

RegisterAPIRoutes registers all application module routes with the provided API server.

func (*App) RegisterNodeService added in v0.7.0

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

func (*App) RegisterPendingTxListener added in v0.7.0

func (app *App) RegisterPendingTxListener(listener func(common.Hash))

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

func (*App) RegisterTendermintService added in v0.7.0

func (app *App) RegisterTendermintService(clientCtx client.Context)

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*App) RegisterTxService added in v0.7.0

func (app *App) RegisterTxService(clientCtx client.Context)

RegisterTxService implements the Application.RegisterTxService method.

func (App) RegisterUpgradeHandlers added in v0.7.0

func (app App) RegisterUpgradeHandlers()

func (*App) SetClientCtx added in v0.7.0

func (app *App) SetClientCtx(clientCtx client.Context)

func (*App) SetErc20Keeper added in v0.7.0

func (app *App) SetErc20Keeper(erc20Keeper erc20keeper.Keeper)

func (*App) SetTransferKeeper added in v0.7.0

func (app *App) SetTransferKeeper(transferKeeper transferkeeper.Keeper)

func (*App) SimulationManager

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

SimulationManager implements the SimulationApp interface.

func (*App) TxConfig

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

TxConfig returns EVMD's TxConfig.

type GenesisAccount

type GenesisAccount struct {
	*authtypes.BaseAccount

	// vesting account fields
	OriginalVesting  sdk.Coins `json:"original_vesting" yaml:"original_vesting"`   // total vesting coins upon initialization
	DelegatedFree    sdk.Coins `json:"delegated_free" yaml:"delegated_free"`       // delegated vested coins at time of delegation
	DelegatedVesting sdk.Coins `json:"delegated_vesting" yaml:"delegated_vesting"` // delegated vesting coins at time of delegation
	StartTime        int64     `json:"start_time" yaml:"start_time"`               // vesting start time (UNIX Epoch time)
	EndTime          int64     `json:"end_time" yaml:"end_time"`                   // vesting end time (UNIX Epoch time)

	// module account fields
	ModuleName        string   `json:"module_name" yaml:"module_name"`               // name of the module account
	ModulePermissions []string `json:"module_permissions" yaml:"module_permissions"` // permissions of module account
}

GenesisAccount defines a type that implements the GenesisAccount interface to be used for simulation accounts in the genesis state.

func (GenesisAccount) Validate

func (sga GenesisAccount) Validate() error

Validate checks for errors on the vesting and module account parameters.

type GenesisState

type GenesisState map[string]json.RawMessage

GenesisState of the blockchain is represented here as a map of raw json messages key'd by a identifier string. The identifier is used to determine which module genesis information belongs to so it may be appropriately routed during init chain. Within this application default genesis information is retrieved from the ModuleBasicManager which populates json from each BasicModule object provided to it during init.

type SlinkyClient added in v0.6.0

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

func NewSlinkyClient added in v0.6.0

func NewSlinkyClient(
	logger log.Logger,
	chainID string,
	appOpts types.AppOptions,
	stakingKeeper *stakingkeeper.Keeper,
	oracleKeeper *oraclekeeper.Keeper,
) (*SlinkyClient, error)

func (*SlinkyClient) AggregatorFn added in v0.6.0

func (*SlinkyClient) PreblockHandler added in v0.6.0

func (sc *SlinkyClient) PreblockHandler() *oraclepreblock.PreBlockHandler

func (*SlinkyClient) ProposalHandler added in v0.6.0

func (sc *SlinkyClient) ProposalHandler(
	prepareProposalHandler sdk.PrepareProposalHandler,
	processProposalHandler sdk.ProcessProposalHandler,
) *proposals.ProposalHandler

func (*SlinkyClient) VoteExtensionHandler added in v0.6.0

func (sc *SlinkyClient) VoteExtensionHandler() *ve.VoteExtensionHandler

type WardenSlinkyCodec added in v0.6.0

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

WardenSlinkyCodec wraps slinky's codec.VoteExtensionCodec to support our custom vote extension format (vemanager.VE).

func (*WardenSlinkyCodec) Decode added in v0.6.0

Decode a vote extension []byte into a vemanager.VE, then decode the first vote extension item using the wrapped slinky codec.

func (*WardenSlinkyCodec) Encode added in v0.6.0

Directories

Path Synopsis
Package vemanager implements a vote extension manager, which is a way of aggregating multiple vote extensions into a single one.
Package vemanager implements a vote extension manager, which is a way of aggregating multiple vote extensions into a single one.

Jump to

Keyboard shortcuts

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