API
Last updated
Last updated
The Solidity Analyzer API is designed to help developers and auditors analyze smart contracts for security vulnerabilities. It leverages the Slither static analysis tool to detect issues in Solidity contracts. The API also provides functionality to generate detailed security reports in PDF format.
Endpoint: https://api.iard.solutions/v2/
Method: GET
Description: This endpoint returns a welcome message.
Response:
https://api.iard.solutions/v2/analyze
POST
This endpoint analyzes a smart contract based on the provided blockchain, contract address, and code. It supports both single-file and multi-file contracts.
blockchain (str, optional): The name of the blockchain (e.g., "ethereum").
contract_address (str, optional): The address of the contract to be analyzed.
code (str, optional): The code of the contract to be analyzed. For multi-file contracts, this should be a JSON string where each key is the file name and the value is the file content.
sandboxId (str, optional): The sandbox ID for the BuildBear blockchain.
If you want to analyze by address, use the blockchain and contract_address parameters (and sandboxId if the blockchain is buildbear), and if you want to analyze by code, use the code parameter.
Success:
Error:
Single-File Contract:
Multi-File Contract:
Endpoint: https://api.iard.solutions/v2/report
Method: POST
Description: This endpoint generates a security report in PDF format based on the provided analysis results and project name.
Parameters:
project_name
(str): The name of the project.
Response:
Success: A PDF file named IARD_Solutions_audit.pdf
is returned as a download.
Error:
Example Request:
Endpoint: https://api.iard.solutions/v2/recommendation
Method: POST
Description: This endpoint provides AI-generated recommendations based on the provided vulnerability and recommendation details.
Parameters:
vulnerability
(str): The vulnerability description.
recommendation
(str): The recommendation details.
Response:
Success:
Error:
Example Request:
results
(str): The analysis results. (endpoint )