zks_getL2ToL1LogProof
curl --request POST \
--url https://api.mainnet.abs.xyz/zks_getL2ToL1LogProof \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "zks_getL2ToL1LogProof",
"params": [
"0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e"
]
}
'import requests
url = "https://api.mainnet.abs.xyz/zks_getL2ToL1LogProof"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "zks_getL2ToL1LogProof",
"params": ["0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'zks_getL2ToL1LogProof',
params: ['0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e']
})
};
fetch('https://api.mainnet.abs.xyz/zks_getL2ToL1LogProof', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mainnet.abs.xyz/zks_getL2ToL1LogProof",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => 1,
'method' => 'zks_getL2ToL1LogProof',
'params' => [
'0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mainnet.abs.xyz/zks_getL2ToL1LogProof"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"zks_getL2ToL1LogProof\",\n \"params\": [\n \"0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mainnet.abs.xyz/zks_getL2ToL1LogProof")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"zks_getL2ToL1LogProof\",\n \"params\": [\n \"0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mainnet.abs.xyz/zks_getL2ToL1LogProof")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"zks_getL2ToL1LogProof\",\n \"params\": [\n \"0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"result": {
"proof": [
"0x8c48910df2ca7de509daf50b3182fcdf2dd6c422c6704054fd857d6c9516d6fc",
"0xc5028885760b8b596c4fa11497c783752cb3a3fb3b8e6b52d7e54b9f1c63521e",
"0xeb1f451eb8163723ee19940cf3a8f2a2afdf51100ce8ba25839bd94a057cda16",
"0x7aabfd367dea2b5306b8071c246b99566dae551a1dbd40da791e66c4f696b236",
"0xe4733f281f18ba3ea8775dd62d2fcd84011c8c938f16ea5790fd29a03bf8db89",
"0x1798a1fd9c8fbb818c98cff190daa7cc10b6e5ac9716b4a2649f7c2ebcef2272",
"0x66d7c5983afe44cf15ea8cf565b34c6c31ff0cb4dd744524f7842b942d08770d",
"0xb04e5ee349086985f74b73971ce9dfe76bbed95c84906c5dffd96504e1e5396c",
"0xac506ecb5465659b3a927143f6d724f91d8d9c4bdb2463aee111d9aa869874db"
],
"id": 0,
"root": "0x920c63cb0066a08da45f0a9bf934517141bd72d8e5a51421a94b517bf49a0d39"
},
"id": 1
}ZKSync API
zks_getL2ToL1LogProof
Retrieves the log proof for an L2 to L1 transaction
POST
/
zks_getL2ToL1LogProof
zks_getL2ToL1LogProof
curl --request POST \
--url https://api.mainnet.abs.xyz/zks_getL2ToL1LogProof \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "zks_getL2ToL1LogProof",
"params": [
"0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e"
]
}
'import requests
url = "https://api.mainnet.abs.xyz/zks_getL2ToL1LogProof"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "zks_getL2ToL1LogProof",
"params": ["0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'zks_getL2ToL1LogProof',
params: ['0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e']
})
};
fetch('https://api.mainnet.abs.xyz/zks_getL2ToL1LogProof', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mainnet.abs.xyz/zks_getL2ToL1LogProof",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => 1,
'method' => 'zks_getL2ToL1LogProof',
'params' => [
'0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mainnet.abs.xyz/zks_getL2ToL1LogProof"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"zks_getL2ToL1LogProof\",\n \"params\": [\n \"0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mainnet.abs.xyz/zks_getL2ToL1LogProof")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"zks_getL2ToL1LogProof\",\n \"params\": [\n \"0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mainnet.abs.xyz/zks_getL2ToL1LogProof")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"zks_getL2ToL1LogProof\",\n \"params\": [\n \"0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"result": {
"proof": [
"0x8c48910df2ca7de509daf50b3182fcdf2dd6c422c6704054fd857d6c9516d6fc",
"0xc5028885760b8b596c4fa11497c783752cb3a3fb3b8e6b52d7e54b9f1c63521e",
"0xeb1f451eb8163723ee19940cf3a8f2a2afdf51100ce8ba25839bd94a057cda16",
"0x7aabfd367dea2b5306b8071c246b99566dae551a1dbd40da791e66c4f696b236",
"0xe4733f281f18ba3ea8775dd62d2fcd84011c8c938f16ea5790fd29a03bf8db89",
"0x1798a1fd9c8fbb818c98cff190daa7cc10b6e5ac9716b4a2649f7c2ebcef2272",
"0x66d7c5983afe44cf15ea8cf565b34c6c31ff0cb4dd744524f7842b942d08770d",
"0xb04e5ee349086985f74b73971ce9dfe76bbed95c84906c5dffd96504e1e5396c",
"0xac506ecb5465659b3a927143f6d724f91d8d9c4bdb2463aee111d9aa869874db"
],
"id": 0,
"root": "0x920c63cb0066a08da45f0a9bf934517141bd72d8e5a51421a94b517bf49a0d39"
},
"id": 1
}Body
application/json
Response
200 - application/json
Returns the proof for the L2 to L1 log
Was this page helpful?
⌘I