transaction

package
v0.0.0-...-361c26a Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT, MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnretryableSubmission = errors.New("unretryable submission error")
	ZeroAddress              common.Address
)

Functions

This section is empty.

Types

type ProveBlockTxBuilder

type ProveBlockTxBuilder struct {
	// contains filtered or unexported fields
}

ProveBlockTxBuilder is responsible for building ProveBlock transactions.

func NewProveBlockTxBuilder

func NewProveBlockTxBuilder(
	rpc *rpc.Client,
	taikoL1Address common.Address,
	proverSetAddress common.Address,
	guardianProverMajorityAddress common.Address,
	guardianProverMinorityAddress common.Address,
) *ProveBlockTxBuilder

NewProveBlockTxBuilder creates a new ProveBlockTxBuilder instance.

func (*ProveBlockTxBuilder) Build

Build creates a new TaikoL1.ProveBlock transaction with the given nonce.

func (*ProveBlockTxBuilder) BuildProveBlocks

func (a *ProveBlockTxBuilder) BuildProveBlocks(
	batchProof *proofProducer.BatchProofs,
	graffiti [32]byte,
) TxBuilder

BuildProveBlocks creates a new TaikoL1.ProveBlocks transaction.

type Sender

type Sender struct {
	// contains filtered or unexported fields
}

Sender is responsible for sending proof submission transactions with a backoff policy.

func NewSender

func NewSender(
	cli *rpc.Client,
	txmgr *txmgr.SimpleTxManager,
	privateTxmgr *txmgr.SimpleTxManager,
	proverSetAddress common.Address,
	gasLimit uint64,
) *Sender

NewSender creates a new Sener instance.

func (*Sender) Send

func (s *Sender) Send(
	ctx context.Context,
	proofWithHeader *producer.ProofWithHeader,
	buildTx TxBuilder,
) error

Send sends the given proof to the TaikoL1 smart contract with a backoff policy.

func (*Sender) SendBatchProof

func (s *Sender) SendBatchProof(
	ctx context.Context,
	buildTx TxBuilder,
	batchProof *producer.BatchProofs,
) error

func (*Sender) ValidateProof

func (s *Sender) ValidateProof(
	ctx context.Context,
	proofWithHeader *producer.ProofWithHeader,
	latestVerifiedID *big.Int,
) (bool, error)

ValidateProof checks if the proof's corresponding L1 block is still in the canonical chain and if the latest verified head is not ahead of this block proof.

type TxBuilder

type TxBuilder func(txOpts *bind.TransactOpts) (*txmgr.TxCandidate, error)

TxBuilder will build a transaction with the given nonce.

Jump to

Keyboard shortcuts

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