inputreader

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2025 License: Apache-2.0 Imports: 11 Imported by: 1 module, 2 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

This section is empty.

Variables

This section is empty.

Functions

func Uint64ToHash added in v0.0.2

func Uint64ToHash(value uint64) *common.Hash

Types

type InputReaderWorker

type InputReaderWorker struct {
	Model           Model
	Provider        string
	InputBoxAddress common.Address
	InputBoxBlock   uint64
	EthClient       *ethclient.Client
}

This worker reads inputs from Ethereum and puts them in the model.

func (*InputReaderWorker) ChainID

func (w *InputReaderWorker) ChainID() (*big.Int, error)

func (InputReaderWorker) FindAllInputsByBlockAndTimestampLT

func (w InputReaderWorker) FindAllInputsByBlockAndTimestampLT(
	ctx context.Context,
	client *ethclient.Client,
	inputBox *contracts.InputBox,
	startBlockNumber uint64,
	endTimestamp uint64,
	appAddresses []common.Address,
) ([]model.InputExtra, error)

func (*InputReaderWorker) GetEthClient

func (w *InputReaderWorker) GetEthClient() (*ethclient.Client, error)

func (InputReaderWorker) String

func (w InputReaderWorker) String() string

type Model

type Model interface {
	AddAdvanceInput(
		sender common.Address,
		payload string,
		blockNumber uint64,
		timestamp time.Time,
		index int,
		prevRandao string,
		appContract common.Address,
		chainId string,
	) error
}

Jump to

Keyboard shortcuts

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