curl --request GET \
--url https://app.blockgence.com/v1/contract/{chain}/{addr} \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.blockgence.com/v1/contract/{chain}/{addr}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://app.blockgence.com/v1/contract/{chain}/{addr}', 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/contract/{chain}/{addr}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://app.blockgence.com/v1/contract/{chain}/{addr}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.blockgence.com/v1/contract/{chain}/{addr}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/contract/{chain}/{addr}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
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>"
}{
"error": "source_unavailable",
"detail": "<string>",
"source": "<string>",
"reason": "<string>",
"retryable": true,
"chain": "<string>",
"primitive": "<string>",
"operation": "<string>",
"target": "<string>",
"http_status": 123,
"retry_after": 123,
"upstream_message": "<string>",
"source_fault": true,
"failure_cause": "<string>"
}Contract inspection
Returns who controls an EVM contract and who can move, mint or freeze its funds, read on-chain at a fixed block.
Each assertion cites in evidence the storage slot, call, code or log, with its block and source.
Main fields:
account:contract,eoaoreoa_delegated(EIP-7702). If the address is not a contract, the response ends there.proxy: the proxy type, read from storage (eip1967_transparent,eip1967_uups,eip1967_beacon,eip1967,zeppelinos,eip1822,eip1167_minimalorsafe), the implementation and who can upgrade it.abi: whether the implementation code is verified.getters: the authority functions (owner(),pendingOwner(),pauser()and similar) with what they return, andpaused.roles: the AccessControl roles with their members, each confirmed withhasRoleat that block.accounts: the accounts that control the contract: EOA, Safe (with owners and threshold), timelock or ProxyAdmin.privileged_functionsandpowers: the sensitive functions by category (upgrade,admin,pause,mint,freeze,seize,rescue,execute) and who holds them.basisdistinguishes a fact (deterministic,role_admin,safe_owners,safe_module) from a name-based lead (getter_name,role_name).authority_changes: the implementation, admin, owner, role and pause changes since creation.simulation: who passes each sensitive function in a simulation at the same block, compared with a control address without permissions. It is a simulation, not a permission: a revert is never read as “cannot”.summary,reasons,coverage,not_coveredanddegraded_sources.
For third-party security flags, use GET /v1/security/{addr}.
Not covered, as a fact: who can call each function according to the code modifiers (it is given as a lead or as a simulation), Diamonds (EIP-2535), the OpenZeppelin 5 AccessManager and proxies with custom slots.
Errors: a non-EVM network, an invalid address or a future block return 400. On networks where the state of a
past block cannot be read, without block the current state is read (declared in coverage.state_note) and
with block the response is 503 with no charge, never the current data.
Cost: 10 credits base. Some operations charge less when they reuse a saved result; never more.
curl --request GET \
--url https://app.blockgence.com/v1/contract/{chain}/{addr} \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.blockgence.com/v1/contract/{chain}/{addr}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://app.blockgence.com/v1/contract/{chain}/{addr}', 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/contract/{chain}/{addr}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://app.blockgence.com/v1/contract/{chain}/{addr}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.blockgence.com/v1/contract/{chain}/{addr}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/contract/{chain}/{addr}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
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>"
}{
"error": "source_unavailable",
"detail": "<string>",
"source": "<string>",
"reason": "<string>",
"retryable": true,
"chain": "<string>",
"primitive": "<string>",
"operation": "<string>",
"target": "<string>",
"http_status": 123,
"retry_after": 123,
"upstream_message": "<string>",
"source_fault": true,
"failure_cause": "<string>"
}Authorizations
Headers
Path Parameters
Query Parameters
Evaluation mode, to analyze a past incident without later information. With true, it requires block (the one before the event), does not cite labels from incident registries or private labels, and declares what was excluded in the eval_mode field of the response. Default: false.
Response
The contract inspection.