app

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 204 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountAddressPrefix = "warden"
	Name                 = "warden"
)

Variables

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

Functions

func AllCapabilities added in v0.3.0

func AllCapabilities() []string

AllCapabilities returns all capabilities available with the current wasmvm See https://github.com/CosmWasm/cosmwasm/blob/main/docs/CAPABILITIES-BUILT-IN.md This functionality is going to be moved upstream: https://github.com/CosmWasm/wasmvm/issues/425

func AppConfig

func AppConfig() depinject.Config

AppConfig returns the default app config.

func BlockedAddresses

func BlockedAddresses() map[string]bool

BlockedAddresses returns all the app's blocked account addresses.

func GetMaccPerms

func GetMaccPerms() map[string][]string

GetMaccPerms returns a copy of the module account permissions

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

func NewAnteHandler added in v0.3.0

func NewAnteHandler(options HandlerOptions) sdk.AnteHandler

NewAnteHandler constructor

func ProvideCustomRegisterCrypto added in v0.5.0

func ProvideCustomRegisterCrypto() runtime.CustomRegisterLegacyAminoCodec

func ProvideCustomRegisterInterfaces added in v0.5.0

func ProvideCustomRegisterInterfaces() runtime.CustomRegisterInterfaces

func ProvideMsgEthereumTxCustomGetSigner added in v0.5.0

func ProvideMsgEthereumTxCustomGetSigner() signing.CustomGetSigner

ProvideMsgEthereumTxCustomGetSigner provides the CustomGetSigners method for the EthereumTx.

func RegisterLegacyModules added in v0.3.0

func RegisterLegacyModules(registry cdctypes.InterfaceRegistry) map[string]appmodule.AppModule

Since the IBC and WASM modules don't support dependency injection, we need to manually register the modules on the client side. This needs to be removed after IBC supports App Wiring.

func ValidateAnteHandlerOptions added in v0.5.0

func ValidateAnteHandlerOptions(options HandlerOptions) error

func WardenProtocolCustomEncoder added in v0.3.0

func WardenProtocolCustomEncoder() wasmkeeper.MessageEncoders

func WardenProtocolCustomQueryPlugin added in v0.4.0

func WardenProtocolCustomQueryPlugin(wardenKeeper wardenkeeper.Keeper) wasmkeeper.QueryPlugins

Types

type App

type App struct {
	*runtime.App

	// keepers
	AccountKeeper         authkeeper.AccountKeeper
	BankKeeper            bankkeeper.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
	AuthzKeeper           authzkeeper.Keeper
	EvidenceKeeper        evidencekeeper.Keeper
	FeeGrantKeeper        feegrantkeeper.Keeper
	GroupKeeper           groupkeeper.Keeper
	ConsensusParamsKeeper consensuskeeper.Keeper
	CircuitBreakerKeeper  circuitkeeper.Keeper

	// IBC
	IBCKeeper           *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
	CapabilityKeeper    *capabilitykeeper.Keeper
	IBCFeeKeeper        ibcfeekeeper.Keeper
	ICAControllerKeeper icacontrollerkeeper.Keeper
	ICAHostKeeper       icahostkeeper.Keeper
	TransferKeeper      keeper.Keeper // for cross-chain fungible token transfers
	IBCHooksKeeper      ibchookskeeper.Keeper
	GmpKeeper           gmpkeeper.Keeper

	// Scoped IBC
	ScopedIBCKeeper           capabilitykeeper.ScopedKeeper
	ScopedIBCTransferKeeper   capabilitykeeper.ScopedKeeper
	ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper
	ScopedICAHostKeeper       capabilitykeeper.ScopedKeeper

	// Wasm
	WasmKeeper       wasmkeeper.Keeper
	ScopedWasmKeeper capabilitykeeper.ScopedKeeper
	ContractKeeper   *wasmkeeper.PermissionedKeeper

	WardenKeeper wardenmodulekeeper.Keeper
	ActKeeper    actmodulekeeper.Keeper

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

	// evmOS
	EvmKeeper       *evmkeeper.Keeper
	FeeMarketKeeper feemarketkeeper.Keeper
	Erc20Keeper     erc20keeper.Keeper

	// IBC Hooks Middleware
	Ics20WasmHooks   *ibchooks.WasmHooks
	HooksICS4Wrapper ibchooks.ICS4Middleware
	// contains filtered or unexported fields
}

App extends an ABCI application, but with most of its parameters exported. They are exported for convenience in creating helper functions, as object capabilities aren't needed for testing.

func New

func New(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	appOpts servertypes.AppOptions,
	wasmOpts []wasmkeeper.Option,
	baseAppOptions ...func(*baseapp.BaseApp),
) (*App, error)

New returns a reference to an initialized App.

func (*App) AppCodec

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

AppCodec returns App'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) ExportAppStateAndValidators

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

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

func (*App) GetCapabilityScopedKeeper

func (app *App) GetCapabilityScopedKeeper(moduleName string) capabilitykeeper.ScopedKeeper

GetCapabilityScopedKeeper returns the capability scoped keeper.

func (*App) GetEvmKeeper added in v0.5.0

func (app *App) GetEvmKeeper(_placeHolder int16) *evmkeeper.Keeper

GetEvmKeeper returns the Evm keeper.

func (*App) GetFeemarketKeeper added in v0.5.0

func (app *App) GetFeemarketKeeper(_placeHolder int32) feemarketkeeper.Keeper

GetFeemarketKeeper returns the Feemarket keeper.

func (*App) GetIBCKeeper

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

GetIBCKeeper returns the IBC keeper.

func (*App) GetKey

func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey

GetKey returns the KVStoreKey for the provided store key.

func (*App) GetMemKey

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

GetMemKey returns the MemoryStoreKey for the provided store key.

func (*App) GetSubspace

func (app *App) GetSubspace(moduleName string) paramstypes.Subspace

GetSubspace returns a param subspace for a given module name.

func (*App) GetTransientKey added in v0.5.0

func (app *App) GetTransientKey(storeKey string) *storetypes.TransientStoreKey

func (*App) GetWasmKeeper added in v0.4.0

func (app *App) GetWasmKeeper() wasmkeeper.Keeper

GetWasmKeeper returns the Wasm keeper.

func (*App) LegacyAmino

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

LegacyAmino returns App'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) RegisterAPIRoutes

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

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

func (*App) SimulationManager

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

SimulationManager implements the SimulationApp interface.

func (*App) TxConfig

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

type AppUpgrade added in v0.4.0

type AppUpgrade struct {
	Name         string
	Handler      upgradetypes.UpgradeHandler
	StoreUpgrade storetypes.StoreUpgrades
}

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 HandlerOptions added in v0.3.0

type HandlerOptions struct {
	ante.HandlerOptions

	IBCKeeper             *keeper.Keeper
	WasmConfig            *wasmTypes.WasmConfig
	WasmKeeper            *wasmkeeper.Keeper
	TXCounterStoreService corestoretypes.KVStoreService
	CircuitKeeper         *circuitkeeper.Keeper

	// evmos
	FeeMarketKeeper    evmante.FeeMarketKeeper
	EvmKeeper          evmante.EVMKeeper
	TxFeeChecker       ante.TxFeeChecker
	AccountKeeper      evmtypes.AccountKeeper
	BankKeeper         evmtypes.BankKeeper
	DistributionKeeper anteutils.DistributionKeeper
	StakingKeeper      anteutils.StakingKeeper
	MaxTxGasWanted     uint64
}

HandlerOptions extend the SDK's AnteHandler options by requiring the IBC channel keeper, wasm keeper and EvmOS keepers.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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