Check verification job status
curl --request GET \
--url https://sourcify.dev/server/v2/verify/{verificationId}import requests
url = "https://sourcify.dev/server/v2/verify/{verificationId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sourcify.dev/server/v2/verify/{verificationId}', 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/verify/{verificationId}",
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/verify/{verificationId}"
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/verify/{verificationId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sourcify.dev/server/v2/verify/{verificationId}")
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{
"isJobCompleted": true,
"verificationId": "72d12273-0723-448e-a9f6-f7957128efa5",
"jobStartTime": "2024-07-24T11:00:00Z",
"jobFinishTime": "2024-07-24T12:00:00Z",
"compilationTime": "1333",
"contract": {
"match": "match",
"creationMatch": "match",
"runtimeMatch": "match",
"chainId": "11155111",
"address": "0xDFEBAd708F803af22e81044aD228Ff77C83C935c",
"verifiedAt": "2024-07-24T12:00:00Z",
"matchId": "3266227"
}
}Contract Verification API
Check verification job status
Endpoint to get the status of a verification job.
Alternatively you can directly check the verification status of a contract with with chainId+address at GET /v2/contract/{chainId}/{address}
GET
/
v2
/
verify
/
{verificationId}
Check verification job status
curl --request GET \
--url https://sourcify.dev/server/v2/verify/{verificationId}import requests
url = "https://sourcify.dev/server/v2/verify/{verificationId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sourcify.dev/server/v2/verify/{verificationId}', 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/verify/{verificationId}",
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/verify/{verificationId}"
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/verify/{verificationId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sourcify.dev/server/v2/verify/{verificationId}")
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{
"isJobCompleted": true,
"verificationId": "72d12273-0723-448e-a9f6-f7957128efa5",
"jobStartTime": "2024-07-24T11:00:00Z",
"jobFinishTime": "2024-07-24T12:00:00Z",
"compilationTime": "1333",
"contract": {
"match": "match",
"creationMatch": "match",
"runtimeMatch": "match",
"chainId": "11155111",
"address": "0xDFEBAd708F803af22e81044aD228Ff77C83C935c",
"verifiedAt": "2024-07-24T12:00:00Z",
"matchId": "3266227"
}
}Path Parameters
Response
The verification job completed either with success or failure. This endpoint returns 200 even if the verification job fails. Check the contract.match field and error for verification statuses.
If the job is not completed yet (i.e. pending), the isJobCompleted will be false.
Optional, when the verification fails for some reason.
Show child attributes
Show child attributes
Example:
{
"customCode": "no_match",
"message": "The onchain and recompiled bytecodes don't match.",
"errorId": "1ac6b91a-0605-4459-93dc-18f210a70192",
"recompiledCreationCode": "0x608060405234801561001057600080fd5b5060043610610036570565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea264697066735821220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033",
"recompiledRuntimeCode": "0x608060405234801561001057600080fd5b5060043610610036570565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea264697066735821220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033",
"onchainCreationCode": "0x608060405234801561001057600080fd5b5060043610610036570565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea264697066735821220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070034",
"onchainRuntimeCode": "0x608060405234801561001057600080fd5b5060043610610036570565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea264697066735821220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070034",
"creationTransactionHash": "0xb6ee9d528b336942dd70d3b41e2811be10a473776352009fd73f85604f5ed206"
}
Was this page helpful?