Load the deployed addresses of a review
curl --request POST \
--url https://app.blockgence.com/v1/audit/{audit_id}/deploy \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"chain": "<string>",
"addresses": [
{
"address": "<string>",
"role": "contract",
"label": "<string>"
}
]
}
'import requests
url = "https://app.blockgence.com/v1/audit/{audit_id}/deploy"
payload = {
"chain": "<string>",
"addresses": [
{
"address": "<string>",
"role": "contract",
"label": "<string>"
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chain: '<string>',
addresses: [{address: '<string>', role: 'contract', label: '<string>'}]
})
};
fetch('https://app.blockgence.com/v1/audit/{audit_id}/deploy', 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://app.blockgence.com/v1/audit/{audit_id}/deploy",
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([
'chain' => '<string>',
'addresses' => [
[
'address' => '<string>',
'role' => 'contract',
'label' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://app.blockgence.com/v1/audit/{audit_id}/deploy"
payload := strings.NewReader("{\n \"chain\": \"<string>\",\n \"addresses\": [\n {\n \"address\": \"<string>\",\n \"role\": \"contract\",\n \"label\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://app.blockgence.com/v1/audit/{audit_id}/deploy")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chain\": \"<string>\",\n \"addresses\": [\n {\n \"address\": \"<string>\",\n \"role\": \"contract\",\n \"label\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/audit/{audit_id}/deploy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chain\": \"<string>\",\n \"addresses\": [\n {\n \"address\": \"<string>\",\n \"role\": \"contract\",\n \"label\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"detail": "<string>",
"error": "<string>"
}{
"detail": "<string>",
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "<string>",
"error": "<string>"
}Audit
Load the deployed addresses of a review
Registers the addresses deployed on a network for a review of your organization. It replaces the addresses previously registered on that network with those in the request; an empty list removes them.
Request body (JSON).
chain(required): deployment network, from those listed byGET /v1/chains.addresses(required): up to 20 objects withaddress(EVM,0x+ 40 hex),role(proxy,implementationorcontract, the default) andlabel(up to 80 characters).
Response. The updated deploy section: {demo, audit_id, section, data}.
Verification. Each address is left with verification.result: "pending". Comparing the bytecode with the
commit will be available soon, and an address is never reported as verified without that comparison. This
operation does not read on-chain control: the control report is obtained with
GET /v1/contract/{chain}/{addr}, which has its own cost.
Errors. With body {"error": …, "detail": …}:
400:bad_chain,bad_addresses,bad_addressorbad_role.403 demo_read_only: an example audit cannot be modified.403 org_requiredor403 read_only: the API key has no organization or the role is read-only.404 not_found: the audit does not exist or belongs to another organization.
Cost: free.
POST
/
v1
/
audit
/
{audit_id}
/
deploy
Load the deployed addresses of a review
curl --request POST \
--url https://app.blockgence.com/v1/audit/{audit_id}/deploy \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"chain": "<string>",
"addresses": [
{
"address": "<string>",
"role": "contract",
"label": "<string>"
}
]
}
'import requests
url = "https://app.blockgence.com/v1/audit/{audit_id}/deploy"
payload = {
"chain": "<string>",
"addresses": [
{
"address": "<string>",
"role": "contract",
"label": "<string>"
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chain: '<string>',
addresses: [{address: '<string>', role: 'contract', label: '<string>'}]
})
};
fetch('https://app.blockgence.com/v1/audit/{audit_id}/deploy', 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://app.blockgence.com/v1/audit/{audit_id}/deploy",
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([
'chain' => '<string>',
'addresses' => [
[
'address' => '<string>',
'role' => 'contract',
'label' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://app.blockgence.com/v1/audit/{audit_id}/deploy"
payload := strings.NewReader("{\n \"chain\": \"<string>\",\n \"addresses\": [\n {\n \"address\": \"<string>\",\n \"role\": \"contract\",\n \"label\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://app.blockgence.com/v1/audit/{audit_id}/deploy")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chain\": \"<string>\",\n \"addresses\": [\n {\n \"address\": \"<string>\",\n \"role\": \"contract\",\n \"label\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/audit/{audit_id}/deploy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chain\": \"<string>\",\n \"addresses\": [\n {\n \"address\": \"<string>\",\n \"role\": \"contract\",\n \"label\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"detail": "<string>",
"error": "<string>"
}{
"detail": "<string>",
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "<string>",
"error": "<string>"
}Authorizations
APIKeyHeaderBearerAuth
Headers
Path Parameters
Body
application/json
Response
Successful response.