Transaction struct and protocol implementation for Ethereum Improvement Proposal (EIP) 4844 transactions. EIP-4844 introduced "blob-carrying transactions" which contain a large amount of data that cannot be accessed by EVM execution, but whose commitment can be accessed.
Two constraints set this type apart from EIP-1559 transactions:
tois required — contract creation is not allowed in type-3 transactions.blob_versioned_hashesmust contain at least one 32-byte versioned hash.
Transaction envelope only
Only the transaction envelope, which references the blobs by their versioned hashes, is
supported. Building or attaching the blob sidecar (the blobs with their KZG commitments and
proofs) is not, and without a sidecar a type-3 transaction cannot be broadcast: nodes reject
it (e.g. when sent with Ethers.send_transaction/2).
See #178.
Summary
Types
@type t() :: %Ethers.Transaction.Eip4844{ access_list: Ethers.Types.t_access_list(), blob_versioned_hashes: [<<_::256>>], chain_id: non_neg_integer(), gas: non_neg_integer(), input: binary(), max_fee_per_blob_gas: non_neg_integer(), max_fee_per_gas: non_neg_integer(), max_priority_fee_per_gas: non_neg_integer(), nonce: non_neg_integer(), to: Ethers.Types.t_address() | nil, value: non_neg_integer() }
A transaction type following EIP-4844 (Type-3) and incorporating the following fields:
chain_id- chain ID of network where the transaction is to be executednonce- sequence number for the transaction from this sendermax_priority_fee_per_gas- maximum fee per gas (in wei) to give to validators as priority fee (introduced in EIP-1559)max_fee_per_gas- maximum total fee per gas (in wei) willing to pay (introduced in EIP-1559)gas- maximum amount of gas allowed for transaction executionto- destination address for transaction. Required — type-3 transactions cannot create contractsvalue- amount of ether (in wei) to transferinput- data payload of the transactionaccess_list- list of addresses and storage keys to warm up (introduced in EIP-2930), as[address, storage_keys]lists of binaries (seeEthers.Types.t_access_list/0)max_fee_per_blob_gas- maximum fee per blob gas (in wei) willing to pay (introduced in EIP-4844)blob_versioned_hashes- list of versioned hashes (32-byte binaries) of the blobs (introduced in EIP-4844)