tracker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Parachain  = "parachain"
	Relaychain = "relaychain"
	Solo       = "solo"
)

Variables

View Source
var (
	NotfoundXcmMessageErr = errors.New("not found xcm message")
	InvalidDestParaId     = errors.New("invalid dest para id")
)

Functions

func CreateSnapshotClient

func CreateSnapshotClient(endpoint string) (*websocket.PoolConn, *metadata.Instant, func())

func HRMPWatermark

func HRMPWatermark(blockHash string) (int, error)

func ParseAttempted

func ParseAttempted(event Event, index int) (bool, error)

Types

type Block

type Block struct {
	Extrinsics []string `json:"extrinsics"`
}

type BlockData

type BlockData struct {
	Block Block `json:"block"`
}

type Dmp

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

func (*Dmp) Track

func (d *Dmp) Track(ctx context.Context) (*Event, error)

type Enum

type Enum map[string]interface{}

func (Enum) Key

func (e Enum) Key() string

func (Enum) Value

func (e Enum) Value() interface{}

type Event

type Event struct {
	ExtrinsicIdx int          `json:"extrinsic_idx" `
	ModuleId     string       `json:"module_id"  `
	EventId      string       `json:"event_id" `
	Params       []EventParam `json:"params"`
}

func TrackXcmMessage

func TrackXcmMessage(extrinsicIndex string, protocol tx.Protocol, originEndpoint, destEndpoint, relayEndpoint string) (*Event, error)

type EventParam

type EventParam struct {
	Type     string      `json:"type"`
	TypeName string      `json:"type_name,omitempty"`
	Value    interface{} `json:"value"`
	Name     string      `json:"name,omitempty"`
}

type ExtrinsicIndex

type ExtrinsicIndex struct {
	BlockNum uint
	Index    uint
}

type Hrmp

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

func (*Hrmp) Track

func (h *Hrmp) Track(ctx context.Context) (*Event, error)

type ITracker

type ITracker interface {
	Track(ctx context.Context) (*Event, error)
}

type InboundDownwardMessage

type InboundDownwardMessage struct {
	SentAt uint   `json:"sent_at"`
	Msg    string `json:"msg"`
}

func DownwardMessageQueues

func DownwardMessageQueues(paraId uint, blockHash string) ([]InboundDownwardMessage, error)

type Inclusion

type Inclusion struct {
	Descriptor struct {
		ParaHead string `json:"para_head"`
	} `json:"descriptor"`
}

func PendingAvailability

func PendingAvailability(paraId uint, blockHash string) (*Inclusion, error)

type Outcome

type Outcome struct {
	Complete   *interface{} `json:"complete,omitempty"`
	Incomplete *struct {
		Error Enum `json:"Error"`
	} `json:"Incomplete"`
	Error *Enum `json:"error"`
}

type Ump

type Ump struct {
	ExtrinsicIndex string
	OriginEndpoint string
	DestEndpoint   string
}

func (*Ump) Track

func (u *Ump) Track(ctx context.Context) (*Event, error)

Jump to

Keyboard shortcuts

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