Try it Live
Run Transaction examples in the interactive playground
EIP-1559 Transactions
Dynamic fee market transactions with base fee and priority fee, introduced in London hard fork.Overview
EIP-1559 transactions (Type 2) replace fixed gas price with dynamic fee market. Users specifymaxFeePerGas and maxPriorityFeePerGas, with actual fee determined by block’s base fee.
Type Definition
Creating EIP-1559 Transactions
Fee Market Mechanics
Base Fee
Block base fee adjusts based on block fullness:- Block > 50% full: base fee increases
- Block < 50% full: base fee decreases
- Maximum 12.5% change per block
Effective Gas Price
getEffectiveGasPrice
Calculate effective gas price given base fee.Usage
Fee Estimation
Setting maxFeePerGas
Rule of thumb:maxFeePerGas = baseFee * 2 + maxPriorityFeePerGas
Aggressive vs Conservative
Gas Cost Calculation
RLP Encoding
Methods
Benefits
- Predictable pricing - Base fee makes fees more predictable
- Better UX - Users specify maximum, pay actual
- Faster confirmation - Priority fee for faster inclusion
- ETH burn - Base fee burned, reduces ETH supply
- Less overpaying - Only pay what’s needed
When to Use
Use EIP-1559 for:- Ethereum mainnet (London+)
- Modern L2s with EIP-1559 support
- Applications needing predictable fees
- Networks without EIP-1559
- Specific gas price requirements

