transactions

package
v0.0.0-...-989067b Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const ALPHContractAddressPrefix byte = 3
View Source
const BlockRangeLimit = 5000

Variables

This section is empty.

Functions

This section is empty.

Types

type AlephiumTxInfo

type AlephiumTxInfo struct {
	Inputs []Input `json:"inputs"`
}

type AlephiumWatcher

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

func NewAlephiumWatcher

func NewAlephiumWatcher(
	config *common.ChainConfig,
	nodeUrl string,
	apiKey string,
	logger *zap.Logger,
	blockTxsC chan<- []*BlockTransactions,
	explorerBackendUrl string,
	fromEventIndex uint32,
	pollInterval uint,
) *AlephiumWatcher

func (*AlephiumWatcher) Run

func (w *AlephiumWatcher) Run() func(ctx context.Context) error

type BlockTransactions

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

type BridgeTransaction

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

type EVMWatcher

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

func NewEVMWatcher

func NewEVMWatcher(
	logger *zap.Logger,
	ctx context.Context,
	rpcUrl string,
	chainId vaa.ChainID,
	chainConfig *common.ChainConfig,
	getEventIndex func(context.Context) (*uint32, error),
	blockTxsC chan<- []*BlockTransactions,
) (*EVMWatcher, error)

func (*EVMWatcher) Run

func (w *EVMWatcher) Run() func(ctx context.Context) error

type EventsPerIndex

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

type Input

type Input struct {
	Address string `json:"address"`
}

type TransactionUpdate

type TransactionUpdate struct {
	ID           string      `bson:"_id"`
	TxId         string      `bson:"txId"`
	Address      string      `bson:"address"`
	BlockHash    string      `bson:"blockHash"`
	BlockNumber  uint32      `bson:"blockNumber"`
	EventIndex   uint32      `bson:"eventIndex"`
	Sequence     uint64      `bson:"sequence"`
	EmitterChain vaa.ChainID `bson:"emitterChain"`
	TargetChain  vaa.ChainID `bson:"targetChain"`
	Timestamp    *time.Time  `bson:"timestamp"`
}

type Watcher

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

func NewWatcher

func NewWatcher(logger *zap.Logger, configs *common.BridgeConfig, db *mongo.Database, blockTxsC chan []*BlockTransactions) *Watcher

func (*Watcher) GetLatestEventIndex

func (w *Watcher) GetLatestEventIndex(ctx context.Context, emitterChain vaa.ChainID) (*uint32, error)

func (*Watcher) GetLatestEventIndexAlephium

func (w *Watcher) GetLatestEventIndexAlephium(ctx context.Context) (*uint32, error)

func (*Watcher) GetLatestEventIndexBsc

func (w *Watcher) GetLatestEventIndexBsc(ctx context.Context) (*uint32, error)

func (*Watcher) GetLatestEventIndexEth

func (w *Watcher) GetLatestEventIndexEth(ctx context.Context) (*uint32, error)

func (*Watcher) GetLatestEventIndexEvm

func (w *Watcher) GetLatestEventIndexEvm(ctx context.Context, chainId vaa.ChainID, confirmations uint32) (*uint32, error)

func (*Watcher) Run

func (w *Watcher) Run() func(context.Context) error

Jump to

Keyboard shortcuts

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