# SolidityScan SDK

## SolidityScan SDK

SolidityScan is a cloud-based smart-contract vulnerability scanner built to discover vulnerabilities and help publish audit reports after vulnerability mitigations.

### Get your API keys <a href="#get-your-api-keys" id="get-your-api-keys"></a>

Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.

### Install your API Access key <a href="#install-your-api-access-key" id="install-your-api-access-key"></a>

Get the access key by following the steps mentioned [here](#get-your-api-keys)

Install your access key by using the command below directly.

```
solidityscan config add-update-config --token='youraccesskey'
```

This command will create a configuration file at the default location for your system. If a config file already exists, it will overwrite the accesskey in that file.

To view the config path you can use this command

```
solidityscan config show_config_path
```

### Download or Install the SDK <a href="#download-or-install-the-sdk" id="download-or-install-the-sdk"></a>

The best way to interact with our API is to use pip.

```
pip install solidityscan
```

### Features <a href="#features" id="features"></a>

***Project Scan***

* Scan your public and private repositories hosted on Github.

***Verified Contract Scan***

* Initiate scans on contracts deployed both on Testnets and Mainnets.
* SolidityScan currently supports Ethereum, Binance, Polygon, and Avalanche.

### Examples <a href="#examples" id="examples"></a>

***Perform a Project Scan***

```
solidityscan scan --scan-type="project" -project-url="https://github.com/Shashank-In/SmartContract" -project-branch="main"
```

***Perform Project Rescan***

```
solidityscan scan --scan-type="project" -project-url="https://github.com/Shashank-In/SmartContract" -project-branch 'test' -rescan
```

***Perform a Verified Contract Scan***

```
solidityscan scan --scan-type="contract" -contract-address="0x633bA1eeDbE63a779Eca6A1EbE86908Ac2710D0b" -contract-chain="mainnet" -contract-platform="etherscan"
```

***Generating Report***

```
solidityscan report --report-type="generate" -project-id="your-project-id" -scan-id="your-scan-id"
```

***Adding or Updating token to config***

```
solidityscan config add-update-config --token='yourtoken'
```

***Setting default error language (defaults to English (en))***

```
solidityscan config add-update-config --error-language='es'
```

### Error codes <a href="#error-codes" id="error-codes"></a>

{% tabs %}
{% tab title="000x" %}

```
Errors raised by the server
```

{% endtab %}

{% tab title="100x" %}

```
100x - Errors raised by the SDK
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidoc.solidityscan.com/solidityscan-security-api/getting-started/solidityscan-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
