Create Scan
Create a New Scan
Name
Value
Name
Type
Description
file1 = Path('./example.sol').read_text()
file2 = Path('./example2.sol').read_text()
file3 = Path('./example3.sol').read_text()
key = "<your auditbase key>"
host = 'https://api.auditbase.com'
route = '/v1.1/scans'
url = host + route
post_data = {
"params":{
"source": "upload",
"name": "scan1",
"files": [{"file_name": "file1.sol", "content": file1},
{"file_name": "file2.sol", "content": file2}]
,
"webhook_url": "https://yourwebhook/webhook",
"type": "ai",
"language": "solidity",
},
}
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {key}',
}
response = requests.post(url, json=post_data, headers=headers)
print("response: ", response.json())
Last updated