Ethereum transaction wire-format structs.
These structs represent signed transaction payloads as they appear on the
network (legacy and typed transaction envelopes). They are intentionally
separate from EEVM.TxEnv, which models execution context.
nonce, value, data, access_list, and authorization_list default to
zero or empty. Build an unsigned struct and sign it with
EEVM.Transaction.Signer.sign/3, which also fills in a missing chain_id.
Addresses are integers, as everywhere in eevm: to (nil creates a
contract), access-list entries, and Authorization.address. Access-list
storage keys are integers too; EEVM.Transaction.Envelope converts at the
wire edge. A 20-byte binary address or 32-byte binary storage key is still
accepted for one minor version, but is deprecated.
Fields
Each type's page lists the fields it has. Amounts are in wei.
| Field | Types | Description |
|---|---|---|
chain_id | typed | Chain the transaction is valid on; Signer.sign/3 fills in a nil one from the config |
nonce | all | The sender's account nonce |
gas_price | legacy, access list | Price per unit of gas |
max_fee_per_gas | fee market, blob, set code | Most the sender pays per unit of gas, base fee included (EIP-1559) |
max_priority_fee_per_gas | fee market, blob, set code | Most of that the block producer receives as a tip (EIP-1559) |
gas_limit | all | Gas available to the transaction, intrinsic gas included |
to | all | Recipient address; nil creates a contract (not allowed for blob and set-code transactions) |
value | all | Wei sent to to or to the new contract |
data | all | Calldata, or initcode when to is nil |
access_list | typed | [{address, [storage_key]}] warmed before execution (EIP-2930) |
max_fee_per_blob_gas | blob | Most the sender pays per unit of blob gas (EIP-4844) |
blob_versioned_hashes | blob | 32-byte versioned hashes of the blobs (EIP-4844) |
authorization_list | set code | EEVM.Transaction.Authorization tuples to apply (EIP-7702) |
v | legacy | Signature recovery value: 27/28, or chain_id * 2 + 35/36 with EIP-155 |
y_parity | typed | Signature recovery bit, 0 or 1 |
r, s | all | The secp256k1 signature |
Summary
Types
@type access_list() :: [{address(), [storage_key()]}]
@type address() :: non_neg_integer()
@type authorization_tuple() :: EEVM.Transaction.Authorization.t()
@type hash32() :: <<_::256>>
@type storage_key() :: non_neg_integer()
@type t() :: EEVM.Transaction.Legacy.t() | EEVM.Transaction.AccessList.t() | EEVM.Transaction.FeeMarket.t() | EEVM.Transaction.Blob.t() | EEVM.Transaction.SetCode.t()