Skip to main content

How to Verify Contracts

Using the UI (legacy)

  1. Drag and drop the folder containing your source files and metadata, or add them seperately.
  2. Input the contract address you want to verify.
  3. Select the chain the contract is deployed to.
  4. Click "Verify".


Foundry natively supports Sourcify verification. You can verify contracts with the additional verify flags in Forge:

Deploy and verify a contract:

forge create --rpc-url <your_rpc_url> \
--constructor-args "ForgeUSD" "FUSD" 18 1000000000000000000000 \
--private-key <your_private_key> \
src/MyToken.sol:MyToken \
--verify \
--verification-provider sourcify
forge verify-contract 0x55f7d4279CE387067f12561e7E0c194f5186cFba \
src/MyToken.sol:MyToken \
--chain-id 11155111 \
--verifier sourcify
forge verify-check 0x55f7d4279CE387067f12561e7E0c194f5186cFba \
--chain-id 11155111 \
--verifier sourcify


hardhat-deploy plugin

The Hardhat plugin @wighawag/hardhat-deploy has Sourcify support. After deploying your contracts with the plugin you can easily verify your contracts with:

hardhat --network mainnet sourcify

hardhat-sourcify plugin

The plugin @xtools-at/hardhat-sourcify can verify any contract deployed with Hardhat. After adding the plugin to your hardhat.config file, you can verify your contracts using:

hardhat --network mainnet verify-sourcify --contract "MyContract" --address 0x12345...

With Hardhat output

Sourcify can parse the Hardhat .json output file under artifacts/build-info to verify contracts.


Only after Hardhat version v2.6.8 the metadata files were output by default. If you are using an earlier version, you need to add the metadata to compilation outputs manually as described here

  1. Drag and drop the .json file at
  2. Select the main contract deployed at the address you want to verify.
  3. Input the address and chain and click "Verify".


If you were using Truffle to compile contracts, you can use the output file at build/contracts/<contract-name>.json for the metadata file. Then add the source files as usual.


If you've deployed your contracts with Truffle, you can use the truffle-plugin-verify to verify contracts on Sourcify. The plugin verifies on Sourcify by default.

$ truffle run verify MyFirstContract MySecondContract --network goerli

Remix Plugin

Sourcify has a remix plugin to aid with contract verification and lookup. The plugin can be found in this repository


To verify:

  1. Select the contract you want to verify in the file explorer
  2. Compile the contract
  3. Click on the Sourcify icon on the plugin manager
  4. Enter the chain and the address of the contract you want to verify
  5. Click on Verify



You can also "fetch" contracts that are verified on Sourcify into your Remix IDE. To fetch:

  1. Click on the Sourcify icon on the plugin manager
  2. Enter the chain and the address of the contract you want to fetch
  3. Click on Fetch

The contract files will be saved in the file explorer.



  1. Navigate to the Remix Plugin manager
  2. Search for Sourcify and click on Activate when you see it.
  3. Another option would be to click on the Sourcify logo on Remix Homepage to activate the plugin