staking

package
v0.4.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStakingValidators

func GetStakingValidators(ctx context.Context, height int64, status string, stakingClient stakingtypes.QueryClient,
	cdc codec.Codec) ([]stakingtypes.Validator, []types.StakingValidator, error)

GetStakingValidators returns the list of all the validators having the given status at the given height.

func GetValidators

func GetValidators(ctx context.Context, height int64, stakingClient stakingtypes.QueryClient,
	cdc codec.Codec) ([]stakingtypes.Validator, []types.StakingValidator, error)

GetValidators returns the validators list at the given height.

Types

type AccountCache added in v0.3.2

type AccountCache[K, V comparable] interface {
	UpdateCacheValue(K, V) bool
}

type Module

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

func New

func New(b broker, cli *grpcClient.Client, tbM tb.ToBroker, cdc codec.Codec, modules []string, defaultDenom string) *Module

func (*Module) HandleBlock

func (m *Module) HandleBlock(ctx context.Context, block *types.Block) error

func (*Module) HandleGenesis

func (m *Module) HandleGenesis(
	ctx context.Context,
	doc *cometbfttypes.GenesisDoc,
	appState map[string]json.RawMessage,
) error

func (*Module) HandleMessage

func (m *Module) HandleMessage(ctx context.Context, index int, cosmosMsg sdk.Msg, tx *types.Tx) error

func (*Module) HandleValidators

func (m *Module) HandleValidators(ctx context.Context, tmValidators *cometbftcoretypes.ResultValidators) error

HandleValidators handles validators for each block height.

func (*Module) Name

func (m *Module) Name() string

func (*Module) PublishValidatorsData

func (m *Module) PublishValidatorsData(ctx context.Context, sVals []types.StakingValidator) error

PublishValidatorsData produces a message about validator, account and validator info to the broker.

func (*Module) SetAccountCache added in v0.3.2

func (m *Module) SetAccountCache(cache AccountCache[string, int64])

Jump to

Keyboard shortcuts

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