For the complete documentation index, see llms.txt. This page is also available as Markdown.

HTTP API

Generate token by following this Generating Private Key

Start a project scan

POST https://api.solidityscan.com/private/api-project-scan/

Name
Type
Description

Authorization*

String

Bearer <token>

Request Body

Name
Type
Description

project_url*

string

url of the project

project_branch

string

branch of the repository to scan

skip_file_paths

[string]

list of paths to skip when scanning

rescan

boolean

true if this scan has already been scanned, false if not.

Project Scan Example

curl --location 'https://api.solidityscan.com/private/api-project-scan/' \
--header 'accept: application/json, text/plain, */*' \
--header 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-fetch-dest: empty' \
--header 'sec-fetch-mode: cors' \
--header 'sec-fetch-site: same-origin' \
--header 'sec-gpc: 1' \
--header 'Authorization: Bearer <Your Token>' \
--header 'Content-Type: application/json' \
--data '{
    "provider": "github",
    "project_name": "SolidityScan",
    "project_url": "https://github.com/Shashank-In/SmartContract",
    "project_branch": "main",
    "project_skip_files":[]
}'
{
  "scan_report": {
    "client_id": 326,
    "file_url_list": null,
    "multi_file_scan_details": [
      {
        "issue_id": "SOLIDITY_PUBLIC_BURN",
        "metric_wise_aggregated_findings": [
          {
            "bug_hash": "865MXqQZ2gXMX6bMC6Dak67NXD8=",
            "bug_id": "SSP_2115_8",
            "bug_status": "pending_fix",
            "comment": "",
            "description_details": {
              "function_name": ""
            },
            "findings": [
              {
                "file_path": "/contracts/bep20/BEP20TokenImplementation.sol",
                "line_nos_end": [
                  241
                ],
                "line_nos_start": [
                  238
                ]
              }
            ],
            "scan_id": "c209c67e4fc786aa"
          }
        ],
        "no_of_findings": 36,
        "template_details": {
          "_created": "Thu, 01 Jan 1970 00:00:00 GMT",
          "_id": "64142385f39e851afed3ecc8",
          "_links": {
            "self": {
              "href": "issue_details/SOLIDITY_LONG_REQUIRE_REVERT_STRINGS",
              "title": "issues"
            }
          },
          "_updated": "Thu, 01 Jan 1970 00:00:00 GMT",
          "description_keys": [],
          "detection_logic": "not defined yet",
          "is_production_disabled": false,
          "issue_confidence": "2",
          "issue_description": "<p>The <code>require()</code> and <code>revert()</code> functions take an input string to show errors if the validation fails.</br>This strings inside these functions that are longer than <code>32 bytes</code> require at least one additional <code>MSTORE</code>, along with additional overhead for computing memory offset, and other parameters.</p>",
          "issue_id": "SOLIDITY_LONG_REQUIRE_REVERT_STRINGS",
          "issue_name": "LONG REQUIRE/REVERT STRINGS",
          "issue_remediation": "<p>It is recommended to short the strings passed inside <code>require()</code> and <code>revert()</code> to fit under <code>32 bytes</code>. This will decrease the gas usage at the time of deployment and at runtime when the validation condition is met.</p>",
          "issue_severity": "gas",
          "issue_status": "true",
          "multi_file_supported": "true",
          "version": "1"
        }
      }
    ],
    "multi_file_scan_status": "scan_done",
    "multi_file_scan_summary": {
      "count_files_analyzed": 15,
      "issue_severity_distribution": {
        "critical": 21,
        "gas": 120,
        "high": 20,
        "informational": 18,
        "low": 58,
        "medium": 10
      },
      "issues_count": 247,
      "lines_analyzed_count": 3183,
      "scan_time_taken": 16,
      "scans_ran": [
        "static_template_based"
      ],
      "score": "4.26",
      "score_v2": "85.27"
    },
    "project_branch": "master",
    "project_id": "bf4b2e27a7eca4a04c2e5b2f768e4054",
    "project_name": "mano-credshields-eth-bsc-swap-contracts",
    "project_sequence_id": 2115,
    "project_url": "https://github.com/mano-credshields/eth-bsc-swap-contracts",
    "quick_file_scan_details": "c209c67e4fc786aa",
    "reporting_status": "not_generated",
    "scan_id": "c209c67e4fc786aa",
    "scan_init_time": "2023-06-12T10:18:51.367790",
    "scan_status": "scan_done",
    "scan_type": "project",
    "skip_file_paths": []
  }
}

Verified Contract Scans

Start a block scan

POST https://api.solidityscan.com/private/api-start-scan-block/

Name
Type
Description

Authorization*

String

Bearer <token>

Request Body

Name
Type
Description

contract_address*

string

address of the contract

contract_platform*

string

contract_chain*

strin

chain which the contract belongs to

Block Scan CURL Example

Generate Report

Generate Report

POST https://api.solidityscan.com/private/api-generate-report/

Request Headers

Name
Type
Description

Authorization*

String

Bearer <token>

Request Body

Name
Type
Description

project_id*

string

project_id to generate report for

scan_id*

string

id of the scan associated

scan_type

string

block | project (Use block scan when generating report of scanned on-chain contract and use project type when generating report of github or file upload)

Generate Report CURL Example

Pre-Signed URL Generation

GEThttps://api.solidityscan.com/private/api-get-presigned-url/

Generates a pre-signed URL for uploading a file (e.g., test.sol).

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Response

Curl Example:


Scan Retrieval

POSThttps://api.solidityscan.com/private/api-get-scan/

Fetches the scan result of a specific project or file.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

client_id

number

Id of the client

scan_id

string

Id of the scan

scan_type

string

Type of Scan

project_id

string

Id of the project

Response

Curl Example:


File Scan

POSThttps://api.solidityscan.com/private/api-file-scan/

Uploads a file and initiates its scan.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

file_urls

array

An array containing all the URLs of the files.

project_name

string

Name of the project

project_type

string

Type of the project

Response

Last updated