zks_getRawBlockTransactions | zkSync Era

zkSync Era API method that returns data of transactions in a specified block. This method allows developers and users to query and retrieve raw transaction data from a specific block on the zkSync network.

πŸ‘

Get your 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.

Parameters

block β€” the block number for which transactions are to be retrieved. It is a uint32 value indicating the specific block on the zkSync network.

Response

The response provides a structured JSON object that encapsulates detailed transaction data within the specified block. This data is inclusive of both the execution specifics and relevant L1 network information, described as follows:

  • common_data β€” a structured collection of data common to the transaction being executed. This includes general transaction information and metadata.
    • L1 β€” details specific to the Layer 1 (Ethereum) network that correlate with the zkSync transaction, comprising:
      • canonicalTxHash β€” the unique hash identifier of the transaction as recorded on the Ethereum network.
      • deadlineBlock β€” the last block by which the transaction must be processed on the Ethereum network to remain valid.
      • ethBlock β€” the specific block number on the Ethereum blockchain in which this transaction was included or referenced.
      • ethHash β€” the transaction hash on the Ethereum network, serving as a direct link to the transaction's Ethereum footprint.
      • fullFee β€” the total transaction fee calculated in hexadecimal format, encompassing all associated costs.
      • gasLimit β€” the upper cap on the gas that can be consumed by the transaction, denoted in hexadecimal format.
      • gasPerPubdataLimit β€” the cost of gas per byte of public data included in the transaction, also in hexadecimal format.
      • layer2TipFee β€” an optional tip fee for prioritizing the transaction on the zkSync network, represented in hexadecimal.
      • maxFeePerGas β€” the maximum amount (in Wei, the smallest ETH unit) that the sender is willing to pay per unit of gas, noted in hexadecimal.
      • opProcessingType β€” indicates the processing approach used for the transaction, distinguishing between standard and priority operations.
      • priorityQueueType β€” identifies the queue type for prioritized transactions, if applicable.
      • refundRecipient β€” the address designated to receive any refunds that may arise from the transaction process.
      • sender β€” the Ethereum address initiating the transaction.
      • serialId β€” a sequential identifier assigned to the transaction, facilitating tracking and management.
      • toMint β€” specifies an address, if any, where new tokens are minted as a result of the transaction.
  • execute β€” contains execution-specific information about the transaction, outlined as follows:
    • calldata β€” the encoded data sent with the transaction for interacting with smart contracts, formatted in hexadecimal.
    • contractAddress β€” the address of the smart contract being called or interacted with in the transaction.
    • factoryDeps β€” an array of dependencies required for the contract's execution, relevant in complex transactions or deployments.
    • value β€” the amount in Wei transferred or involved in the transaction, expressed in hexadecimal.
  • received_timestamp_ms β€” records the precise moment (in milliseconds since the Unix epoch) when the system received the transaction data, providing a timestamp for data entry.

Use Case

A developer could integrate zks_getRawBlockTransactions into a real-time financial tracking app to alert users of high-value transactions. The app provides insights by analyzing transaction patterns and values, helping users make informed investment decisions and monitor the market's pulse directly from the zkSync network.

Try the zks_getRawBlockTransactions RPC method yourself

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