Verifying a Smart Contract

Our block explorer https://explorerl2.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 below).

II. Verifying via Standard Input JSON

Please fill out all fields according to the official BlockScout docs here - 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

      • 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:

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.

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.

Last updated

Was this helpful?