Get the list of supported and deprecated chains
curl --request GET \
--url https://sourcify.dev/server/chainsimport requests
url = "https://sourcify.dev/server/chains"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sourcify.dev/server/chains', 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://sourcify.dev/server/chains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sourcify.dev/server/chains"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sourcify.dev/server/chains")
.asString();require 'uri'
require 'net/http'
url = URI("https://sourcify.dev/server/chains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"name": "Ethereum Mainnet",
"chainId": 1,
"rpc": [
"https://rpc.mainnet.ethpandaops.io"
],
"traceSupportedRPCs": [
{
"type": "trace_transaction",
"index": 0
}
],
"supported": true,
"etherscanAPI": true,
"title": "Ethereum Mainnet"
}
]Contract Verification API
Get the list of supported and deprecated chains
GET
/
chains
Get the list of supported and deprecated chains
curl --request GET \
--url https://sourcify.dev/server/chainsimport requests
url = "https://sourcify.dev/server/chains"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sourcify.dev/server/chains', 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://sourcify.dev/server/chains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sourcify.dev/server/chains"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sourcify.dev/server/chains")
.asString();require 'uri'
require 'net/http'
url = URI("https://sourcify.dev/server/chains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"name": "Ethereum Mainnet",
"chainId": 1,
"rpc": [
"https://rpc.mainnet.ethpandaops.io"
],
"traceSupportedRPCs": [
{
"type": "trace_transaction",
"index": 0
}
],
"supported": true,
"etherscanAPI": true,
"title": "Ethereum Mainnet"
}
]Response
200 - application/json
List of supported chains
Chain name
Example:
"Ethereum Mainnet"
Chain ID
Example:
1
List of RPC endpoints
Example:
["https://rpc.mainnet.ethpandaops.io"]
RPCs that support tracing
Show child attributes
Show child attributes
Whether the chain is supported for verification
Example:
true
Whether Etherscan API is available for this chain
Example:
true
Chain title (optional)
Example:
"Ethereum Mainnet"
Was this page helpful?