POSTeth_createAccessList

Generates an Access List for a transaction according to EIP-2930. The Access List contains only the minimum information required for execution, reducing network load and gas costs.

Request Body
idintegerrequired
jsonrpcstringrequired
methodstringrequired
paramsoneOf[]required

Pass the following parameters as an array with the appropriate types.

  1. call object - Contract address and call data.
  2. block identifier - Block number, block hash, or block tag.
params[0]object
fromstring

The transaction sender (from) address as a string.

tostring

The transaction recipient (to) address as a string.

gasstring

The gas limit for the transaction as a hex string. For smart contract calls, use 0x0 since no gas is consumed.

gasPricestring

The gas price per unit as a hex string.

valuestring

The value (amount) for the transaction.

datastring

The method signature hash of the call. See ABI for reference.

params[1]string

Use one of block hash, block number, or block tag to specify a block.

  • Block number: hex string (ex. "0x1")
  • Block hash: 64-character hex string (ex. "0x39008d07edf93c03bb9d1cfc80598fcf63f441ec86e9de3733fa6a484980ca48")]
  • Block tag: enum string (ex. "latest", "earliest", "pending")
    • earliest: The oldest available block on the chain.
    • finalized: A recently finalized block that can no longer be changed. Primarily used in proof-of-stake (PoS) blockchains.
    • safe: A recent block considered safe by the network (immune to reorgs).
    • latest: The most recent block on the chain (may be subject to reorgs).
    • pending: The next block to be mined, including pending transactions in the mempool.
Responses
addressstring

Contract address to be accessed

storageKeysstring[]

Storage keys to be accessed

gasUsedstring

Estimated gas used when applying the access list (hex)

X-API-KEY
RequestCU22
cURL
curl -X POST "https://bnb-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": null,
      "to": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
      "data": "0x70a0823100000000000000000000000047ac0Fb4F2D84898e4D9E7b4DaB3C24507a6D503"
    },
    "latest"
  ]
}'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "accessList": [
      {
        "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
        "storageKeys": [
          "0x000000000000000000000000000000000000000000000000000000000000000a",
          "0xb6a3055d770d1f33e0d6a6d5bdda21882d967a5d6d17933aa7c73780c5899db9"
        ]
      }
    ],
    "gasUsed": "0x6ff7"
  }
}