Skip to main content
Verifying a smart contract allows developers to review your code from within the CeloScan Block Explorer

Prerequisites

Project must be setup using Foundry

Verifying Contracts

Set your environment variable
// get your API key here: https://etherscan.io/register
export ETHERSCAN_API_KEY=<your etherscan API key>
Use the following command For Celo Sepolia Testnet:
forge verify-contract --chain-id 11142220 <contract_address> <contract_location> --etherscan-api-key $ETHERSCAN_API_KEY --watch
For Celo Mainnet:
forge verify-contract --chain-id 42220 <contract_address> <contract_location> --etherscan-api-key $ETHERSCAN_API_KEY
 --watch