Try it Live
Run Transaction examples in the interactive playground
Transaction Types
Complete type definitions for all Ethereum transaction types.Transaction Type Enum
Type Definitions
Legacy Transaction (Type 0)
Original Ethereum transaction format with fixed gas price.- Uses
vsignature component (bigint) instead ofyParity - Chain ID encoded in
vfor EIP-155 (v = chainId * 2 + 35 + yParity) - Pre-EIP-155 transactions use v = 27 or v = 28
- No access list support
EIP-2930 Transaction (Type 1)
Access list transactions introduced in Berlin hard fork.- Explicit
chainIdfield - Uses
yParity(0 or 1) instead ofv - Includes
accessListfor pre-declaring account/storage access - Still uses fixed
gasPrice
EIP-1559 Transaction (Type 2)
Dynamic fee market transactions introduced in London hard fork.- Uses
maxFeePerGasandmaxPriorityFeePerGasinstead of fixedgasPrice - Effective gas price = min(baseFee + maxPriorityFeePerGas, maxFeePerGas)
- Includes access list support
- Most common transaction type on modern Ethereum
EIP-4844 Transaction (Type 3)
Blob transactions for L2 data availability introduced in Dencun hard fork.tocannot be null (no contract creation with blobs)- Includes
maxFeePerBlobGasfor blob gas pricing blobVersionedHashescontains KZG commitments to blob data- Each blob is 128 KB (131072 bytes)
- Maximum 6 blobs per transaction
- Blob data stored separately from transaction
EIP-7702 Transaction (Type 4)
EOA delegation transactions allowing externally-owned accounts to temporarily act as smart contracts.- Includes
authorizationListfor EOA-to-contract delegations - Each authorization must be signed by the delegating EOA
- Allows EOAs to execute contract logic temporarily
- Delegation is valid only for the transaction duration
Supporting Types
AccessList
Pre-declared account and storage slot access for gas optimization.Authorization
Delegation authorization for EIP-7702 transactions.VersionedHash
KZG commitment hash for EIP-4844 blob transactions.Any Transaction
Union type for all transaction types.Type Guards
Type guards for runtime type checking.Type Comparison
| Feature | Legacy | EIP-2930 | EIP-1559 | EIP-4844 | EIP-7702 |
|---|---|---|---|---|---|
| Type byte | 0x00 | 0x01 | 0x02 | 0x03 | 0x04 |
| Chain ID | In v | Explicit | Explicit | Explicit | Explicit |
| Gas pricing | gasPrice | gasPrice | maxFee + priority | maxFee + priority | maxFee + priority |
| Access list | No | Yes | Yes | Yes | Yes |
| Blob data | No | No | No | Yes | No |
| Authorization | No | No | No | No | Yes |
| Contract creation | Yes | Yes | Yes | No | Yes |
| Signature | v/r/s | yParity/r/s | yParity/r/s | yParity/r/s | yParity/r/s |

