Skip to main content

zks_getL2ToL1LogProof RPC Method

Returns the proof for the corresponding L2 to L1 log, given a transaction hash and the index of the L2 to L1 log produced within the transaction.

Updated on
Nov 2, 2023

zks_getL2ToL1LogProof RPC Method

Parameters

tx_hash
string
REQUIRED
The hash of the L2 transaction
l2_to_l1_log_index
integer
The index of the L2 to L1 log in the transaction

Returns

id
The position of the leaf in the Merkle tree of L2->L1 messages for the block
proof
The Merkle proof for the message
root
The root hash representing the Merkle tree root at the time the L2 to L1 log was generated
Request
1
curl https://docs-demo.zksync-mainnet.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{"method":"zks_getL2ToL1LogProof","params":["0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e" ],"id":1,"jsonrpc":"2.0"}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free