Parameters
chainId
string
default:"300"
required
Unique identifier for a blockchain network.
Request identifier used to match responses.
jsonrpc
string
default:"2.0"
required
JSON-RPC version.
method
string
default:"zks_getL2ToL1LogProof"
required
JSON-RPC method name.
Positional parameters for zks_getL2ToL1LogProof:params[0]: The hash of the L2 transaction.params[1]: The index of the L2 to L1 log in the transaction.
Returns
The JSON-RPC result.
The position of the leaf in the Merkle tree of L2->L1 messages for the block.
The Merkle proof for the message.
Hex-encoded proof element.
The root hash representing the Merkle tree root at the time the L2 to L1 log was generated.
curl --request POST \
--url https://api.uniblock.dev/uni/v1/json-rpc?chainId=300 \
--header 'content-type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "zks_getL2ToL1LogProof",
"params": [
"0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e",
0
]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"id": 42,
"proof": [
"0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1",
"0xdef456def456def456def456def456def456def456def456def456def456def4"
],
"root": "0xabc123def4567890abc123def4567890abc123def4567890abc123def4567890"
}
}