app

package
v0.51.0 Latest Latest
Warning

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

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

README

Dependencies map

Keepers dependencies

commitment -> staking tokenomics -> commitment estaking -> staking, commitment, distr, tokenomics slashing -> estaking amm -> commitment stablestake -> commitment distr -> commitment, estaking masterchef -> tokenomics leveragelp -> stablestake, commitment

Hooks dependencies

staking -> slashing, distr, estaking amm -> perpetual, leveragelp, masterchef epochs -> oracle, commitment, perpetual perpetual -> accountedpool commitment -> estaking stablestake -> masterchef

The deepest stack actions

Eden uncommit

commitment hooks estaking with EdenUncommitted estaking calls commitment with BurnEdenBoost commitment hooks BeforeEdenBCommitChange, BeforeEdenCommitChange, CommitmentChanged estaking hooks staking with BeforeDelegationCreated, BeforeDelegationSharesModified, BeforeDelegationRemoved, AfterDelegationModified staking hooks estaking with AfterDelegationModified staking hooks distr with BeforeDelegationCreated, BeforeDelegationSharesModified, BeforeDelegationRemoved, AfterDelegationModified distr executes rewards claim on BeforeDelegationSharesModified

Elys unstake

staking hooks AfterDelegationModified estaking calls commitment with BurnEdenBoost commitment hooks BeforeEdenBCommitChange, BeforeEdenCommitChange, CommitmentChanged estaking hooks staking with BeforeDelegationCreated, BeforeDelegationSharesModified, BeforeDelegationRemoved, AfterDelegationModified staking hooks estaking with AfterDelegationModified staking hooks distr with BeforeDelegationCreated, BeforeDelegationSharesModified, BeforeDelegationRemoved, AfterDelegationModified distr executes rewards claim on BeforeDelegationSharesModified

Documentation

Index

Constants

View Source
const (
	AccountAddressPrefix = "elys"
	Name                 = "elys"
)
View Source
const (
	LocalNetVersion = "v999.999.999"
	NewMaxBytes     = 5 * 1024 * 1024 // 5MB
)

Variables

View Source
var (
	// DefaultNodeHome default home directories for the application daemon
	DefaultNodeHome string
)
View Source
var NextVersion = "v0.51.0"

make sure to update these when you upgrade the version

Functions

func AddTestAddrs

func AddTestAddrs(app *ElysApp, ctx sdk.Context, accNum int, accAmt math.Int) []sdk.AccAddress

AddTestAddrs constructs and returns accNum amount of accounts with an initial balance of accAmt in random order

func AddTestCommitment

func AddTestCommitment(app *ElysApp, ctx sdk.Context, address sdk.AccAddress, committed sdk.Coins)

Add testing commitments

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

func GetMaccPerms() map[string][]string

GetMaccPerms returns a copy of the module account permissions

func MakeEncodingConfig

func MakeEncodingConfig() params.EncodingConfig

MakeEncodingConfig creates an EncodingConfig for testing

func SetMasterChefParams added in v0.50.0

func SetMasterChefParams(app *ElysApp, ctx sdk.Context)

func SetParameters added in v0.50.0

func SetParameters(app *ElysApp, ctx sdk.Context)

func SetPerpetualParams added in v0.50.0

func SetPerpetualParams(app *ElysApp, ctx sdk.Context)

func SetStableStake added in v0.50.0

func SetStableStake(app *ElysApp, ctx sdk.Context)

func SetStakingParam added in v0.50.0

func SetStakingParam(app *ElysApp, ctx sdk.Context) error

func SetupAssetProfile added in v0.50.0

func SetupAssetProfile(app *ElysApp, ctx sdk.Context)

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

func InitElysTestApp(initChain bool, t *testing.T) *ElysApp

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

func InitiateNewElysApp(t *testing.T) *ElysApp

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

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

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

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

BeginBlocker application updates every begin block

func (*ElysApp) BlockedModuleAccountAddrs

func (app *ElysApp) BlockedModuleAccountAddrs() map[string]bool

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) (sdk.EndBlock, error)

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

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

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

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

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

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

LoadHeight loads a particular height

func (*ElysApp) ModuleAccountAddrs

func (app *ElysApp) ModuleAccountAddrs() map[string]bool

ModuleAccountAddrs returns all the app's module account addresses.

func (*ElysApp) ModuleManager

func (app *ElysApp) ModuleManager() *module.Manager

ModuleManager returns the app ModuleManager

func (*ElysApp) Name

func (app *ElysApp) Name() string

Name returns the name of the App

func (*ElysApp) OnTxFailed added in v0.50.0

func (app *ElysApp) OnTxFailed(_ sdk.Context, _, _ string, _ []byte, _ []byte)

func (*ElysApp) OnTxSucceeded added in v0.50.0

func (app *ElysApp) OnTxSucceeded(_ sdk.Context, _, _ string, _ []byte, _ []byte)

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

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

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

func (*ElysApp) RegisterNodeService

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

RegisterNodeService implements the Application.RegisterNodeService method.

func (*ElysApp) RegisterTendermintService

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

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*ElysApp) RegisterTxService

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

RegisterTxService implements the Application.RegisterTxService method.

func (*ElysApp) SimulationManager

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

SimulationManager returns the app SimulationManager

func (*ElysApp) TxConfig added in v0.10.0

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

TxConfig returns App's TxConfig.

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 NewDefaultGenesisState

func NewDefaultGenesisState(app *ElysApp, cdc codec.JSONCodec) GenesisState

NewDefaultGenesisState generates the default state for the application.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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