Skip to content

eth_createAccessList ​

served · same as reth

Runs a call and returns the addresses and storage slots that it touches, as an EIP-2930 access list.

When to use ​

Use it to add an access list to a transaction. A good access list can make the transaction a little cheaper.

Example ​

bash
curl -s -X POST -H 'Content-Type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "eth_createAccessList", "params": [{"to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "data": "0x18160ddd"}, "0x18facad"]}' \
  http://127.0.0.1:8547
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
      "data": "0x18160ddd"
    },
    "0x18facad"
  ]
}

Response ​

Live mainnet, block 26193069, 2026-10-14. Checked against reth 2.7: equal.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "accessList": [
      {
        "address": "0x43506849d7c04f9138d1a2050bbf3a0c054402dd",
        "storageKeys": []
      },
      {
        "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "storageKeys": [
          "0x000000000000000000000000000000000000000000000000000000000000000b",
          "0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b",
          "0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3"
        ]
      }
    ],
    "gasUsed": "0x7ff7"
  }
}

Full response

Parameters ​

NameTypeRequiredMeaning
callobject, see Transaction call objectyesThe transaction to run.
blockblock number in hex, or a tag, see Block parameternoThe block whose state the call uses. The head or one of the 128 blocks before it. Default: latest.
stateOverridesobject, see State overridenoChanges to the state before the call.

The main fields of call. The Transaction call object page has all of them.

FieldTypeMeaning
fromaddressThe sender. Default: the zero address.
toaddressThe contract or account to call. Leave it out to deploy the code in input.
gashex numberThe gas limit. Default: the gas cap of the node (--rpc-gascap, 50 000 000). A larger value gets the gas cap.
inputhex dataThe call data: the function selector and the arguments. data is also accepted. If both are present and not equal, the call gives -32602, as in reth. eth_simulateV1 then uses input.

Returns ​

An object with accessList (a list of address and storageKeys), gasUsed with that list, and error when the call failed.

Notes and limits ​

  • The list does not include the sender, the recipient or the precompiled contracts.
  • The node sorts the list by address, and the slots of each address in byte order.

Errors ​

CodeMessageWhen
-32003insufficient funds for gas * price + value: have X want YThe value is above the balance. The call has a gas price and no gas.
-32000max fee per gas less than block base feemaxFeePerGas is below the base fee. When maxFeePerGas and the tip are both 0, this error does not occur.
-32003max priority fee per gas higher than max fee per gasmaxPriorityFeePerGas is above maxFeePerGas.
-32602both gasPrice and (maxFeePerGas or maxPriorityFeePerGas) specifiedThe call has gasPrice and also an EIP-1559 or blob fee field.
-32003blob transaction missing blob hashesThe call has maxFeePerBlobGas but no blob hashes, or blobVersionedHashes is empty.
-32602Invalid paramsA fee value is larger than 128 bits. data gives the value and its column.
-32602Invalid paramsA parameter is missing or does not parse. data has the text of reth, with the position.

Compared with reth ​

The rules come from the access list inspector of reth (revm-inspectors).

The live example above gives the same answer on Cinder and on reth 2.7.

eth_estimateGas, eth_call.

Schema (OpenRPC) ​

The official specification: eth_createAccessList in ethereum/execution-apis.

