v1

latestOpenAPI 3.0.02026-07-26268286602.5 KB
zksync

Get batch by number.

Retrieves detailed information about a ZkSync batch by its number.

get/{chain_id}/api/v2/zksync/batches/{batch_number_param}

Path parameters

batch_number_paraminteger required

Batch number

chain_idstring required

The ID of the blockchain

Response

Batch info.

commit_transaction_hashstring nullable required

Hash of the parent-chain transaction that committed this batch. null until the commit transaction is observed.

commit_transaction_timestampstring date-time nullable required

Timestamp of the parent-chain transaction that committed this batch. null until the commit transaction is observed.

end_block_numberinteger required

Last rollup block included in the batch.

execute_transaction_hashstring nullable required

Hash of the parent-chain transaction that executed this batch. null until the execute transaction is observed.

execute_transaction_timestampstring date-time nullable required

Timestamp of the parent-chain transaction that executed this batch. null until the execute transaction is observed.

l1_gas_pricestring required

Parent-chain gas price observed for this batch, in wei.

l1_transactions_countinteger required

Number of transactions in the batch originating on the parent chain.

l2_fair_gas_pricestring required

Rollup fair gas price for this batch, in wei.

l2_transactions_countinteger required

Number of transactions in the batch originating on the rollup.

numberinteger required

Batch number on the rollup.

prove_transaction_hashstring nullable required

Hash of the parent-chain transaction that proved this batch. null until the prove transaction is observed.

prove_transaction_timestampstring date-time nullable required

Timestamp of the parent-chain transaction that proved this batch. null until the prove transaction is observed.

root_hashstring required

State root hash committed for this batch on the parent chain.

start_block_numberinteger required

First rollup block included in the batch.

status'Executed on L1' | 'Validated on L1' | 'Sent to L1' | 'Sealed on L2' required

Lifecycle status of the batch:

  • Sealed on L2 - Batch is finalized on the rollup and no parent-chain lifecycle transaction has been observed yet.
  • Sent to L1 - Commit transaction has been submitted on the parent chain.
  • Validated on L1 - Prove transaction has been submitted on the parent chain.
  • Executed on L1 - Execute transaction has been submitted on the parent chain.
timestampstring date-time required

Timestamp when the batch was sealed on the rollup.