zkevm_getBatchByNumber

Returns the details of a batch specified by its number or a special tag (earliest, latest). If includeTransactions is true, the full transaction objects are included; otherwise, only transaction hashes are returned.

Path parameters

apiKeystringRequired

Request

This endpoint expects an object.
batchNumberOrTagstring or enumRequired

The batch number or a tag (earliest, latest) to identify the batch.

includeTransactionsbooleanRequired

If true, returns full transaction objects; if false, returns only transaction hashes.

Response

The batch details corresponding to the given number or tag.

numberstringOptionalformat: "^0x([1-9a-f]+[0-9a-f]*|0)$"
globalExitRootstringOptionalformat: "^0x[0-9a-f]{64}$"
mainnetExitRootstringOptionalformat: "^0x[0-9a-f]{64}$"
rollupExitRootstringOptionalformat: "^0x[0-9a-f]{64}$"
accInputHashstringOptionalformat: "^0x[0-9a-f]{64}$"
timestampstringOptionalformat: "^0x([1-9a-f]+[0-9a-f]*|0)$"
sendSequencesTxHashstringOptionalformat: "^0x[0-9a-f]{64}$"
verifyBatchTxHashstringOptionalformat: "^0x[0-9a-f]{64}$"
closedbooleanOptional

True if the batch is already closed, otherwise false

blockslist of objects or stringsOptional

Array of block objects, or 32 Bytes block hashes depending on the last given parameter

transactionslist of objects or stringsOptional

Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter

stateRootstringOptionalformat: "^0x[0-9a-f]{64}$"
coinbasestringOptionalformat: "^0x[0-9a-fA-F]{40}$"