indexer

package
v0.0.0-...-146b0ff Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeSetOperatorFailure               = "set_operator_failure"
	EventTypeUnsetOperatorFailure             = "unset_operator_failure"
	EventTypeSetWithdrawalAddressFailure      = "set_withdrawal_address_failure"
	EventTypeSetRewardAddressFailure          = "set_reward_address_failure"
	EventTypeUpdateValidatorCommissionFailure = "update_validator_commission_failure"
	EventTypeCreateValidatorFailure           = "create_validator_failure"
	EventTypeDelegateFailure                  = "delegate_failure"
	EventTypeRedelegateFailure                = "redelegate_failure"
	EventTypeUndelegateFailure                = "undelegate_failure"
	EventTypeUnjailFailure                    = "unjail_failure"

	EventTypeSetOperatorSuccess               = "set_operator_success"
	EventTypeUnsetOperatorSuccess             = "unset_operator_success"
	EventTypeSetWithdrawalAddressSuccess      = "set_withdrawal_address_success"
	EventTypeSetRewardAddressSuccess          = "set_reward_address_success"
	EventTypeUpdateValidatorCommissionSuccess = "update_validator_commission_success"
	EventTypeCreateValidatorSuccess           = "create_validator_success"
	EventTypeDelegateSuccess                  = "delegate_success"
	EventTypeRedelegateSuccess                = "redelegate_success"
	EventTypeUndelegateSuccess                = "undelegate_success"
	EventTypeUnjailSuccess                    = "unjail_success"

	AttributeKeyErrorCode          = "error_code"
	AttributeKeyTxHash             = "tx_hash"
	AttributeKeyValidatorCmpPubKey = "validator_cmp_pubkey"
	AttributeKeyAmount             = "amount"
	AttributeKeySenderAddress      = "sender_address"
	AttributeKeyDelegatorAddress   = "delegator_addr"
)
View Source
const (
	TypeSetOperator               = "SetOperator"
	TypeUnsetOperator             = "UnsetOperator"
	TypeSetWithdrawalAddress      = "SetWithdrawalAddress"
	TypeSetRewardAddress          = "SetRewardAddress"
	TypeUpdateValidatorCommission = "UpdateValidatorCommission"
	TypeCreateValidator           = "CreateValidator"
	TypeStake                     = "Stake"
	TypeStakeOnBehalf             = "StakeOnBehalf"
	TypeRedelegate                = "Redelegate"
	TypeRedelegateOnBehalf        = "RedelegateOnBehalf"
	TypeUnstake                   = "Unstake"
	TypeUnstakeOnBehalf           = "UnstakeOnBehalf"
	TypeUnjail                    = "Unjail"
	TypeUnjailOnBehalf            = "UnjailOnBehalf"
)
View Source
const (
	WithdrawalTypeUnstake = 0
	WithdrawalTypeReward  = 1
	WithdrawalTypeUBI     = 2
)
View Source
const (
	IndexLag = 10
)

Variables

View Source
var EventType2Behalf = map[string]string{
	TypeStake:      TypeStakeOnBehalf,
	TypeRedelegate: TypeRedelegateOnBehalf,
	TypeUnstake:    TypeUnstakeOnBehalf,
	TypeUnjail:     TypeUnjailOnBehalf,
}

Functions

This section is empty.

Types

type CLBlockIndexer

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

func NewCLBlockIndexer

func NewCLBlockIndexer(ctx context.Context, dbOperator *gorm.DB, cacheOperator *redis.Client, rpcEndpoint string) (*CLBlockIndexer, error)

func (*CLBlockIndexer) Name

func (c *CLBlockIndexer) Name() string

func (*CLBlockIndexer) Run

func (c *CLBlockIndexer) Run()

type CLStakeChange

type CLStakeChange struct {
	BlockHeight       int64
	StakeChangeAmount int64
}

type CLStakingEventIndexer

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

func NewCLStakingEventIndexer

func NewCLStakingEventIndexer(ctx context.Context, dbOperator *gorm.DB, cacheOperator *redis.Client, rpcEndpoint string) (*CLStakingEventIndexer, error)

func (*CLStakingEventIndexer) Name

func (c *CLStakingEventIndexer) Name() string

func (*CLStakingEventIndexer) Run

func (c *CLStakingEventIndexer) Run()

type CLTotalStakeIndexer

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

func NewCLTotalStakeIndexer

func NewCLTotalStakeIndexer(ctx context.Context, dbOperator *gorm.DB, rpcEndpoint string) (*CLTotalStakeIndexer, error)

func (*CLTotalStakeIndexer) Name

func (c *CLTotalStakeIndexer) Name() string

func (*CLTotalStakeIndexer) Run

func (c *CLTotalStakeIndexer) Run()

type CLValidatorVoteIndexer

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

func NewCLValidatorVoteIndexer

func NewCLValidatorVoteIndexer(ctx context.Context, dbOperator *gorm.DB, cacheOperator *redis.Client, rpcEndpoint string) (*CLValidatorVoteIndexer, error)

func (*CLValidatorVoteIndexer) Name

func (c *CLValidatorVoteIndexer) Name() string

func (*CLValidatorVoteIndexer) Run

func (c *CLValidatorVoteIndexer) Run()

type ELBlockIndexer

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

func NewELBlockIndexer

func NewELBlockIndexer(ctx context.Context, dbOperator *gorm.DB, cacheOperator *redis.Client, rpcEndpoint string) (*ELBlockIndexer, error)

func (*ELBlockIndexer) Name

func (e *ELBlockIndexer) Name() string

func (*ELBlockIndexer) Run

func (e *ELBlockIndexer) Run()

type ELRewardIndexer

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

func NewELRewardIndexer

func NewELRewardIndexer(ctx context.Context, dbOperator *gorm.DB, cacheOperator *redis.Client, rpcEndpoint string) (*ELRewardIndexer, error)

func (*ELRewardIndexer) Name

func (e *ELRewardIndexer) Name() string

func (*ELRewardIndexer) Run

func (e *ELRewardIndexer) Run()

type ELStakingEventIndexer

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

func NewELStakingEventIndexer

func NewELStakingEventIndexer(ctx context.Context, dbOperator *gorm.DB, cacheOperator *redis.Client, rpcEndpoint string) (*ELStakingEventIndexer, error)

func (*ELStakingEventIndexer) Name

func (e *ELStakingEventIndexer) Name() string

func (*ELStakingEventIndexer) Run

func (e *ELStakingEventIndexer) Run()

type Indexer

type Indexer interface {
	Run()
	Name() string
}

Directories

Path Synopsis
contract

Jump to

Keyboard shortcuts

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