> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# eth_createAccessList | Hyperliquid EVM

> The eth_createAccessList JSON-RPC method generates an access list for a transaction. eth_createAccessList on Hyperliquid EVM via Chainstack.

<Info>
  This method is available on Chainstack. Not all Hyperliquid methods are available on Chainstack, as the open-source node implementation does not support them yet — see [Hyperliquid methods](/docs/hyperliquid-methods) for the full availability breakdown.
</Info>

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.

<Check>
  **Get your own node endpoint today**

  [Start for free](https://console.chainstack.com/) and get your app to production levels immediately. No credit card required.

  You can sign up with your GitHub, X, Google, or Microsoft account.
</Check>

## 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 Shell theme={"system"}
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.

<Note>
  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.
</Note>


## OpenAPI

````yaml /openapi/hyperliquid_node_api/evm_eth_create_access_list.json post /evm
openapi: 3.0.0
info:
  title: Hyperliquid EVM API - eth_createAccessList
  version: 1.0.0
servers:
  - url: >-
      https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274
security: []
paths:
  /evm:
    post:
      summary: eth_createAccessList
      description: Generates an access list for a transaction to optimize gas usage.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - method
                - params
                - id
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  default: '2.0'
                  description: JSON-RPC version
                method:
                  type: string
                  enum:
                    - eth_createAccessList
                  default: eth_createAccessList
                  description: The RPC method name
                params:
                  type: array
                  description: 'Parameters: [transactionObject, block]'
                  default:
                    - from: '0x69835D480110e4919B7899f465aAB101e21c8A87'
                      to: '0xb4DcFE4590adBd275aC3Ef1A3dd10e819d11648c'
                      gas: '0x76c0'
                      gasPrice: '0x9184e72a000'
                      value: '0xde0b6b3a7640000'
                      data: 0x
                    - latest
                id:
                  type: integer
                  default: 1
                  description: Request identifier
            example:
              jsonrpc: '2.0'
              method: eth_createAccessList
              params:
                - from: '0x69835D480110e4919B7899f465aAB101e21c8A87'
                  to: '0xb4DcFE4590adBd275aC3Ef1A3dd10e819d11648c'
                  gas: '0x76c0'
                  gasPrice: '0x9184e72a000'
                  value: '0xde0b6b3a7640000'
                  data: 0x
                - latest
              id: 1
      responses:
        '200':
          description: Successful response with the generated access list
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: JSON-RPC version
                  id:
                    type: integer
                    description: Request identifier
                  result:
                    type: object
                    description: The access list and gas information
                    properties:
                      accessList:
                        type: array
                        description: Array of access list entries
                        items:
                          type: object
                          properties:
                            address:
                              type: string
                              description: The accessed contract address
                            storageKeys:
                              type: array
                              description: Array of accessed storage keys
                              items:
                                type: string
                      gasUsed:
                        type: string
                        description: The estimated gas used with the access list
                      error:
                        type: string
                        description: Error message if transaction would fail
              example:
                jsonrpc: '2.0'
                id: 1
                result:
                  accessList:
                    - address: '0xb4DcFE4590adBd275aC3Ef1A3dd10e819d11648c'
                      storageKeys:
                        - >-
                          0x0000000000000000000000000000000000000000000000000000000000000000
                        - >-
                          0x0000000000000000000000000000000000000000000000000000000000000001
                  gasUsed: '0x5208'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    example: '2.0'
                  id:
                    type: integer
                    example: 1
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: -32602
                      message:
                        type: string
                        example: Invalid params

````