ethereum

package
v0.5.39 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSource

func NewSource(config *config.Module, sourceFilter engine.DataSourceFilter, checkpoint *engine.Checkpoint, redisClient rueidis.Client) (engine.DataSource, error)

Types

type Filter

type Filter struct {
	LogAddresses []common.Address `yaml:"log_addresses"`
	LogTopics    []common.Hash    `yaml:"log_topics"`
}

type Option

type Option struct {
	// BlockStart is the block height on Arweave that the worker should start from.
	BlockStart *big.Int `json:"block_start" mapstructure:"block_start"`
	// BlockTarget is the block height on Arweave that the worker should stop at.
	BlockTarget *big.Int `json:"block_target" mapstructure:"block_target"`
	// ConcurrentBlockRequests is the number of blocks to request concurrently.
	ConcurrentBlockRequests *uint64 `json:"concurrent_block_requests" mapstructure:"concurrent_block_requests"`
	// BlockBatchSize is the number of blocks to fetch in a single batch.
	BlockBatchSize *uint `json:"block_batch_size" mapstructure:"block_batch_size"`
	// ReceiptsBatchSize is the number of receipts to fetch in a single batch.
	ReceiptsBatchSize *uint `json:"receipts_batch_size" mapstructure:"receipts_batch_size"`
	// BlockReceiptsBatchSize is the number of block receipts to fetch in a single batch.
	BlockReceiptsBatchSize *uint `json:"block_receipts_batch_size" mapstructure:"block_receipts_batch_size"`
}

func NewOption

func NewOption(n network.Network, parameters *config.Parameters) (*Option, error)

type State

type State struct {
	BlockHash   common.Hash `json:"block_hash"`
	BlockNumber uint64      `json:"block_number"`
}

type Task

type Task struct {
	Network     network.Network
	ChainID     uint64
	Header      *ethereum.Header
	Transaction *ethereum.Transaction
	Receipt     *ethereum.Receipt
}

func (Task) BuildActivity added in v0.4.13

func (t Task) BuildActivity(options ...activityx.Option) (*activityx.Activity, error)

func (Task) GetNetwork

func (t Task) GetNetwork() network.Network

func (Task) GetTimestamp

func (t Task) GetTimestamp() uint64

func (Task) ID

func (t Task) ID() string

func (Task) Validate

func (t Task) Validate() error

Jump to

Keyboard shortcuts

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