zks_getBlockDetails | zkSync Era

The zks_getBlockDetails API method provides comprehensive zkSync-specific information about a Layer 2 block. This includes details on the block's commitment, proof, and execution on Layer 1, offering a deep dive into its lifecycle and current state within the zkSync network.


Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.


This method requires a single input parameter:

  • block β€” a uint32 value representing the block number for which details are being requested. This is a specific identifier for the block within the zkSync Layer 2 network.


Upon execution, the zks_getBlockDetails method returns an object with information about the block:

  • baseSystemContractsHashes β€” an object containing hashes of the base system contracts involved in the block's transactions, offering insights into the foundational components of the zkSync network for this block. This includes:
    • bootloader β€” the hash of the bootloader contract.
    • default_aa β€” the hash of the default account abstraction contract.
  • commitTxHash β€” the hash of the transaction that has been committed to the network, marking the initial stage of the transaction's lifecycle on Layer 1.
  • committedAt β€” the timestamp (ISO 8601 format) indicating when the transaction was committed to the network, providing a precise temporal context.
  • executeTxHash β€” the transaction hash executed on the network, signifying the application of the transaction's effects on the zkSync state.
  • executedAt β€” the timestamp (ISO 8601 format) when the transaction was executed on the network, marking the completion of its effects on the state.
  • l1BatchNumber β€” the batch number associated with this transaction on the Layer 1 (Ethereum) network, linking the zkSync activity back to its Ethereum roots.
  • l1GasPrice β€” the gas price utilized for the transaction on the Layer 1 network, reflecting the cost of execution on Ethereum.
  • l1TxCount β€” the number of transactions related to this batch on the Layer 1 network, providing a measure of the batch's complexity and size.
  • l2FairGasPrice β€” the fair gas price applied to transactions within the zkSync network.
  • l2TxCount β€” the total number of transactions processed within this block on the Layer 2 network, indicating the block's activity level.
  • number β€” the specific number of the block within the zkSync blockchain.
  • operatorAddress β€” the address of the operator who executed the transaction, offering accountability and traceability within the network's operations.
  • proveTxHash β€” the hash of the proof transaction on the Layer 1 network, crucial for validating the block's integrity and finality.
  • provenAt β€” the timestamp (ISO 8601 format) when the proof transaction was completed on the Layer 1 network, marking a key verification step.
  • rootHash β€” the root hash representing the updated state of the network following the transaction, essential for ensuring network consistency.
  • status β€” the status of the block.
  • timestamp β€” the UNIX timestamp marking the time of the block's processing, providing a global temporal reference.

Use case

A blockchain analytics platform may use the zks_getBlockDetails method to track block statuses, analyze gas prices or monitor operator activity. Similarly, a wallet service could leverage this data to inform users about the confirmation and finality of their transactions, enhancing trust and transparency in the service.

Try the zks_getBlockDetails RPC method yourself

Click Try It! to start a request and see the response here!