zks_getTransactionDetails | zkSync Era

zks_getTransactionDetails | zkSync Era

zkSync Era API method that returns detailed data from a specific transaction, identified by the transaction hash. This functionality is crucial for developers and users needing to retrieve comprehensive information about a transaction's lifecycle and status within 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

  • hash β€” a string representing the transaction hash (H256 format) for which details are requested.

Response

The response is a JSON object containing key data points about the specified transaction:

  • ethCommitTxHash β€” the transaction hash of the commit phase on Ethereum, marking the transaction's initial recording.
  • ethExecuteTxHash β€” the transaction hash of the execute phase on Ethereum, indicating the transaction's execution or application.
  • ethProveTxHash β€” the Ethereum transaction hash for the proof phase, providing cryptographic proof of the transaction's correctness.
  • fee β€” the fee amount for the transaction, presented in hexadecimal format.
  • gasPerPubdata β€” the gas cost per byte of public data included in the transaction, in hexadecimal format.
  • initiatorAddress β€” the Ethereum address of the entity that initiated the transaction.
  • isL1Originated β€” a boolean flag indicating whether the transaction originated from the Layer 1 (Ethereum) network.
  • receivedAt β€” the timestamp indicating when the transaction was received on the Layer 2 (zkSync) network.
  • status β€” The current status of the transaction, which can be one of the following:
    • Pending: The transaction is in the mempool but has not yet been included in a block.
    • Included: The transaction has been included in a block, but the batch containing the block has not yet been committed to the Ethereum network.
    • Verified: The transaction has been included in a block and verified. Verification means the transaction has been committed, proven, and executed on the Ethereum L1 network, ensuring its finality and immutability.
    • Failed: The transaction is unverified or has failed due to various reasons such as insufficient balance, invalid parameters, or execution errors.

Use case

The zks_getTransactionDetails method is particularly useful for applications requiring real-time tracking and verifying transaction statuses. For example, a wallet application can use this method to provide users with up-to-date information on their transactions, including confirmation status, fee details, and the transaction's progression through the zkSync network.

Try the zks_getTransactionDetails RPC method yourself

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