Get verified contract at an address on all chains
curl --request GET \
--url https://sourcify.dev/server/v2/contract/all-chains/{address}import requests
url = "https://sourcify.dev/server/v2/contract/all-chains/{address}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sourcify.dev/server/v2/contract/all-chains/{address}', 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/contract/all-chains/{address}",
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/contract/all-chains/{address}"
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/contract/all-chains/{address}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sourcify.dev/server/v2/contract/all-chains/{address}")
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": "1",
"address": "0xDFEBAd708F803af22e81044aD228Ff77C83C935c",
"verifiedAt": "2024-07-24T12:00:00Z",
"matchId": "421"
},
{
"match": "match",
"creationMatch": "match",
"runtimeMatch": "match",
"chainId": "11155111",
"address": "0xDFEBAd708F803af22e81044aD228Ff77C83C935c",
"verifiedAt": "2025-02-10T14:45:00Z",
"matchId": "5531"
}
]
}{
"customCode": "unsupported_chain",
"message": "The chain with chainId 9429413 is not supported",
"errorId": "1ac6b91a-0605-4459-93dc-18f210a70192"
}{
"results": []
}{
"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
Get verified contract at an address on all chains
Returns all verified deployments at an address on all Sourcify chains (including deprecated ones).
Success returns an array of VerifiedContractMinimal objects under results field.
If not verified on any chain, the results array will be empty.
GET
/
v2
/
contract
/
all-chains
/
{address}
Get verified contract at an address on all chains
curl --request GET \
--url https://sourcify.dev/server/v2/contract/all-chains/{address}import requests
url = "https://sourcify.dev/server/v2/contract/all-chains/{address}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sourcify.dev/server/v2/contract/all-chains/{address}', 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/contract/all-chains/{address}",
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/contract/all-chains/{address}"
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/contract/all-chains/{address}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sourcify.dev/server/v2/contract/all-chains/{address}")
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": "1",
"address": "0xDFEBAd708F803af22e81044aD228Ff77C83C935c",
"verifiedAt": "2024-07-24T12:00:00Z",
"matchId": "421"
},
{
"match": "match",
"creationMatch": "match",
"runtimeMatch": "match",
"chainId": "11155111",
"address": "0xDFEBAd708F803af22e81044aD228Ff77C83C935c",
"verifiedAt": "2025-02-10T14:45:00Z",
"matchId": "5531"
}
]
}{
"customCode": "unsupported_chain",
"message": "The chain with chainId 9429413 is not supported",
"errorId": "1ac6b91a-0605-4459-93dc-18f210a70192"
}{
"results": []
}{
"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
Contract's 20 byte address in hex string with the 0x prefix. Case insensitive.
Required string length:
42Pattern:
(\b0x[a-fA-F0-9]{40}\b)Example:
"0x2738d13E81e30bC615766A0410e7cF199FD59A83"
Response
Returns all verified deployments at an address on all Sourcify chains
Show child attributes
Show child attributes
Was this page helpful?
⌘I