List of verified contracts per chain
curl --request GET \
--url https://sourcify.dev/server/v2/contracts/{chainId}import requests
url = "https://sourcify.dev/server/v2/contracts/{chainId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sourcify.dev/server/v2/contracts/{chainId}', 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/v2/contracts/{chainId}",
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/v2/contracts/{chainId}"
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/v2/contracts/{chainId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sourcify.dev/server/v2/contracts/{chainId}")
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{
"results": [
{
"match": "exact_match",
"creationMatch": "match",
"runtimeMatch": "exact_match",
"chainId": "11155111",
"address": "0xDFEBAd708F803af22e81044aD228Ff77C83C935c",
"verifiedAt": "2024-07-24T12:00:00Z",
"matchId": "421"
},
{
"match": "match",
"creationMatch": "match",
"runtimeMatch": "match",
"chainId": "11155111",
"address": "0x2738d13E81e30bC615766A0410e7cF199FD59A83",
"verifiedAt": "2024-07-24T12:00:00Z",
"matchId": "5531"
}
]
}{
"customCode": "unsupported_chain",
"message": "The chain with chainId 9429413 is not supported",
"errorId": "1ac6b91a-0605-4459-93dc-18f210a70192"
}{
"customCode": "too_many_requests",
"message": "You are sending too many requests",
"errorId": "1ac6b91a-0605-4459-93dc-18f210a70192"
}{
"customCode": "internal_error",
"message": "Something went wrong",
"errorId": "1ac6b91a-0605-4459-93dc-18f210a70192"
}Contract Verification API
List of verified contracts per chain
Retrieve the verified contracts on a chain
GET
/
v2
/
contracts
/
{chainId}
List of verified contracts per chain
curl --request GET \
--url https://sourcify.dev/server/v2/contracts/{chainId}import requests
url = "https://sourcify.dev/server/v2/contracts/{chainId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sourcify.dev/server/v2/contracts/{chainId}', 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/v2/contracts/{chainId}",
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/v2/contracts/{chainId}"
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/v2/contracts/{chainId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sourcify.dev/server/v2/contracts/{chainId}")
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{
"results": [
{
"match": "exact_match",
"creationMatch": "match",
"runtimeMatch": "exact_match",
"chainId": "11155111",
"address": "0xDFEBAd708F803af22e81044aD228Ff77C83C935c",
"verifiedAt": "2024-07-24T12:00:00Z",
"matchId": "421"
},
{
"match": "match",
"creationMatch": "match",
"runtimeMatch": "match",
"chainId": "11155111",
"address": "0x2738d13E81e30bC615766A0410e7cF199FD59A83",
"verifiedAt": "2024-07-24T12:00:00Z",
"matchId": "5531"
}
]
}{
"customCode": "unsupported_chain",
"message": "The chain with chainId 9429413 is not supported",
"errorId": "1ac6b91a-0605-4459-93dc-18f210a70192"
}{
"customCode": "too_many_requests",
"message": "You are sending too many requests",
"errorId": "1ac6b91a-0605-4459-93dc-18f210a70192"
}{
"customCode": "internal_error",
"message": "Something went wrong",
"errorId": "1ac6b91a-0605-4459-93dc-18f210a70192"
}Path Parameters
The chainId number of the EVM chain
Required string length:
1 - 20Pattern:
^\d+$Example:
"11155111"
Query Parameters
Sorts the contracts by most recent first (desc, default), or by oldest first (asc)
Available options:
asc, desc Example:
"asc"
Number of contracts that should be returned per page. Maximum 200
Required range:
1 <= x <= 200The last matchId returned to get contracts older or newer than it (depending on sort)
Response
Returns an array of VerifiedContractMinimal objects under results field.
If not verified on any chain, the results array will be empty.
Show child attributes
Show child attributes
Was this page helpful?