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 CreateMinimalConsumerTestGenesis() *ccvtypes.ConsumerGenesisState
- func CreateRandomAccounts(accNum int) []sdk.AccAddress
- func GetMaccPerms() map[string][]string
- func IsModuleWhiteList(typeUrl string) bool
- func IsProposalWhitelisted(content govv1beta1.Content) bool
- func MakeEncodingConfig() params.EncodingConfig
- func SetMasterChefParams(app *ElysApp, ctx sdk.Context)
- func SetParameters(app *ElysApp, ctx sdk.Context)
- func SetPerpetualParams(app *ElysApp, ctx sdk.Context)
- func SetStableStake(app *ElysApp, ctx sdk.Context)
- func SetStakingParam(app *ElysApp, ctx sdk.Context) error
- func SetupAssetProfile(app *ElysApp, ctx sdk.Context)
- type ElysApp
- func (app *ElysApp) AppCodec() codec.Codec
- func (app *ElysApp) AutoCliOpts() autocli.AppOptions
- func (app *ElysApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)
- func (app *ElysApp) BlockedModuleAccountAddrs() map[string]bool
- func (app *ElysApp) Configurator() module.Configurator
- func (app *ElysApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)
- func (app *ElysApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *ElysApp) GetBaseApp() *baseapp.BaseApp
- 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) GetTxConfig() client.TxConfig
- func (app *ElysApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
- 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) OnTxFailed(_ sdk.Context, _, _ string, _ []byte, _ []byte)
- func (app *ElysApp) OnTxSucceeded(_ sdk.Context, _, _ string, _ []byte, _ []byte)
- func (app *ElysApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
- func (app *ElysApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *ElysApp) RegisterNodeService(clientCtx client.Context, config config.Config)
- 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" )
const ( LocalNetVersion = "v999.999.999" NewMaxBytes = 5 * 1024 * 1024 // 5MB )
Variables ¶
var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string )
var NextVersion = "v1.3.0"
make sure to update these when you upgrade the version
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 CreateMinimalConsumerTestGenesis ¶ added in v0.54.0
func CreateMinimalConsumerTestGenesis() *ccvtypes.ConsumerGenesisState
func CreateRandomAccounts ¶ added in v0.45.0
func CreateRandomAccounts(accNum int) []sdk.AccAddress
CreateRandomAccounts is a strategy used by addTestAddrs() in order to generated addresses in random order.
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
func IsModuleWhiteList ¶ added in v0.54.0
This is used for non-legacy gov transactions Returning true cause all txs are whitelisted
func IsProposalWhitelisted ¶ added in v0.54.0
func IsProposalWhitelisted(content govv1beta1.Content) bool
This is used for legacy gov transactions Returning true cause all txs are whitelisted
func MakeEncodingConfig ¶
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates an EncodingConfig for testing
func SetMasterChefParams ¶ added in v0.50.0
func SetParameters ¶ added in v0.50.0
func SetPerpetualParams ¶ added in v0.50.0
func SetStableStake ¶ added in v0.50.0
func SetupAssetProfile ¶ added in v0.50.0
Types ¶
type ElysApp ¶
type ElysApp struct { *baseapp.BaseApp keepers.AppKeepers ModuleBasics module.BasicManager // 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(t *testing.T) (*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, skipUpgradeHeights map[int64]bool, homePath string, appOpts servertypes.AppOptions, 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) AutoCliOpts ¶ added in v0.50.0
func (app *ElysApp) AutoCliOpts() autocli.AppOptions
AutoCliOpts returns the autocli options for the app.
func (*ElysApp) BeginBlocker ¶
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 ¶
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) GetBaseApp ¶ added in v0.50.0
GetBaseApp implements the TestingApp interface.
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) GetTxConfig ¶ added in v0.50.0
GetTxConfig implements the TestingApp interface.
func (*ElysApp) InitChainer ¶
func (app *ElysApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
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) OnTxFailed ¶ added in v0.50.0
func (*ElysApp) OnTxSucceeded ¶ added in v0.50.0
func (*ElysApp) PreBlocker ¶ added in v0.50.0
func (app *ElysApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
PreBlocker application updates every pre block
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, *cmttypes.ValidatorSet, sdk.AccAddress, sdk.ValAddress)
func NewDefaultGenesisState ¶
func NewDefaultGenesisState(app *ElysApp, cdc codec.JSONCodec) GenesisState
NewDefaultGenesisState generates the default state for the application.