Skip to content

Latest commit

 

History

History
73 lines (50 loc) · 2.98 KB

verify-a-contract.md

File metadata and controls

73 lines (50 loc) · 2.98 KB
description
This page lists various Filecoin Ethereum Virtual Machine (FEVM) explorers with verification tools, and provides a tutorial on how to verify a contract using Filfox.

Verify a contract

Verification tools

The following FEVM-compatible chain explorers offer contract verification tools. For more information, click the appropriate link below.

Verification tutorial with Filfox

The following guide walks you through the process of contract verification using the Filfox explorer.

Prerequisites

  • A smart contract (.sol file)
  • Remix

Procedure

  1. Open Remix:

  1. In the File Explorer sidebar tab, under contracts, right click on the contract you want to verify.

  2. From the menu, select generate UML to flatten the <contract-name>.sol file and ensure that all components and tasks are included.

    A new contract with the name <contract-name>_flattened.sol is generated below your original contract.

  3. Ensure that the license and Solidity version in the flattened contract is the same as in your original contract.

  4. Click Save.

  5. Right click on <contract-name>_flattened.sol.

  6. In the menu, click Download to save the file.

  7. Note the following information, as you will need it later:

    • The address of your deployed contract
    • The contract license type (if any)
    • The Solidity compiler version
  8. Navigate to Filfox.

  9. In the form, enter the information noted previously for the deployed contract you would like to verify:

    • The address
    • The license type
    • The compiler version

  1. Click Continue.
  2. Click *Select .sol files.
  3. Select your flattened .sol file.
  4. Click Verify and Publish.

![](../../.gitbook/assets/smart-contracts-developing-contracts-verify-a-contract-verify-and -publish.jpg)

Success! Your contract is now verified.

  1. To view your verified contract:
    1. Enter the address of the contract in the Filfox search bar.

2.  Scroll down the contract page and select the **Contract** tab.

    A **Contract Source Code Verified** banner is displayed, along with contract information and source code. You can also [view other verified contracts on Filfox](https://filfox.info/en/stats/verified-contracts).