zks_getRawBlockTransactions
Returns data about the transactions in the specified block.
Parameters
block
: (integer) [Required] Block number.
Response
Object containing the data about the executed transaction:
L1
: Object containing information about the corresponding transaction on the L1 network:canonicalTxHash
: The canonical hash of the transaction on the L1 network.deadlineBlock
: The deadline block for the transaction on the L1 network.ethBlock
: The Ethereum block number for the transaction.ethHash
: The Ethereum transaction hash for the transaction.fullFee
: The full fee for the transaction in hexadecimal format.gasLimit
: The gas limit for the transaction in hexadecimal format.gasPerPubdataLimit
: The gas per public data limit for the transaction in hexadecimal format.layer2TipFee
: The tip fee for the transaction on the L2 network in hexadecimal format.maxFeePerGas
: The maximum fee per gas for the transaction in hexadecimal format.opProcessingType
: The type of operation processing used for the transaction.priorityQueueType
: The type of priority queue used for the transaction.refundRecipient
: The recipient address for any potential refund for the transaction.sender
: The sender address of the transaction.serialId
: The serial ID of the transaction.toMint
: The address to mint tokens for the transaction.
execute
: Object that contains information about the transaction execution:calldata
: The calldata for the execution in hexadecimal format.contractAddress
: The contract address for the execution.factoryDeps
: An array containing factory dependencies for the execution.value
: The value for the execution in hexadecimal format.
received_timestamp_ms
: The transaction timestamp.
Example
Replace <YOUR-API-KEY>
with an API key from your MetaMask Developer dashboard.
Request
- curl
- WSS
curl https://zksync-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getRawBlockTransactions", "params": [5817]}'
wscat -c wss://zksync-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "id": 1, "method": "zks_getRawBlockTransactions", "params": [5817]}'
Response
- JSON
{
"jsonrpc": "2.0",
"result": [
{
"common_data": {
"L1": {
"canonicalTxHash": "0x22de7debaa98758afdaee89f447ff43bab5da3de6acca7528b281cc2f1be2ee9",
"deadlineBlock": 0,
"ethBlock": 16751339,
"ethHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"fullFee": "0x0",
"gasLimit": "0x989680",
"gasPerPubdataLimit": "0x320",
"layer2TipFee": "0x0",
"maxFeePerGas": "0x0",
"opProcessingType": "Common",
"priorityQueueType": "Deque",
"refundRecipient": "0x87869cb87c4fa78ca278df358e890ff73b42a39e",
"sender": "0x87869cb87c4fa78ca278df358e890ff73b42a39e",
"serialId": 67,
"toMint": "0x0"
}
},
"execute": {
"calldata": "0x471c46c800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000031edd5a882583cbf3a712e98e100ef34ad6934b400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001",
"contractAddress": "0xfc5b07a5dd1b80cf271d35642f75cc0500ff1e2c",
"factoryDeps": [],
"value": "0x0"
},
"received_timestamp_ms": 1677887544169
}
],
"id": 1
}