eth_createAccessList
JSON-RPC method generates an access list for a transaction. This method simulates a transaction execution to determine which storage slots and addresses will be accessed, enabling more efficient gas usage through EIP-2930 access lists.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
The method takes two parameters:- Transaction object — The transaction call object
- Block parameter — The block at which to simulate the transaction
Parameter details
Transaction object:from
(string, optional) — The address the transaction is sent fromto
(string, required) — The address the transaction is directed togas
(string, optional) — The gas provided for the transaction executiongasPrice
(string, optional) — The gas price for the transactionvalue
(string, optional) — The value sent with this transactiondata
(string, optional) — The data sent along with the transactionmaxFeePerGas
(string, optional) — Maximum fee per gas for EIP-1559 transactionsmaxPriorityFeePerGas
(string, optional) — Maximum priority fee per gas for EIP-1559 transactions
block
(string, required) — Block identifier:"latest"
(only the latest block is supported on Hyperliquid)
Response
The method returns an access list and estimated gas for the transaction.Response structure
Access list result:accessList
— Array of access list entriesaddress
— The accessed contract addressstorageKeys
— Array of accessed storage keys for this address
gasUsed
— The estimated gas used by the transaction with the access listerror
— Error message if the transaction would fail
Access list benefits
Gas optimization:- Reduces gas costs for cross-contract calls
- Pre-declares state access for more predictable pricing
- Enables gas savings of up to 2400 gas per address
- Saves 2100 gas per storage key on first access
- Prevents unexpected out-of-gas errors
- Improves transaction predictability
- Reduces risk of failed transactions
- Optimizes complex DeFi interactions
Example request
Shell
Use cases
Theeth_createAccessList
method is essential for applications that need to:
- Gas optimization: Generate access lists to reduce transaction gas costs
- DeFi protocols: Optimize complex multi-contract interactions
- Smart wallets: Provide users with gas-efficient transaction options
- MEV protection: Create more predictable transaction execution paths
- Transaction builders: Construct optimized transactions for users
- Aggregators: Optimize routing through multiple protocols
- Arbitrage bots: Minimize gas costs for profitable trades
- Liquidation systems: Ensure efficient liquidation transactions
- Cross-contract calls: Optimize interactions between multiple contracts
- Token swaps: Reduce gas costs for swap transactions
- Yield farming: Optimize complex farming strategies
- Governance systems: Reduce voting transaction costs
- Batch operations: Optimize batched transaction execution
- Bridge protocols: Minimize cross-chain transaction costs
- Oracle systems: Optimize oracle update transactions
- NFT marketplaces: Reduce gas for complex NFT operations
- Lending protocols: Optimize lending and borrowing transactions
- Insurance platforms: Reduce claim processing costs
- Payment systems: Optimize payment routing
- Staking operations: Minimize staking transaction costs
- Development tools: Test and optimize contract interactions
- Analytics platforms: Analyze access patterns and costs
- Security tools: Identify potential attack vectors
- Testing frameworks: Simulate transactions efficiently
- Integration services: Provide optimized transaction APIs
Access lists are particularly beneficial for transactions that interact with multiple contracts or access many storage slots. The gas savings can be significant for complex DeFi operations, but may not be worth it for simple transfers. Always test both with and without access lists to determine the most cost-effective approach.
Body
application/json