Skip to main content

Use Explorer to Verify Smart Contracts

There are multiple methods of verification available via Mantle Explorer.

Via Flattened Source Code

Get flattened source code

  1. In Remix, right-click on the contract file and click on "Flatten".

  2. Flattening a contract with imports will generate a new Solidity file with the flattened code that you can copy, as shown below.

Plugging Flattened Code Into Explorer

Once you have obtained the flattened code, fill in the contract address, contract name, the flattened code, and other fields on Mantle Explorer and proceed with verifying your contract.

info

Make sure to select the correct compiler for your contract, the proper EVM version and the optimization number.

Via Standard Input JSON

Get JSON file

  1. The file can be found under the "Solidity Compiler" tab that can be accessed by clicking on the left navigate bar.

  2. Click on the Compilation Details button to bring up a menu from where you can copy the COMPILERINPUT code, as shown below.

Importing JSON file to Explorer

Once you've obtained the standard input JSON values in a file, you can import it to the explorer, as shown below.