# Multichain Verification(WIP)

For repeated or multichain contract verification, it's best to use the Verify Contract endpoint to automate source code submission :rabbit2:.

## 1. Using the Verify Contract Endpoint <a href="#id-1.-using-the-verify-contract-endpoint" id="id-1.-using-the-verify-contract-endpoint"></a>

In Postman, set your request method to **HTTP POST** and your URL to `https://api.xdcscan.io/` .

Under the Body tab and using `form-data`, specify the "module" to `contract` and "action" to `verifysourcecode.`

## 2. Specify Your chainId <a href="#id-2.-specify-your-chainid" id="id-2.-specify-your-chainid"></a>

Select the chain you've deployed your contract, which is supported by an Etherscan-like explorer.

Specify it under the "chainId" parameter, such as `51` for Apothem and `8453` for Base.

## 3. Add Contract Source Code <a href="#id-3.-add-contract-source-code" id="id-3.-add-contract-source-code"></a>

We support 2 formats, `solidity-single-file` or `solidity-standard-json-input.`

Using JSON is the gold standard ✨ for verification, as you can [**include compiler settings and multiple files**](https://gist.github.com/0xV4L3NT1N3/974d6bfb58070e0fe4e38d626cdf1c44) ( if you use imports such as from [**OpenZeppelin**](https://www.openzeppelin.com/contracts) ).

Paste your source code under "sourceCode" and the code format under the "codeformat" parameter.

Optionally if your contract uses \[**constructor arguments**], you may specify them too under the "constructorArguements" parameter in [**ABI encoded**](https://abi.hashex.org/) format.

## 4. Add Contract Metadata <a href="#id-4.-add-contract-metadata" id="id-4.-add-contract-metadata"></a>

Include the contract address as "contractaddress", beginning with "0x".

Specify your contract file path and contract name **separated by a colon** as "contractname", such as "contracts/Verified.sol:Verified".

## 5. Submitting Verification <a href="#id-5.-submitting-verification" id="id-5.-submitting-verification"></a>

If everything went well, you'll see the happy green checkmark on your [**contract code**](https://xdc.blocksscan.io/address/0x1f45725b14d6a87d87e94c9402221f7a2ef18e67?tab=contract#code) ✅


---

# 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://docs.blocksscan.io/contract-verification/multichain-verification-wip.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.
