inputter

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InputterWorker

type InputterWorker struct {
	Model              Model
	Provider           string
	InputBoxAddress    common.Address
	InputBoxBlock      uint64
	ApplicationAddress common.Address
	Repository         cRepos.InputRepository
}

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

func (*InputterWorker) ReadPastInputs

func (w *InputterWorker) ReadPastInputs(
	ctx context.Context,
	client *ethclient.Client,
	inputBox *contracts.InputBox,
	startBlockNumber uint64,
	endBlockNumber *uint64,
) error

Read inputs starting from the input box deployment block until the latest block.

func (InputterWorker) Start

func (w InputterWorker) Start(ctx context.Context, ready chan<- struct{}) error

func (InputterWorker) String

func (w InputterWorker) String() string

type Model

type Model interface {
	AddAdvanceInput(
		sender common.Address,
		payload []byte,
		blockNumber uint64,
		timestamp time.Time,
		index int,
	) error
}

Jump to

Keyboard shortcuts

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