Documentation
¶
Index ¶
- Constants
- Variables
- func AddTestAddrs(app *ElysApp, ctx sdk.Context, accNum int, accAmt math.Int) []sdk.AccAddress
- func AddTestCommitment(app *ElysApp, ctx sdk.Context, address sdk.AccAddress, committed sdk.Coins)
- func GetEnabledProposals() []wasmmodule.ProposalType
- func GetMaccPerms() map[string][]string
- func MakeEncodingConfig() params.EncodingConfig
- func SetupHandlers(app *ElysApp)
- type ElysApp
- func (app *ElysApp) AppCodec() codec.Codec
- func (app *ElysApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *ElysApp) BlockedModuleAccountAddrs() map[string]bool
- func (app *ElysApp) Configurator() module.Configurator
- func (app *ElysApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *ElysApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *ElysApp) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *ElysApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *ElysApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *ElysApp) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *ElysApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *ElysApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *ElysApp) LegacyAmino() *codec.LegacyAmino
- func (app *ElysApp) LoadHeight(height int64) error
- func (app *ElysApp) ModuleAccountAddrs() map[string]bool
- func (app *ElysApp) ModuleManager() *module.Manager
- func (app *ElysApp) Name() string
- func (app *ElysApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *ElysApp) RegisterNodeService(clientCtx client.Context)
- func (app *ElysApp) RegisterTendermintService(clientCtx client.Context)
- func (app *ElysApp) RegisterTxService(clientCtx client.Context)
- func (app *ElysApp) SimulationManager() *module.SimulationManager
- func (app *ElysApp) TxConfig() client.TxConfig
- type GenerateAccountStrategy
- type GenesisState
Constants ¶
const ( AccountAddressPrefix = "elys" Name = "elys" // If EnabledSpecificProposals is "", and this is "true", then enable all x/wasm proposals. // If EnabledSpecificProposals is "", and this is not "true", then disable all x/wasm proposals. ProposalsEnabled = "false" // If set to non-empty string it must be comma-separated list of values that are all a subset // of "EnableAllProposals" (takes precedence over ProposalsEnabled) // https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34 EnableSpecificProposals = "" )
const Bech32Prefix = "elys"
Variables ¶
var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string // 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{}, authzmodule.AppModuleBasic{}, genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic(getGovProposalHandlers()), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, groupmodule.AppModuleBasic{}, ibc.AppModuleBasic{}, ibctm.AppModuleBasic{}, solomachine.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, ica.AppModuleBasic{}, ibcfee.AppModuleBasic{}, vesting.AppModuleBasic{}, consensus.AppModuleBasic{}, wasmmodule.AppModuleBasic{}, epochsmodule.AppModuleBasic{}, assetprofilemodule.AppModuleBasic{}, oraclemodule.AppModuleBasic{}, commitmentmodule.AppModuleBasic{}, tokenomicsmodule.AppModuleBasic{}, incentivemodule.AppModuleBasic{}, burnermodule.AppModuleBasic{}, ammmodule.AppModuleBasic{}, parametermodule.AppModuleBasic{}, perpetualmodule.AppModuleBasic{}, accountedpoolmodule.AppModuleBasic{}, transferhook.AppModuleBasic{}, clockmodule.AppModuleBasic{}, stablestake.AppModuleBasic{}, leveragelpmodule.AppModuleBasic{}, masterchefmodule.AppModuleBasic{}, estakingmodule.AppModuleBasic{}, tiermodule.AppModuleBasic{}, ) )
Functions ¶
func AddTestAddrs ¶
AddTestAddrs constructs and returns accNum amount of accounts with an initial balance of accAmt in random order
func AddTestCommitment ¶
Add testing commitments
func GetEnabledProposals ¶ added in v0.10.0
func GetEnabledProposals() []wasmmodule.ProposalType
GetEnabledProposals parses the ProposalsEnabled / EnableSpecificProposals values to produce a list of enabled proposals to pass into wasmd app.
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
func MakeEncodingConfig ¶
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates an EncodingConfig for testing
func SetupHandlers ¶
func SetupHandlers(app *ElysApp)
Types ¶
type ElysApp ¶
type ElysApp struct {
*baseapp.BaseApp
// keepers
AccountKeeper authkeeper.AccountKeeper
AuthzKeeper authzkeeper.Keeper
BankKeeper bankkeeper.Keeper
CapabilityKeeper *capabilitykeeper.Keeper
StakingKeeper *stakingkeeper.Keeper
SlashingKeeper slashingkeeper.Keeper
DistrKeeper distrkeeper.Keeper
GovKeeper govkeeper.Keeper
CrisisKeeper *crisiskeeper.Keeper
UpgradeKeeper *upgradekeeper.Keeper
ParamsKeeper paramskeeper.Keeper
IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
IBCFeeKeeper ibcfeekeeper.Keeper
IBCHooksKeeper *ibchookskeeper.Keeper
EvidenceKeeper evidencekeeper.Keeper
TransferKeeper ibctransferkeeper.Keeper
ICAHostKeeper icahostkeeper.Keeper
FeeGrantKeeper feegrantkeeper.Keeper
GroupKeeper groupkeeper.Keeper
ConsensusParamsKeeper consensusparamkeeper.Keeper
WasmKeeper wasmmodulekeeper.Keeper
// make scoped keepers public for test purposes
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
ScopedTransferKeeper capabilitykeeper.ScopedKeeper
ScopedIBCFeeKeeper capabilitykeeper.ScopedKeeper
ScopedICAHostKeeper capabilitykeeper.ScopedKeeper
ScopedWasmKeeper capabilitykeeper.ScopedKeeper
EpochsKeeper epochsmodulekeeper.Keeper
AssetprofileKeeper assetprofilemodulekeeper.Keeper
ScopedOracleKeeper capabilitykeeper.ScopedKeeper
OracleKeeper oraclekeeper.Keeper
CommitmentKeeper commitmentmodulekeeper.Keeper
TokenomicsKeeper tokenomicsmodulekeeper.Keeper
IncentiveKeeper incentivemodulekeeper.Keeper
BurnerKeeper burnermodulekeeper.Keeper
AmmKeeper ammmodulekeeper.Keeper
ParameterKeeper parametermodulekeeper.Keeper
PerpetualKeeper perpetualmodulekeeper.Keeper
TransferhookKeeper transferhookkeeper.Keeper
ContractKeeper *wasmmodulekeeper.PermissionedKeeper
ClockKeeper clockmodulekeeper.Keeper
AccountedPoolKeeper accountedpoolmodulekeeper.Keeper
StablestakeKeeper stablestakekeeper.Keeper
LeveragelpKeeper leveragelpmodulekeeper.Keeper
MasterchefKeeper masterchefmodulekeeper.Keeper
EstakingKeeper estakingmodulekeeper.Keeper
TierKeeper tiermodulekeeper.Keeper
// Middleware wrapper
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 InitElysTestApp ¶
Initializes a new ElysApp without IBC functionality
func InitElysTestAppWithGenAccount ¶
func InitElysTestAppWithGenAccount() (*ElysApp, sdk.AccAddress, sdk.ValAddress)
Initializes a new ElysApp without IBC functionality and returns genesis account (delegator)
func InitiateNewElysApp ¶
Initiate a new ElysApp object - Common function used by the following 2 functions.
func NewElysApp ¶
func NewElysApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, enabledProposals []wasmmodule.ProposalType, appOpts servertypes.AppOptions, wasmOpts []wasmmodule.Option, baseAppOptions ...func(*baseapp.BaseApp), ) *ElysApp
New returns a reference to an initialized blockchain app
func (*ElysApp) AppCodec ¶
AppCodec returns an 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 (*ElysApp) BeginBlocker ¶
func (app *ElysApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*ElysApp) BlockedModuleAccountAddrs ¶
BlockedModuleAccountAddrs returns all the app's blocked module account addresses.
func (*ElysApp) Configurator ¶ added in v0.10.0
func (app *ElysApp) Configurator() module.Configurator
Configurator get app configurator
func (*ElysApp) EndBlocker ¶
func (app *ElysApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker application updates every end block
func (*ElysApp) ExportAppStateAndValidators ¶
func (app *ElysApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*ElysApp) GetKey ¶
func (app *ElysApp) 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 (*ElysApp) GetMemKey ¶
func (app *ElysApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*ElysApp) GetSubspace ¶
func (app *ElysApp) 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 (*ElysApp) GetTKey ¶
func (app *ElysApp) 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 (*ElysApp) InitChainer ¶
func (app *ElysApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer application update at chain initialization
func (*ElysApp) InterfaceRegistry ¶
func (app *ElysApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns an InterfaceRegistry
func (*ElysApp) LegacyAmino ¶
func (app *ElysApp) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns SimApp'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 (*ElysApp) LoadHeight ¶
LoadHeight loads a particular height
func (*ElysApp) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*ElysApp) ModuleManager ¶
ModuleManager returns the app ModuleManager
func (*ElysApp) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*ElysApp) RegisterNodeService ¶
RegisterNodeService implements the Application.RegisterNodeService method.
func (*ElysApp) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*ElysApp) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
func (*ElysApp) SimulationManager ¶
func (app *ElysApp) SimulationManager() *module.SimulationManager
SimulationManager returns the app SimulationManager
type GenerateAccountStrategy ¶
type GenerateAccountStrategy func(int) []sdk.AccAddress
type GenesisState ¶
type GenesisState map[string]json.RawMessage
The genesis state 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.
func GenesisStateWithValSet ¶
func GenesisStateWithValSet(app *ElysApp) (GenesisState, *tmtypes.ValidatorSet, sdk.AccAddress, sdk.ValAddress)
func NewDefaultGenesisState ¶
func NewDefaultGenesisState(cdc codec.JSONCodec) GenesisState
NewDefaultGenesisState generates the default state for the application.