# Verifying a Smart Contract

Our block explorer [https://explorerl2.sx.technology/](https://explorer.sx.technology/) includes the ability for developers to verify any previously-deployed contracts.

Developers can reference this page which describes the verification process of how developers can use our explorer's contract verification form to verify their contracts.

## I. Preparing to verify via Standard Input JSON

Follow the simple steps below to verify your Smart Contracts:

1. Ensure your contracts have been deployed and note down their contract addresses
2. On BlockScout, under the **Contract** tab of your deployed Smart Contract, click on the button to **Verify & publish.**
3. You can then proceed to verify these contracts yourself via  'Standard Input JSON' (see [Part II](#ii.-verifying-via-standard-input-json) below).

## II. Verifying via Standard Input JSON

Please fill out all fields according to the official BlockScout docs [here](https://docs.blockscout.com/for-users/verifying-a-smart-contract#via-standard-json-input) - note that the uploaded JSON file should only consist of the following 3 keys taken from the `input` key:

* `language`
* `sources`
  * Within this section, we suggest you remove all entries that are unrelated to the contract you are verifying as any entries within this section will be included within the **Code** tab&#x20;
    * It is highly recommended to first *flatten* your Smart Contract prior to deploying - this will make it easier to distinguish required imports from other .sol files within your repository.
* `settings`

For your convenience, we've included an example .json file which can be referenced below:

```
{
  "language": "Solidity",
  "sources": {
    "@openzeppelin/contracts/token/ERC20/IERC20.sol": {
      "content": "// SPDX-License-Identifier: MIT ..."
    },

    ...

    "contracts/tokens/TestToken.sol": {
      "content": "// SPDX-License-Identifier: MIT ..."
    },
  },
  "settings": {
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "outputSelection": {
      "*": {
        "*": [
          "abi",
          "evm.bytecode",
          "evm.deployedBytecode",
          "evm.methodIdentifiers",
          "metadata",
          "storageLayout",
          "devdoc",
          "userdoc",
          "evm.gasEstimates"
        ],
        "": [
          "ast"
        ]
      }
    },
    "metadata": {
      "useLiteralContent": true
    }
  }
}
```

After filling the form click the **Verify & publish** button and wait for the response.

In a few moments you'll see a green check mark appear within the **Code** tab indicating that your contract has been verified successfully.&#x20;

Additionally, you'll see a **Read Contract** and **Write Contract** tab which will allow users to interact with all read and write functions of your Smart Contract.&#x20;


---

# 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.sx.technology/developers/mainnet-details/block-explorer/verifying-a-smart-contract.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.
