sub

package
v0.10.17 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MPL-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const TxDeliverTopic = pubsub.Topic("TxDeliver")

---------------------------------------------------------------------

Variables

This section is empty.

Functions

func Clear

func Clear()

func SetMeta

func SetMeta(height int64, timestamp time.Time, isBreatheBlock bool)

func SubscribeCrossTransferEvent

func SubscribeCrossTransferEvent(sub *pubsub.Subscriber) error

func SubscribeEvent

func SubscribeEvent(sub *pubsub.Subscriber, cfg *config.PublicationConfig) error

func SubscribeMirrorEvent

func SubscribeMirrorEvent(sub *pubsub.Subscriber) error

func SubscribeOracleEvent

func SubscribeOracleEvent(sub *pubsub.Subscriber) error

func SubscribeSlashEvent

func SubscribeSlashEvent(sub *pubsub.Subscriber) error

func SubscribeStakeEvent

func SubscribeStakeEvent(sub *pubsub.Subscriber) error

Types

type CompletedUBD

type CompletedUBD struct {
	Validator sdk.ValAddress
	Delegator sdk.AccAddress
	Amount    sdk.Coin
}

type EventStore

type EventStore struct {
	// store for stake topic
	StakeData *StakeData
	// store for slash topic
	SlashData map[string][]SlashData
	// store for cross chain transfer topic
	CrossTransferData []pubsub.CrossTransferEvent
	// store for mirror topic
	MirrorData []bridge.MirrorEvent
}

type SlashData

type SlashData struct {
	Validator              sdk.ValAddress
	InfractionType         byte
	InfractionHeight       int64
	JailUtil               time.Time
	SlashAmount            int64
	ToFeePool              int64
	Submitter              sdk.AccAddress
	SubmitterReward        int64
	ValidatorsCompensation map[string]int64
}

type StakeData

type StakeData struct {
	// stash for stake topic
	Distribution         map[string][]stake.DistributionData             // ChainId -> []DistributionData
	CompletedUBDs        map[string][]CompletedUBD                       // ChainId -> []CompletedUBD
	CompletedREDs        map[string][]types.DVVTriplet                   // ChainId -> []DVVTriplet
	Validators           map[string]stake.Validator                      // operator(string) -> validator
	RemovedValidators    map[string][]sdk.ValAddress                     // ChainId -> []sdk.ValAddress
	Delegations          map[string]map[string]stake.Delegation          // ChainId -> delegator+validator -> Delegation
	RemovedDelegations   map[string][]types.DVPair                       // ChainId -> []DVPair
	UnbondingDelegations map[string]map[string]stake.UnbondingDelegation // ChainId -> delegator+validator -> UBD
	ReDelegations        map[string]map[string]stake.Redelegation        // ChainId -> delegator+srcValidator+dstValidator -> RED
	DelegateEvents       map[string][]stake.DelegateEvent                // ChainId -> delegate event
	UndelegateEvents     map[string][]stake.UndelegateEvent              // ChainId -> undelegate event
	RedelegateEvents     map[string][]stake.RedelegateEvent              // ChainId -> redelegate event
	ElectedValidators    map[string][]stake.Validator                    // ChainId -> elected validators
}

type ToPublishEvent

type ToPublishEvent struct {
	Height         int64
	Timestamp      time.Time
	IsBreatheBlock bool
	EventData      *EventStore
}

func ToPublish

func ToPublish() *ToPublishEvent

type TxDeliverEvent

type TxDeliverEvent struct{}

func (TxDeliverEvent) GetTopic

func (event TxDeliverEvent) GetTopic() pubsub.Topic

type TxDeliverFailEvent

type TxDeliverFailEvent struct {
	TxDeliverEvent
}

type TxDeliverSuccEvent

type TxDeliverSuccEvent struct {
	TxDeliverEvent
}

Jump to

Keyboard shortcuts

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