# Verify with Chiliscan

[Chiliscan](https://chiliscan.com/) is a service built by Routescan. You can therefore rely on [their documentation](https://routescan.io/documentation) for your everyday use.

Routescan provides several ways to verify your smart contract on Chiliz Chain:

* For most contracts: using their verification form on Chiliscan
* For more complex contracts: using command-line tools, such as Hardhat.
* For easy contracts: using their API.

See Routescan's [documentation on contract verification](https://info.routescan.io/en/collections/14599808-contract-verification).

## Using Chiliscan's verification form

Chiliscan provides a contract verification interface for Chiliz Mainnet at <https://chiliscan.com/verifycontract>.\
It is also documented here: <https://info.routescan.io/en/articles/11991234-verifying-contracts-ui>

{% hint style="info" %}
You can also verify contract on Spicy Testnet with this interface:\
<https://testnet.chiliscan.com/verifycontract>
{% endhint %}

{% hint style="info" %}
For multi-file contracts, ensure your code has been flattened before uploading.

For instance, if you use Remix IDE, you can right click on your compiled `contract-XYZ.sol` contract file in the File Explorer, and choose the "Flatten" option. \
Then, download the resulting file (named  `contract-XYZ_flattened.sol` in order to upload it to the verification form.
{% endhint %}

Steps:

1. In the "Contract address" field, insert the address of the smart contract that you want to verify.\
   \&#xNAN;*Depending on the situation, the tool can tell you that a contract doesn't exist yet on Chiliz Chain, or that it has already been verified. If it's neither, further interface elements are displayed.*<br>

   <figure><img src="https://3400301555-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4L7rBH2rmyoBTn93MSdx%2Fuploads%2FRVRhVHIbsIpIvZqVJjTK%2Fimage.png?alt=media&#x26;token=89e14150-f513-4d1f-ab81-fe3f116b9b24" alt="" width="375"><figcaption></figcaption></figure>
2. Click on "Import from Solidity", and fill the form correctly:
   1. Select "0.8.24+xxx" as the compiler version.
   2. Select "Shangai" as the EVM version.
   3. Upload your contract file.
3. Click on "Verify Contract".

If successful, your contract will be clearly labeled as verified, notably with a green check. The block explorer will make its source code visible and enable all interactive features.

<figure><img src="https://3400301555-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4L7rBH2rmyoBTn93MSdx%2Fuploads%2FFSDJLQg3bnNeDzWo3MRf%2Fimage.png?alt=media&#x26;token=ae62b09e-920d-4b17-b58d-698ee8806769" alt=""><figcaption></figcaption></figure>

If any errors occur, the interface will display a corresponding error message to guide you.

## Using command-line tools

Routescan's own documentation features [detailed guides](https://info.routescan.io/en/collections/14599808-contract-verification) on how to use command-line tools for verification. This is particularly useful if you're already want to automate contract verification in your development environment.

You can read their guides on deploying & verifying with:

* [Hardhat v2](https://info.routescan.io/en/articles/11991333-deploying-and-verifying-contracts-hardhat)
* [Hardhat v3](https://info.routescan.io/en/articles/12867834-deploying-and-verifying-contracts-hardhat-v3)
* [Foundry](https://info.routescan.io/en/articles/11992459-deploying-and-verifying-contracts-foundry)
* [Catapulta](https://info.routescan.io/en/articles/11992643-deploying-and-verifying-contracts-catapulta)

## Using Routescan's API

Routescan has a dedicated contract API, which you can use to verify contracts:

{% embed url="<https://routescan.io/documentation/api/etherscan-like/contracts>" %}

If you are working with simpler smart contracts, a Routescan-provided guide is available on Paragraph.com. This guide walks you through the steps to prepare and verify contracts that do not require complex build processes.&#x20;

* Access [A Guide to Easily Verify Your Smart Contract Programmatically Using Routescan's API](https://paragraph.com/@routescan-io/a-guide-to-easily-verify-your-smart-contract-programmatically-using-routescan-s-api).

Of note: it requires contracts to be flattened.
