Verify with Parex Block Explorer

Verifying your deployed contract using flattened source code, JSON input, Sourcify and more.

Once verified, a smart contract or token contract's source code becomes publicly available and verifiable, creating transparency and trust.

We are here reproducing part of their documentation for contract validation.

Verification is available for both Solidity and Vyper contracts. Currently, there are 6 methods for verification using the Parex Blocscan UI.

To learn more about the smart contract verification Rust microservice and verification algorithm see this page for developers.

Steps

  1. Once the code is deployed, you can view the transaction in detail on the Parex Block Explorer.

  1. Go to the Verify contract page (Other -> Verify contract)

  1. Enter in the contract address you received during deployment. The dropdown will show you several available verification options. Select the one you would like to use and continue.

Solidity (Flattened source code)

INFORMATION

To verify your smart contract, keep the following details handy:

  • Contract Name

  • Compiler

  • EVM version

  • Optimisation

The following table explains New Smart Contract Verification form in detail.

Click the Verify and Publish button.

If all goes well, you will see a checkmark ✅ next to Code in the code tab, and an additional tab called Read Contract. The contract name will now appear in BlockScout with any transactions related to your contract.

Solidity (Standard JSON input)

  1. Include nightly builds. You can choose Yes or No depending on your compiler.

  2. Compiler. Choose the compiler version used to compile your smart contract. If you selected yes for nightly builds, use the compiler version rather than the build.

  3. Standard Input JSON. Upload your Standard Input JSON file. File should follows solidity format and all the sources must be in Literal Content format, not a URL.

Click the Verify & publish button and wait for the response.

Vyper Contract

  1. Contract Name: Name assigned to the contract.

  2. Compiler: Select the compiler version used in the source code.

  3. EVM Version: Select the correct EVM version if known, otherwise use default.

  4. Contract Code: Copy and paste the contract code

  5. Click the Verify and Publish button.

If all goes well, you will see a checkmark ✅ next to Code in the code tab, and an additional tab called Read Contract. The contract name will now appear in BlockScout with any transactions related to your contract.

Troubleshooting

If you receive the dreaded There was an error compiling your contract message this means the bytecode doesn't match the supplied sourcecode. Unfortunately, there are many reasons this may be the case. Here are a few things to try:

  1. Double check the compiler version is correct.

Check all version digits - for example 0.5.1 is different from 0.5.10

  1. Check that an extra space has not been added to the end of the contract. When pasting in, an extra space may be added. Delete this and attempt to recompile.

  2. Copy, paste, and verify your source code in Remix. You may find some exceptions here.

Verification in a dev environment

The Hardhat verification plugin supports BlockScout. You can also choose to use the Sourcify plugin to verify with Sourcify from your hardhat environment.

Feel free to explore the Block Explorer further!

Last updated