EVM contract verification status
https://api.bittensor.ai/api/v2/evm/verifications/{verification_id}- Status
- Beta
- Auth
- Account access token or OAuth access token or API key
- Scope
data:read- Rate limit
plan
The state of a verification this account submitted (through this API or /etherscan/api): pending, verified_exact, verified_partial or failed.
Full description
The state of a verification this account submitted (through this API or /etherscan/api): pending, verified_exact, verified_partial or failed. Poll every few seconds while pending; a finished verification never changes. A failure carries a stable error_code and the verification service's message in error_detail. Only the submitting account can read a verification: any other account, or an id never issued, gets the same 404, so an id reveals nothing to anyone else.
Auth: a user's credential carrying data:read: the user's own API key, the user's signed-in session on bittensor.ai, or an OAuth access token the user granted to an application. An OAuth access token must also carry account:read: the user's consent for the application to read the user's own verifications. A credential that does not belong to a user (an application's key on its own) is refused with 403 INSUFFICIENT_PERMISSIONS, as is a token without account:read. No CSRF token needed (a read). The caller's own record: private, no-store, never stored by any cache. Not
Errors are application/problem+json: INVALID_ID (400, not a UUID), EVM_CONTRACT_VERIFICATION_NOT_FOUND (404, no verification with this id was submitted by this account), UNKNOWN_PARAMETER, CONTRACT_VERIFICATION_UNAVAILABLE (503, the verification service failed while the verification is still pending; Retry-After), CONTRACT_VERIFICATION_DISABLED (503, contract verification is off on this deployment).
Beta: this route may change with one release's notice in the v2 changelog; additive changes need none (x-stability: beta).
Path parameters
- verification_idpath, required· string
The
verification_idPOST /evm/contracts/{address}/verifyanswered (a UUID).- Format: UUID
Query parameters
- includequery· string
Reserved for opt-in sections. This route defines none yet; the parameter is declared so that adding one later is additive for generated clients. Any value is a 400
INVALID_INCLUDE.
Response
data is an object with these fields. Amounts are integer strings in their base unit, and null means unknown, never zero (see Units and formats). meta.at names the block the answer was read at.
The verification job.
- verification_idstring · can be null
The id to poll with
GET /evm/verifications/{verification_id}(a UUID). Only the submitting account can read it. Null when nothing was submitted (already_verified) or the verification service refused the submission outright (failedstraight away).- statusstring
already_verified: the contract already has an exact match, so nothing was submitted (no quota used).pending: submitted; poll until it changes.verified_exact/verified_partial: verified (exact match: byte for byte, metadata hash included; partial: all but the metadata hash).failed: seeerror_code. A finished state never changes. New values may be added; show an unknown value as is (or generically).- addressstring
The contract's address, 0x H160, lower case.
- Format: EVM address: 0x and 40 hex digits
- chain_idinteger · unit id
The EVM chain the verification is for: 964 (Bittensor EVM mainnet).
- contract_identifierstring
The submitted
path:Name, e.g.src/Token.sol:Token.- compiler_versionstring
The submitted solc version, e.g.
0.8.17+commit.8df45f5f.- error_codestring · can be null
Why it failed, as a stable code. Null unless
statusisfailed. Codes:no_match(the recompiled bytecode differs from the deployed one),bytecode_length_mismatch(it differs in length: usually other compiler settings, e.g. optimizer runs,viaIRor EVM version),creation_bytecode_mismatch(the creation code or given creation transaction does not match),contract_not_deployed(no contract at the address),onchain_bytecode_unavailable(the chain's bytecode could not be read; retry),compilation_failed(the input does not compile;error_detailhas the compiler's errors),compilation_resource_limit(the compiler timed out or ran out of memory),compiled_bytecode_empty(the named contract compiles to no code: abstract contract or interface),invalid_compiler_version,contract_not_found(contract_identifieris not in the compiler output),missing_sources,unsupported_language,invalid_request,already_verified(another verification made it verified meanwhile),duplicate_verification_request(a verification of this contract is already running; retry when it has finished),verification_interrupted(the verification service lost the job; resubmit), andverification_failedfor anything else. The vocabulary is open: treat an unknown code asverification_failed.- error_detailstring · can be null
The verification service's own message for the failure (plain text, at most 4000 characters, may include compiler errors). For display; match on
error_code, never on this. Null unless failed.- matchenum · can be null
The overall match once verified (or the existing one when
already_verified).exact_match: the recompiled bytecode matches byte for byte, metadata hash included, so the sources are exactly the ones deployed.match: it matches except for the metadata hash (a partial match: same code, but comments or file layout may differ), and can later be upgraded toexact_match. Sourcify's own words. Null until verified.- One of:
exact_match,match - creation_matchenum · can be null
The creation bytecode's match. Null until verified, or when it could not be checked.
- One of:
exact_match,match - runtime_matchenum · can be null
The runtime bytecode's match. Null until verified.
- One of:
exact_match,match - verified_atstring (date-time) · can be null
When the verification was recorded (RFC 3339 UTC). Null until verified.
- Format: date and time, ISO 8601 in UTC
- submitted_atstring (date-time) · can be null
When this account submitted it (RFC 3339 UTC). Null for
already_verified(nothing submitted).- Format: date and time, ISO 8601 in UTC
- completed_atstring (date-time) · can be null
When the verification finished, verified or failed (RFC 3339 UTC). Null while pending.
- Format: date and time, ISO 8601 in UTC
Response headers
6 headers: Cache-Control, RateLimit-Policy, RateLimit, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
- Cache-Control
One of three classes: settled
public, max-age=3600, stale-while-revalidate=86400(pinned to a block that cannot move), slowpublic, max-age=300, stale-while-revalidate=600(state that moves in minutes or days) or tippublic, max-age=6, stale-while-revalidate=12(follows the chain head); the label routes are cached until the next nightly copy (public, max-age=<seconds>, stale-while-revalidate=60). Neverimmutable.no-storeon an earlier answer served because the data source failed (X-BTAI-Stale).- RateLimit-Policy
The tier's request quota of the current window (IETF draft), e.g.
"tier";q=600.- RateLimit
Requests left in the current window and the seconds until it resets (IETF draft), e.g.
"tier";r=597;t=42.- X-RateLimit-Limit
The tier's request quota of the current window.
- X-RateLimit-Remaining
Requests left in the current window.
- X-RateLimit-Reset
When the current window resets, Unix seconds.
Status codes
200 · 400 · 401 · 402 · 403 · 404 · 429 · 500 · 502 · 503
Error codes
The codes this endpoint can return. Each links to what it means and what to do.
- AMBIGUOUS_CREDENTIALS
- BILLING_UNAVAILABLE
- BUDGET_EXCEEDED
- CONCURRENCY_LIMIT
- CONTRACT_VERIFICATION_DISABLED
- CONTRACT_VERIFICATION_UNAVAILABLE
- EVM_CONTRACT_VERIFICATION_NOT_FOUND
- INSUFFICIENT_PERMISSIONS
- INTERNAL_ERROR
- INVALID_ID
- INVALID_INCLUDE
- PAYMENT_REQUIRED
- PLAN_REQUIRED
- RATE_LIMITED
- SERVICE_UNAVAILABLE
- SOURCE_BUSY
- UNAUTHORIZED
- UNKNOWN_PARAMETER
- VALIDATION_ERROR
From the API's published specification, version 1.165.0.