Select the intended ZKsync L2-to-L1 log for a proof
A ZKsync transaction can emit ordinary EVM logs and multiple protocol L2-to-L1 logs. The proof query identifies the relevant protocol log within the specified transaction.
Inspect the protocol log list
Read the transaction receipt and enumerate its L2-to-L1 logs. Select the log matching the expected sender and application message. If the target is the second protocol log, pass index one in the illustrated method call with the actual transaction hash.
zks_getL2ToL1LogProof(transactionHash, 1)
Record the returned Merkle siblings, proof root and proof identifier. A receipt logIndex from an ERC-20 Transfer event refers to another log collection and cannot substitute for selecting the protocol message.
Wait for the required settlement stage
The documented proof endpoint generates the proof after the corresponding transaction’s batch has executed on L1. A missing proof for a freshly included L2 transaction need not indicate missing message data. Verify the batch stage and use the verifier appropriate to the deployed bridge version. docs.zksync.io ZKsync documentation