staking

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

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

Module represents the x/staking module

func NewModule

func NewModule(
	source stakingsource.Source, cdc codec.Codec, db *database.Db,
) *Module

NewModule returns a new Module instance

func (*Module) GetStakingPool

func (m *Module) GetStakingPool(height int64) (*types.Pool, error)

func (*Module) GetStakingPoolSnapshot

func (m *Module) GetStakingPoolSnapshot(height int64) (*types.PoolSnapshot, error)

func (*Module) GetValidatorsStatuses

func (m *Module) GetValidatorsStatuses(height int64, validators []stakingtypes.Validator) ([]types.ValidatorStatus, error)

func (*Module) GetValidatorsVotingPowers

func (m *Module) GetValidatorsVotingPowers(height int64, vals *tmctypes.ResultValidators) ([]types.ValidatorVotingPower, error)

func (*Module) GetValidatorsWithStatus

func (m *Module) GetValidatorsWithStatus(height int64, status string) ([]stakingtypes.Validator, []types.Validator, error)

GetValidatorsWithStatus returns the list of all the validators having the given status at the given height

func (*Module) HandleBlock

func (m *Module) HandleBlock(
	block *tmctypes.ResultBlock, res *tmctypes.ResultBlockResults, _ []*juno.Tx, vals *tmctypes.ResultValidators,
) error

HandleBlock implements BlockModule

func (*Module) HandleGenesis

func (m *Module) HandleGenesis(doc *tmtypes.GenesisDoc, appState map[string]json.RawMessage) error

HandleGenesis implements GenesisModule

func (*Module) HandleMsg

func (m *Module) HandleMsg(_ int, msg sdk.Msg, tx *juno.Tx) error

HandleMsg implements MessageModule

func (*Module) HandleMsgExec added in v1.0.3

func (m *Module) HandleMsgExec(index int, _ *authz.MsgExec, _ int, executedMsg sdk.Msg, tx *juno.Tx) error

HandleMsgExec implements modules.AuthzMessageModule

func (*Module) Name

func (m *Module) Name() string

Name implements modules.Module

func (*Module) RefreshAllValidatorInfos

func (m *Module) RefreshAllValidatorInfos(height int64) error

RefreshAllValidatorInfos refreshes the info of all the validators at the given height

func (*Module) RefreshValidatorInfos

func (m *Module) RefreshValidatorInfos(height int64, valOper string) error

RefreshValidatorInfos refreshes the info for the validator with the given operator address at the provided height

func (*Module) RegisterPeriodicOperations

func (m *Module) RegisterPeriodicOperations(scheduler *gocron.Scheduler) error

RegisterPeriodicOperations implements modules.PeriodicOperationsModule

func (*Module) StoreValidatorsFromMsgCreateValidator

func (m *Module) StoreValidatorsFromMsgCreateValidator(height int64, msg *stakingtypes.MsgCreateValidator) error

StoreValidatorFromMsgCreateValidator handles properly a MsgCreateValidator instance by saving into the database all the data associated to such validator

func (*Module) UpdateParams

func (m *Module) UpdateParams(height int64) error

UpdateParams gets the updated params and stores them inside the database

func (*Module) UpdateStakingPool

func (m *Module) UpdateStakingPool() error

UpdateStakingPool reads from the LCD the current staking pool and stores its value inside the database

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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