← Celo overview
Celo · eth
eth_createAccessList
Generates an access list for a transaction.
Parameters
TransactionrequiredSchema{ "type": "object", "title": "Transaction object generic to all types", "properties": { "accessList": { "type": "array", "title": "accessList", "description": "EIP-2930 access list", "items": { "type": "object", "title": "Access list entry", "properties": { "address": { "type": "string", "title": "hex encoded address", "pattern": "^0x[0-9a-fA-F]{40}$" }, "storageKeys": { "type": "array", "items": { "type": "string", "title": "32 byte hex value", "pattern": "^0x[0-9a-f]{64}$" } } }, "required": [ "address", "storageKeys" ] } }, "authorizationList": { "type": "array", "title": "authorizationList", "description": "EIP-7702 authorization list", "items": { "type": "object", "properties": { "address": { "type": "string", "title": "hex encoded address", "pattern": "^0x[0-9a-fA-F]{40}$" }, "chainId": { "type": "string", "title": "chainId", "description": "Chain ID on which this transaction is valid", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" }, "nonce": { "type": "string", "title": "nonce", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" }, "r": { "type": "string", "title": "r", "pattern": "^0x(0|[1-9a-f][0-9a-f]{0,63})$" }, "s": { "type": "string", "title": "s", "pattern": "^0x(0|[1-9a-f][0-9a-f]{0,63})$" }, "yParity": { "type": "string", "title": "yParity", "description": "The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature", "pattern": "^0x[0-9a-f]{1,2}$" } }, "required": [ "chainId", "nonce", "address", "yParity", "r", "s" ] } }, "blobVersionedHashes": { "type": "array", "title": "blobVersionedHashes", "description": "List of versioned blob hashes associated with the transaction's EIP-4844 data blobs.", "items": { "type": "string", "title": "32 byte hex value", "pattern": "^0x[0-9a-f]{64}$" } }, "blobs": { "type": "array", "title": "blobs", "description": "Raw blob data.", "items": { "type": "string", "title": "hex encoded bytes", "pattern": "^0x[0-9a-f]*$" } }, "chainId": { "type": "string", "title": "chainId", "description": "Chain ID that this transaction is valid on.", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" }, "commitments": { "type": "array", "title": "commitments", "description": "List of blob commitments as per EIP-4844.", "items": { "type": "string", "title": "hex encoded bytes", "pattern": "^0x[0-9a-f]*$" } }, "from": { "type": "string", "title": "from address", "pattern": "^0x[0-9a-fA-F]{40}$" }, "gas": { "type": "string", "title": "gas limit", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" }, "gasPrice": { "type": "string", "title": "gas price", "description": "The gas price willing to be paid by the sender in wei", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" }, "input": { "type": "string", "title": "input data", "pattern": "^0x[0-9a-f]*$" }, "maxFeePerBlobGas": { "type": "string", "title": "max fee per blob gas", "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]*)$" }, "maxFeePerGas": { "type": "string", "title": "max fee per gas", "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]*)$" }, "maxPriorityFeePerGas": { "type": "string", "title": "max priority fee per gas", "description": "Maximum fee per gas the sender is willing to pay to miners in wei", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" }, "nonce": { "type": "string", "title": "nonce", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" }, "proofs": { "type": "array", "title": "proofs", "description": "List of blob proofs. Pre-PeerDAS this contains one KZG proof per blob (length == len(blobs)). Post-PeerDAS this contains cell proofs with length == 128 * len(blobs).", "items": { "type": "string", "title": "hex encoded bytes", "pattern": "^0x[0-9a-f]*$" } }, "to": { "title": "to address", "oneOf": [ { "type": "null", "title": "Contract Creation (null)" }, { "type": "string", "title": "Address", "pattern": "^0x[0-9a-fA-F]{40}$" } ] }, "type": { "type": "string", "title": "type", "pattern": "^0x[0-9a-f]{1,2}$" }, "value": { "type": "string", "title": "value", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" } } }BlockSchema{ "title": "Block number or tag", "oneOf": [ { "type": "string", "title": "Block number", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" }, { "type": "string", "title": "Block tag", "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" ] } ] }
Result
Gas used
Schema
{
"type": "object",
"title": "Access list result",
"properties": {
"accessList": {
"type": "array",
"title": "accessList",
"items": {
"type": "object",
"title": "Access list entry",
"properties": {
"address": {
"type": "string",
"title": "hex encoded address",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"storageKeys": {
"type": "array",
"items": {
"type": "string",
"title": "32 byte hex value",
"pattern": "^0x[0-9a-f]{64}$"
}
}
},
"required": [
"address",
"storageKeys"
]
}
},
"error": {
"type": "string",
"title": "error"
},
"gasUsed": {
"type": "string",
"title": "Gas used",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
}
}
}Example request
Endpoint: https://your-celo-node.azxa.io
JSON-RPC
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_createAccessList",
"params": [
{
"data": "0x608060806080608155",
"from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63"
},
"latest"
]
}Example response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
"storageKeys": [
"0x0000000000000000000000000000000000000000000000000000000000000081"
]
}
],
"gasUsed": "0x125f8"
}
}Test fixture
Fixture: create-al-abi-revert
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_createAccessList",
"params": [
{
"gas": "0x186a0",
"input": "0x01",
"to": "0x0ee3ab1371c93e7c0c281cc0c2107cdebc8b1930"
},
"latest"
]
}Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [
{
"address": "0x0ee3ab1371c93e7c0c281cc0c2107cdebc8b1930",
"storageKeys": [
"…"
]
}
],
"error": "execution reverted",
"gasUsed": "0x639d"
}
}cURL
curl -X POST https://your-celo-node.azxa.io \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_createAccessList","params":[{"data":"0x608060806080608155","from":"0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63"},"latest"]}'