← Sonic overview
Sonic · eth
eth_getBlockAccessList
Returns the block access list for a given block.
Parameters
BlockrequiredSchema{ "title": "Block number, tag, or block hash", "anyOf": [ { "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" ] }, { "type": "string", "title": "Block hash", "pattern": "^0x[0-9a-f]{64}$" } ] }
Result
Block access list
Schema
{
"oneOf": [
{
"type": "null",
"title": "Not Found (null)"
},
{
"type": "array",
"title": "Block access list",
"items": {
"type": "object",
"title": "Account access",
"properties": {
"address": {
"type": "string",
"title": "hex encoded address",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"balanceChanges": {
"type": "array",
"items": {
"type": "object",
"title": "Balance change",
"properties": {
"index": {
"type": "string",
"title": "hex encoded 32 bit unsigned integer",
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,7})$"
},
"value": {
"type": "string",
"title": "hex encoded 256 bit unsigned integer",
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,63})$"
}
},
"required": [
"index",
"value"
]
}
},
"codeChanges": {
"type": "array",
"items": {
"type": "object",
"title": "Code change",
"properties": {
"code": {
"type": "string",
"title": "hex encoded bytes",
"pattern": "^0x[0-9a-f]*$"
},
"index": {
"type": "string",
"title": "hex encoded 32 bit unsigned integer",
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,7})$"
}
},
"required": [
"index",
"code"
]
}
},
"nonceChanges": {
"type": "array",
"items": {
"type": "object",
"title": "Nonce change",
"properties": {
"index": {
"type": "string",
"title": "hex encoded 32 bit unsigned integer",
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,7})$"
},
"value": {
"type": "string",
"title": "hex encoded 64 bit unsigned integer",
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,15})$"
}
},
"required": [
"index",
"value"
]
}
},
"storageChanges": {
"type": "array",
"items": {
"type": "object",
"title": "Slot changes",
"properties": {
"changes": {
"type": "array",
"items": {
"type": "object",
"title": "Storage change",
"properties": {
"index": {
"type": "unknown"
},
"value": {
"type": "unknown"
}
},
"required": [
"index",
"value"
]
}
},
"key": {
"type": "string",
"title": "32 byte hex value",
"pattern": "^0x[0-9a-f]{64}$"
}
},
"required": [
"key",
"changes"
]
}
},
"storageReads": {
"type": "array",
"items": {
"type": "string",
"title": "32 byte hex value",
"pattern": "^0x[0-9a-f]{64}$"
}
}
},
"required": [
"address"
]
}
}
]
}Example request
Endpoint: https://your-sonic-node.azxa.io
JSON-RPC
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getBlockAccessList",
"params": [
"latest"
]
}Example response
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"address": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"balanceChanges": [
{
"index": "0x0",
"value": "0x56bc75e2d63100000"
},
{
"index": "0x1",
"value": "0x56bc75e2d63000000"
}
],
"codeChanges": [],
"nonceChanges": [
{
"index": "0x0",
"value": "0x0"
},
{
"index": "0x1",
"value": "0x1"
}
],
"storageChanges": [
{
"changes": [
"…",
"…"
],
"key": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
],
"storageReads": []
}
]
}cURL
curl -X POST https://your-sonic-node.azxa.io \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockAccessList","params":["latest"]}'