curl --request POST \
--url https://optimism-mainnet.core.chainstack.com/efb0a5eccd2caa5135eb54eba6f7f300 \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "eth_createAccessList",
"id": 1,
"params": [
{
"from": "0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63",
"data": "0x608060806080608155"
},
"pending"
]
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": {
"accessList": [
{
"address": "<string>",
"storageKeys": [
"<string>"
]
}
],
"gasUsed": "<string>"
}
}curl --request POST \
--url https://optimism-mainnet.core.chainstack.com/efb0a5eccd2caa5135eb54eba6f7f300 \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "eth_createAccessList",
"id": 1,
"params": [
{
"from": "0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63",
"data": "0x608060806080608155"
},
"pending"
]
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": {
"accessList": [
{
"address": "<string>",
"storageKeys": [
"<string>"
]
}
],
"gasUsed": "<string>"
}
}eth_createAccessList generates an access list for a transaction based on specific default values. An access list includes addresses and storage keys the transaction intends to access, facilitating more efficient gas usage.
transactionObject — an object containing transaction parameters with default values:
from — the address of the sender.data — the data being sent with the transaction.blockParameter — specifies the blockchain state to use for generating the access list, with a default value of "pending".result — an object containing:
accessList — the generated access list, detailing addresses and storage keys the transaction will access.gasUsed — the estimated gas used to execute the transaction with the generated access list.eth_createAccessList method is crucial for:
Was this page helpful?