Create Scan
Last updated
Last updated
POST
/v1.1/scans
Create a scan which analyzes smart contracts. Scans can either be created by included the source files or by specifying the blockchain id and the contract address. There are two types source code analysis, "ai" and "codescan".
Headers
Name | Value |
---|---|
Body
The body is a "params" JSON object with the following keys
Name | Type | Description |
---|---|---|
Upload Scan Example
Blockchain Explorer Scan Example.
A list of acceptable values for the chain_id are listed here.
Response
returns ScanPlacement Result Object
Webhook Response
Once a scan completes, AuditBase will callback a webhook with the following data:
Content-Type
application/json
Authorization
Bearer <api_key>
name
string
Scan label
source
string
"upload" for direct file input, "explorer" for blockchain explorer source code retrieval
type
string
Model used to analyze the source code. "ai" or "codescan".
files [upload source]
JSON Array of files
[{"file_name": "file1.sol", "content": "uint var1; ..."}]
chain_id [explorer source]
integer
contract_address [explorer source]
string
The address of a contract with verified source code
webhook_url [optional]
string
URL where you would like the results sent in a post request
language [optional] default="solidity"
string
The language of the source code. "solidity" or "cosmos" for ai scan. "solidity" for codescan.