POST
/
evm
eth_createAccessList
curl --request POST \
  --url https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0x69835D480110e4919B7899f465aAB101e21c8A87",
      "to": "0xb4DcFE4590adBd275aC3Ef1A3dd10e819d11648c",
      "gas": "0x76c0",
      "gasPrice": "0x9184e72a000",
      "value": "0xde0b6b3a7640000",
      "data": "0x"
    },
    "latest"
  ],
  "id": 1
}'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "accessList": [
      {
        "address": "0xb4DcFE4590adBd275aC3Ef1A3dd10e819d11648c",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000000",
          "0x0000000000000000000000000000000000000000000000000000000000000001"
        ]
      }
    ],
    "gasUsed": "0x5208"
  }
}
The 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:
  1. Transaction object — The transaction call object
  2. Block parameter — The block at which to simulate the transaction

Parameter details

Transaction object:
  • from (string, optional) — The address the transaction is sent from
  • to (string, required) — The address the transaction is directed to
  • gas (string, optional) — The gas provided for the transaction execution
  • gasPrice (string, optional) — The gas price for the transaction
  • value (string, optional) — The value sent with this transaction
  • data (string, optional) — The data sent along with the transaction
  • maxFeePerGas (string, optional) — Maximum fee per gas for EIP-1559 transactions
  • maxPriorityFeePerGas (string, optional) — Maximum priority fee per gas for EIP-1559 transactions
Block parameter:
  • 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 entries
    • address — The accessed contract address
    • storageKeys — Array of accessed storage keys for this address
  • gasUsed — The estimated gas used by the transaction with the access list
  • error — 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
Transaction efficiency:
  • Prevents unexpected out-of-gas errors
  • Improves transaction predictability
  • Reduces risk of failed transactions
  • Optimizes complex DeFi interactions

Example request

Shell
curl -X POST https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_createAccessList",
    "params": [
      {
        "from": "0x69835D480110e4919B7899f465aAB101e21c8A87",
        "to": "0xb4DcFE4590adBd275aC3Ef1A3dd10e819d11648c",
        "gas": "0x76c0",
        "gasPrice": "0x9184e72a000",
        "value": "0xde0b6b3a7640000",
        "data": "0x"
      },
      "latest"
    ],
    "id": 1
  }'

Use cases

The eth_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
This method provides crucial gas optimization capabilities, enabling more efficient and cost-effective transactions on the Hyperliquid EVM platform.
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

Response

200
application/json

Successful response with the generated access list

The response is of type object.