> ## 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 | Monad

> Monad API method that creates an EIP-2930 access list for a transaction. Reference for eth_createAccessList on Monad via Chainstack.

Monad API method that creates an EIP-2930 access list for a transaction. This method returns a list of addresses and storage keys that the transaction will access, which can be used to reduce gas costs for subsequent executions.

<Note>
  When called against a block older than the latest \~128 blocks, this method is treated as an archive request (2 RUs instead of 1 RU). See [request units](/docs/request-units#archive-state-methods).
</Note>

## Parameters

* `object` — the transaction call object:
  * `from` (optional) — address the transaction is sent from
  * `to` — address the transaction is directed to
  * `gas` (optional) — gas provided for the call
  * `gasPrice` (optional) — gas price for the call
  * `value` (optional) — value sent with the call
  * `data` (optional) — hash of the method signature and encoded parameters
* `quantity|tag` — the block number as a hexadecimal string, or block tag (`latest`, `earliest`, `pending`).

## Response

* `result` — an object containing:
  * `accessList` — array of access list entries, each with:
    * `address` — the address that will be accessed
    * `storageKeys` — array of storage keys that will be accessed
  * `gasUsed` — the estimated gas used with the access list

## `eth_createAccessList` code examples

<CodeGroup>
  ```javascript ethers.js theme={"system"}
  const { ethers } = require("ethers");

  const provider = new ethers.JsonRpcProvider("CHAINSTACK_NODE_URL");

  async function createAccessList() {
    const tx = {
      to: "0x...", // Contract address
      data: "0x..." // Encoded function call
    };

    const result = await provider.send("eth_createAccessList", [tx, "latest"]);
    console.log("Access list:", result.accessList);
    console.log(`Estimated gas: ${parseInt(result.gasUsed, 16)}`);
  }

  createAccessList();
  ```

  ```python web3.py theme={"system"}
  from web3 import Web3

  node_url = "CHAINSTACK_NODE_URL"

  web3 = Web3(Web3.HTTPProvider(node_url))

  tx = {
      'to': '0x...', # Contract address
      'data': '0x...' # Encoded function call
  }

  result = web3.eth.create_access_list(tx, 'latest')
  print(f'Access list: {result.accessList}')
  print(f'Estimated gas: {result.gasUsed}')
  ```
</CodeGroup>

## Use case

A practical use case for `eth_createAccessList` is optimizing gas costs for complex smart contract interactions by pre-declaring the state that will be accessed, which reduces the cold access gas penalties introduced in EIP-2929.


## OpenAPI

````yaml openapi/monad_node_api/execute_transactions/eth_createAccessList.json POST /
openapi: 3.0.0
info:
  title: Monad Node API
  version: 1.0.0
  description: This is an API for interacting with a Monad node.
servers:
  - url: https://monad-testnet.core.chainstack.com/9c5b265f20b3ea5df4f54f70eb74b800
security: []
paths:
  /:
    post:
      tags:
        - Executing transactions
      summary: eth_createAccessList
      operationId: eth_createAccessList
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_createAccessList
                params:
                  type: array
                  default:
                    - to: '0x0000000000000000000000000000000000000000'
                      data: 0x
                    - latest
      responses:
        '200':
          description: The access list and estimated gas.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object

````