zks_getRawBlockTransactions
curl --request POST \
--url https://api.mainnet.abs.xyz/zks_getRawBlockTransactions \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "zks_getRawBlockTransactions",
"params": [
7469801
]
}
'import requests
url = "https://api.mainnet.abs.xyz/zks_getRawBlockTransactions"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "zks_getRawBlockTransactions",
"params": [7469801]
}
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_getRawBlockTransactions',
params: [7469801]
})
};
fetch('https://api.mainnet.abs.xyz/zks_getRawBlockTransactions', 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_getRawBlockTransactions",
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_getRawBlockTransactions',
'params' => [
7469801
]
]),
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_getRawBlockTransactions"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"zks_getRawBlockTransactions\",\n \"params\": [\n 7469801\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_getRawBlockTransactions")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"zks_getRawBlockTransactions\",\n \"params\": [\n 7469801\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mainnet.abs.xyz/zks_getRawBlockTransactions")
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_getRawBlockTransactions\",\n \"params\": [\n 7469801\n ]\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"result": [
{
"common_data": {
"L2": {
"nonce": 117,
"fee": {
"gas_limit": "0xbadbc",
"max_fee_per_gas": "0x202fbf0",
"max_priority_fee_per_gas": "0x0",
"gas_per_pubdata_limit": "0xc350"
},
"initiatorAddress": "0xe7734c4a8201af41db64da90eddb4c19bbf64710",
"signature": [
203,
118,
119,
63,
1,
54,
91,
252,
188,
23,
120,
51,
4,
28
],
"transactionType": "EIP1559Transaction",
"input": {
"hash": "0x970c9480960818b05832f7e5b76a0c46956003c34942e005672d7ddc537aaa59",
"data": [
2,
249,
1,
111,
1305,
187,
2,
170,
21,
166,
251,
255
]
},
"paymasterParams": {
"paymaster": "0x0000000000000000000000000000000000000000",
"paymasterInput": []
}
}
},
"execute": {
"contractAddress": "0x5155704bb41fde152ad3e1ae402e8e8b9ba335d3",
"calldata": "0fa0x5155704bb41fde152ad3e1ae402e8e8b9ba335d3",
"value": "0x0",
"factoryDeps": null
},
"received_timestamp_ms": 1711649348872,
"raw_bytes": "0x02f9016f8201447580840202fbf"
}
],
"id": 1
}ZKSync API
zks_getRawBlockTransactions
Lists transactions in a block without processing them
POST
/
zks_getRawBlockTransactions
zks_getRawBlockTransactions
curl --request POST \
--url https://api.mainnet.abs.xyz/zks_getRawBlockTransactions \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "zks_getRawBlockTransactions",
"params": [
7469801
]
}
'import requests
url = "https://api.mainnet.abs.xyz/zks_getRawBlockTransactions"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "zks_getRawBlockTransactions",
"params": [7469801]
}
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_getRawBlockTransactions',
params: [7469801]
})
};
fetch('https://api.mainnet.abs.xyz/zks_getRawBlockTransactions', 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_getRawBlockTransactions",
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_getRawBlockTransactions',
'params' => [
7469801
]
]),
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_getRawBlockTransactions"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"zks_getRawBlockTransactions\",\n \"params\": [\n 7469801\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_getRawBlockTransactions")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"zks_getRawBlockTransactions\",\n \"params\": [\n 7469801\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mainnet.abs.xyz/zks_getRawBlockTransactions")
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_getRawBlockTransactions\",\n \"params\": [\n 7469801\n ]\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"result": [
{
"common_data": {
"L2": {
"nonce": 117,
"fee": {
"gas_limit": "0xbadbc",
"max_fee_per_gas": "0x202fbf0",
"max_priority_fee_per_gas": "0x0",
"gas_per_pubdata_limit": "0xc350"
},
"initiatorAddress": "0xe7734c4a8201af41db64da90eddb4c19bbf64710",
"signature": [
203,
118,
119,
63,
1,
54,
91,
252,
188,
23,
120,
51,
4,
28
],
"transactionType": "EIP1559Transaction",
"input": {
"hash": "0x970c9480960818b05832f7e5b76a0c46956003c34942e005672d7ddc537aaa59",
"data": [
2,
249,
1,
111,
1305,
187,
2,
170,
21,
166,
251,
255
]
},
"paymasterParams": {
"paymaster": "0x0000000000000000000000000000000000000000",
"paymasterInput": []
}
}
},
"execute": {
"contractAddress": "0x5155704bb41fde152ad3e1ae402e8e8b9ba335d3",
"calldata": "0fa0x5155704bb41fde152ad3e1ae402e8e8b9ba335d3",
"value": "0x0",
"factoryDeps": null
},
"received_timestamp_ms": 1711649348872,
"raw_bytes": "0x02f9016f8201447580840202fbf"
}
],
"id": 1
}Body
application/json
Response
200 - application/json
Returns an array of raw transaction objects
Was this page helpful?
⌘I