> For the complete documentation index, see [llms.txt](https://docs.chiliz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chiliz.com/develop/basics/verify-a-smart-contract/verify-with-chiliscan.md).

# Verify with Chiliscan

Verify smart contracts on Chiliz Chain via Chiliscan (Routescan) using the web form, Hardhat plugin, or Routescan API.

[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.\
   *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&amp;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.30+xxx" as the compiler version.
   2. Select "Prague" 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&amp;token=ae62b09e-920d-4b17-b58d-698ee8806769" alt=""><figcaption></figcaption></figure>

For instance, here is the verified $PSG Fan Token contract on Chiliscan:

{% embed url="<https://chiliscan.com/token/0xfe1d4a935df7a4a52f835f6104c97af9d72217f2/contract/code>" %}

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)

## 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.

* 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.chiliz.com/develop/basics/verify-a-smart-contract/verify-with-chiliscan.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
