Docs

eth_createAccessList

Generate an EIP-2930 access list for a transaction on Monad. Optimize gas costs by pre-declaring storage access.

Creates an EIP-2930 access list that you can include in a transaction. This method can help optimize gas costs for complex transactions.

Request

JSON
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0x...",
      "to": "0x...",
      "data": "0x..."
    },
    "latest"
  ],
  "id": 1
}

Parameters

  1. Object - Transaction call object:

    • from (optional): Address the transaction is sent from
    • to: Address the transaction is directed to
    • gas (optional): Integer of gas provided for the transaction execution
    • gasPrice (optional): Integer of gasPrice used for each paid gas
    • value (optional): Integer of value sent with this transaction
    • data (optional): Hash of the method signature and encoded parameters
  2. String|Number - Block number, or the string "latest", "earliest" or "pending"

Response

JSON
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "accessList": [
      {
        "address": "0x...",
        "storageKeys": [
          "0x..."
        ]
      }
    ],
    "gasUsed": "0x..."
  }
}

Response Fields

  • accessList: Array of address and storage key objects
  • gasUsed: Estimated gas used with the access list

Documentation

For more details, see the Monad JSON-RPC documentation.