anchorTxConstructor

package
v0.0.0-...-1d04f91 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: MIT Imports: 10 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 (MxcL2.anchor) in each L2 block, which is always the first transaction.

func New

func New(rpc *rpc.Client, signalServiceAddress common.Address) (*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 MxcL2.anchor transaction.

func (*AnchorTxConstructor) GasLimit

func (c *AnchorTxConstructor) GasLimit() uint64

GasLimit returns protocol's anchorTxGasLimit constant.

Jump to

Keyboard shortcuts

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