anchortxconstructor

package
v0.0.0-...-9eca280 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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnchorTxConstructor

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

AnchorTxConstructor is responsible for assembling the anchor transaction (TaikoL2.anchor) in each L2 block, which must be the first transaction, and its sender must be the golden touch account.

func New

func New(rpc *rpc.Client) (*AnchorTxConstructor, error)

New creates a new AnchorConstructor instance.

func (*AnchorTxConstructor) AssembleAnchorTx

func (c *AnchorTxConstructor) AssembleAnchorTx(
	ctx context.Context,

	l1Height *big.Int,
	l1Hash common.Hash,

	l2Height *big.Int,
	baseFee *big.Int,
	parentGasUsed uint64,
) (*types.Transaction, error)

AssembleAnchorTx assembles a signed TaikoL2.anchor transaction.

func (*AnchorTxConstructor) AssembleAnchorV2Tx

func (c *AnchorTxConstructor) AssembleAnchorV2Tx(
	ctx context.Context,

	anchorBlockID *big.Int,
	anchorStateRoot common.Hash,
	parentGasUsed uint64,
	baseFeeConfig *bindings.LibSharedDataBaseFeeConfig,

	l2Height *big.Int,
	baseFee *big.Int,
) (*types.Transaction, error)

AssembleAnchorV2Tx assembles a signed TaikoL2.anchorV2 transaction.

Jump to

Keyboard shortcuts

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