fetch

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Batches

func Batches(client *ethclient.Client, config Config) (totalValid, totalInvalid int)

Batches fetches & stores all transactions sent to the batch inbox address in the given block range (inclusive to exclusive). The transactions & metadata are written to the out directory.

Types

type Config

type Config struct {
	Start, End   uint64
	ChainID      *big.Int
	BatchInbox   common.Address
	BatchSenders map[common.Address]struct{}
	OutDirectory string
}

type TransactionWithMetadata

type TransactionWithMetadata struct {
	TxIndex     uint64             `json:"tx_index"`
	InboxAddr   common.Address     `json:"inbox_address"`
	BlockNumber uint64             `json:"block_number"`
	BlockHash   common.Hash        `json:"block_hash"`
	BlockTime   uint64             `json:"block_time"`
	ChainId     uint64             `json:"chain_id"`
	Sender      common.Address     `json:"sender"`
	ValidSender bool               `json:"valid_sender"`
	Frames      []derive.Frame     `json:"frames"`
	FrameErr    string             `json:"frame_parse_error"`
	ValidFrames bool               `json:"valid_data"`
	Tx          *types.Transaction `json:"tx"`
}

Jump to

Keyboard shortcuts

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