eth_createAccessList - Celo
eth_createAccessList. Generates an access list for a given transaction, helping optimize gas usage
eth_createAccessList - celo [Value: 30CU]
Creates an EIP2930 access list from a Transaction object
Use cases
- Retrieve specific block details using block hash
- Verify block transactions and metadata by hash
- Analyze block data for blockchain consistency checks
Constraints
- Requires valid block hash input
- Node must be synchronized with blockchain
- Accurate hash essential for correct block details
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
curl --request POST \
--url https://celo.drpc.org \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_createAccessList",
"params": [
{
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
"gas": "0x0",
"gasPrice": "0x9184e72a000",
"value": "0x0",
"data": "0x"
}
]
}
'
Response
200
{
"id": 0,
"jsonrpc": "string",
"result": {
"id": 1,
"jsonrpc": "2.0",
"result": "0x5b3c3f3f5cbf12c9c9d79b97c52b8f26a89e55e1"
}
}
Request params
idinteger
jsonrpcstring
methodstring
array
blockNumberstring
(optional) Block number as an integer, or string
- latest [default] - The most recent block in the blockchain (default).
- earliest - The first block, also known as the genesis block.
- pending - Transactions that have been broadcast but not yet included in a block.
transaction_detail_flagboolean
When set to true, the method returns complete transaction objects. If false, it only returns the transaction hashes.
Response
200
Response params
object
idinteger
jsonrpcstring
resultobject
A block object, or null if no block is found, contains the following fields:
object
accessListarray_of_objects
List of objects containing addresses and storage keys
object
addressstring
The address accessed by the transaction.
storageKeysstring
Storage keys utilized by the transaction.
gasUsedstring
The estimated gas consumed when the access list is included.