txbuilder

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildBlobTx

func BuildBlobTx(txData *TxMetadata, blobRefs [][]string) (*types.BlobTx, error)

func DynFeeTx

func DynFeeTx(txData *TxMetadata) (*types.DynamicFeeTx, error)

func GenerateCellProofs added in v1.1.3

func GenerateCellProofs(sidecar *types.BlobTxSidecar) ([]kzg4844.Proof, error)

func MarshalBlobV1Tx added in v1.1.2

func MarshalBlobV1Tx(tx *types.Transaction, cellProofs []kzg4844.Proof) ([]byte, error)

func ParseBlobRefsBytes

func ParseBlobRefsBytes(blobRefs []string, tx *types.BlobTx) ([]byte, error)

func SetCodeTx added in v1.1.0

func SetCodeTx(txData *TxMetadata) (*types.SetCodeTx, error)

Types

type BlobCommitment

type BlobCommitment struct {
	Blob          *kzg4844.Blob
	Commitment    kzg4844.Commitment
	Proof         kzg4844.Proof
	VersionedHash common.Hash
}

func EncodeBlob

func EncodeBlob(data []byte) (*BlobCommitment, error)

type TxMetadata

type TxMetadata struct {
	GasTipCap  *uint256.Int // a.k.a. maxPriorityFeePerGas
	GasFeeCap  *uint256.Int // a.k.a. maxFeePerGas
	BlobFeeCap *uint256.Int // a.k.a. maxFeePerBlobGas
	Gas        uint64
	To         *common.Address
	Value      *uint256.Int
	Data       []byte
	AccessList types.AccessList
	AuthList   []types.SetCodeAuthorization
}

Jump to

Keyboard shortcuts

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