inputreader

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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