Try it Live
Run AccessList examples in the interactive playground
Type Definition
Array of items where each item specifies a contract address and storage keys to pre-warm for gas savings.API Methods
Constructors
Type Guards
- is - Check if value is AccessList
- isItem - Check if value is Item
- assertValid - Validate structure
Queries
- includesAddress - Check if address is in list
- includesStorageKey - Check if storage key is in list
- keysFor - Get storage keys for address
- addressCount - Count unique addresses
- storageKeyCount - Count storage keys for address
- isEmpty - Check if list is empty
Manipulation
- withAddress - Add address to list
- withStorageKey - Add storage key to address
- merge - Combine two lists
- deduplicate - Remove duplicate entries
Gas Analysis
- gasCost - Calculate total gas cost
- gasSavings - Calculate potential savings
- hasSavings - Check if savings exceed cost
Conversions
- toBytes - Convert to RLP bytes for transaction encoding
Usage Example
Effect Schema
Optimization
AccessList provides efficient APIs for gas analysis and manipulation.Related
- Fundamentals - Learn access list gas mechanics and use cases
- Transaction - Using access lists in transactions
- Address - Ethereum address primitive
- Keccak256 - 32-byte storage key primitive
Specification
- EIP-2930: Optional Access Lists - Access list specification
- EIP-2929: Gas Cost Increases - Cold vs warm access costs
- EIP-1559: Fee Market Change - Transaction type supporting access lists

