Skip to main content

Parameters

chainId
string
default:"2021"
required
Unique identifier for a blockchain network.
id
number
default:1
required
Request identifier used to match responses.
jsonrpc
string
default:"2.0"
required
JSON-RPC version.
method
string
default:"eth_createAccessList"
required
JSON-RPC method name.
params
object
required
Parameters: [transaction call object, block identifier]Positional parameters for eth_createAccessList:
  • params[0]: Transaction call object used to simulate the access list.
  • params[1]: Block identifier: number, block hash, or tag (“latest”, “earliest”, “pending”, “safe”, or “finalized”).

Returns

result
object
Access list and estimated gas usage.
curl --request POST \
  --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=2021 \
  --header 'content-type: application/json' \
  --data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "eth_createAccessList",
    "params": [
      {
        "from": "0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63",
        "to": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "data": "0x608060806080608155"
      },
      "pending"
    ]
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "..."
        ]
      }
    ],
    "gasUsed": "0x125f8"
  }
}