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
Oct 29, 2024

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.abstract-testnet.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{"method":"zks_getL2ToL1LogProof","params":["0x8e20449eb2f0a87e69d42a2d936cad4132af899926e1784abe564112a572b03e" ],"id":1,"jsonrpc":"2.0"}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free