Parameter Transaction: object
json
{
  "additionalProperties": false,
  "properties": {
    "accessList": {
      "description": "EIP-2930 access list",
      "items": {
        "additionalProperties": false,
        "properties": {
          "address": {
            "pattern": "^0x[0-9a-fA-F]{40}$",
            "title": "hex encoded address",
            "type": "string"
          },
          "storageKeys": {
            "items": {
              "pattern": "^0x[0-9a-f]{64}$",
              "title": "32 byte hex value",
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "address",
          "storageKeys"
        ],
        "title": "Access list entry",
        "type": "object"
      },
      "title": "accessList",
      "type": "array"
    },
    "authorizationList": {
      "description": "EIP-7702 authorization list",
      "items": {
        "properties": {
          "address": {
            "pattern": "^0x[0-9a-fA-F]{40}$",
            "title": "hex encoded address",
            "type": "string"
          },
          "chainId": {
            "description": "Chain ID on which this transaction is valid",
            "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
            "title": "chainId",
            "type": "string"
          },
          "nonce": {
            "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
            "title": "nonce",
            "type": "string"
          },
          "r": {
            "pattern": "^0x(0|[1-9a-f][0-9a-f]{0,63})$",
            "title": "r",
            "type": "string"
          },
          "s": {
            "pattern": "^0x(0|[1-9a-f][0-9a-f]{0,63})$",
            "title": "s",
            "type": "string"
          },
          "yParity": {
            "description": "The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature",
            "pattern": "^0x([0-9a-fA-F]?){1,2}$",
            "title": "yParity",
            "type": "string"
          }
        },
        "required": [
          "chainId",
          "nonce",
          "address",
          "yParity",
          "r",
          "s"
        ],
        "type": "object"
      },
      "title": "authorizationList",
      "type": "array"
    },
    "blobVersionedHashes": {
      "description": "List of versioned blob hashes associated with the transaction's EIP-4844 data blobs.",
      "items": {
        "pattern": "^0x[0-9a-f]{64}$",
        "title": "32 byte hex value",
        "type": "string"
      },
      "title": "blobVersionedHashes",
      "type": "array"
    },
    "blobs": {
      "description": "Raw blob data.",
      "items": {
        "pattern": "^0x[0-9a-f]*$",
        "title": "hex encoded bytes",
        "type": "string"
      },
      "title": "blobs",
      "type": "array"
    },
    "chainId": {
      "description": "Chain ID that this transaction is valid on.",
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
      "title": "chainId",
      "type": "string"
    },
    "from": {
      "pattern": "^0x[0-9a-fA-F]{40}$",
      "title": "from address",
      "type": "string"
    },
    "gas": {
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
      "title": "gas limit",
      "type": "string"
    },
    "gasPrice": {
      "description": "The gas price willing to be paid by the sender in wei",
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
      "title": "gas price",
      "type": "string"
    },
    "input": {
      "pattern": "^0x[0-9a-f]*$",
      "title": "input data",
      "type": "string"
    },
    "maxFeePerBlobGas": {
      "description": "The maximum total fee per gas the sender is willing to pay for blob gas in wei",
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
      "title": "max fee per blob gas",
      "type": "string"
    },
    "maxFeePerGas": {
      "description": "The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei",
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
      "title": "max fee per gas",
      "type": "string"
    },
    "maxPriorityFeePerGas": {
      "description": "Maximum fee per gas the sender is willing to pay to miners in wei",
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
      "title": "max priority fee per gas",
      "type": "string"
    },
    "nonce": {
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
      "title": "nonce",
      "type": "string"
    },
    "to": {
      "oneOf": [
        {
          "title": "Contract Creation (null)",
          "type": "null"
        },
        {
          "pattern": "^0x[0-9a-fA-F]{40}$",
          "title": "Address",
          "type": "string"
        }
      ],
      "title": "to address"
    },
    "type": {
      "pattern": "^0x([0-9a-fA-F]?){1,2}$",
      "title": "type",
      "type": "string"
    },
    "value": {
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
      "title": "value",
      "type": "string"
    }
  },
  "title": "Transaction object generic to all types",
  "type": "object"
}
Parameter Block: Block number or Block tag
json
{
  "oneOf": [
    {
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
      "title": "Block number",
      "type": "string"
    },
    {
      "description": "`earliest`: The lowest numbered block the client has available; `finalized`: The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination; `safe`: The most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions; `latest`: The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions; `pending`: A sample next block built by the client on top of `latest` and containing the set of transactions usually taken from local mempool. Before the merge transition is finalized, any call querying for `finalized` or `safe` block MUST be responded to with `-39001: Unknown block` error",
      "enum": [
        "earliest",
        "finalized",
        "safe",
        "latest",
        "pending"
      ],
      "title": "Block tag",
      "type": "string"
    }
  ],
  "title": "Block number or tag"
}
Result: object
json
{
  "additionalProperties": false,
  "properties": {
    "accessList": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "address": {
            "pattern": "^0x[0-9a-fA-F]{40}$",
            "title": "hex encoded address",
            "type": "string"
          },
          "storageKeys": {
            "items": {
              "pattern": "^0x[0-9a-f]{64}$",
              "title": "32 byte hex value",
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "address",
          "storageKeys"
        ],
        "title": "Access list entry",
        "type": "object"
      },
      "title": "accessList",
      "type": "array"
    },
    "error": {
      "title": "error",
      "type": "string"
    },
    "gasUsed": {
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
      "title": "Gas used",
      "type": "string"
    }
  },
  "title": "Access list result",
  "type": "object"
}