elderberry

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: AGPL-3.0, AGPL-3.0-or-later Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidInitialBatchNumber is returned when the initial batch number is not the expected one
	ErrInvalidInitialBatchNumber = errors.New("invalid initial batch number")
)

Functions

This section is empty.

Types

type PreviousProcessor

type PreviousProcessor interface {
	Process(ctx context.Context, order etherman.Order, l1Block *etherman.Block, dbTx pgx.Tx) error
	ProcessSequenceBatches(ctx context.Context, sequencedBatches []etherman.SequencedBatch, blockNumber uint64, l1BlockTimestamp time.Time, dbTx pgx.Tx) error
}

PreviousProcessor is the interface that the previous processor (Etrog)

type ProcessorL1InitialSequenceBatchesElderberry

type ProcessorL1InitialSequenceBatchesElderberry struct {
	actions.ProcessorBase[ProcessorL1InitialSequenceBatchesElderberry]
	// contains filtered or unexported fields
}

ProcessorL1InitialSequenceBatchesElderberry is the processor for SequenceBatches for Elderberry intialSequence is process in ETROG by the same class, this is just a wrapper to pass directly to ETROG

func NewProcessorL1InitialSequenceBatchesElderberry

func NewProcessorL1InitialSequenceBatchesElderberry(previousProcessor actions.L1EventProcessor) *ProcessorL1InitialSequenceBatchesElderberry

NewProcessorL1InitialSequenceBatchesElderberry returns instance of a processor for InitialSequenceBatchesOrder

func (*ProcessorL1InitialSequenceBatchesElderberry) Process

func (g *ProcessorL1InitialSequenceBatchesElderberry) Process(ctx context.Context, order etherman.Order, l1Block *etherman.Block, dbTx pgx.Tx) error

Process process event

type ProcessorL1SequenceBatchesElderberry

type ProcessorL1SequenceBatchesElderberry struct {
	actions.ProcessorBase[ProcessorL1SequenceBatchesElderberry]
	// contains filtered or unexported fields
}

ProcessorL1SequenceBatchesElderberry is the processor for SequenceBatches for Elderberry

func NewProcessorL1SequenceBatchesElderberry

func NewProcessorL1SequenceBatchesElderberry(previousProcessor PreviousProcessor, state StateL1SequenceBatchesElderberry) *ProcessorL1SequenceBatchesElderberry

NewProcessorL1SequenceBatchesElderberry returns instance of a processor for SequenceBatchesOrder

func (*ProcessorL1SequenceBatchesElderberry) Process

func (g *ProcessorL1SequenceBatchesElderberry) Process(ctx context.Context, order etherman.Order, l1Block *etherman.Block, dbTx pgx.Tx) error

Process process event

type StateL1SequenceBatchesElderberry

type StateL1SequenceBatchesElderberry interface {
	GetLastVirtualBatchNum(ctx context.Context, dbTx pgx.Tx) (uint64, error)
	GetLastL2BlockByBatchNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) (*state.L2Block, error)
}

StateL1SequenceBatchesElderberry state interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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