curl --request POST \
--url https://api.uniblock.dev/uni/v1/json-rpc?chainId=137 \
--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"
}
}
Creates an EIP-2930 access list that specifies which addresses and storage keys a transaction will access, helping optimize gas usage and reduce out-of-gas errors.
curl --request POST \
--url https://api.uniblock.dev/uni/v1/json-rpc?chainId=137 \
--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"
}
}
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”).curl --request POST \
--url https://api.uniblock.dev/uni/v1/json-rpc?chainId=137 \
--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"
}
}
Was this page helpful?