Skip to content

Fix Hardhat Sourcify Verification Errors

DodaTech Updated 2026-06-26 1 min read

You will learn how to verify contracts with Sourcify, the decentralized alternative to Etherscan.

The Problem

The hardhat verify sourcify pattern is frequently misapplied in smart contract and dapp development, leading to vulnerabilities, gas inefficiencies, or logic errors. This guide shows the correct implementation and common pitfalls to avoid.

Quick Fix

Wrong

// Only set up Etherscan verification

Contract unverified on Sourcify. Users on decentralized explorers can't see the source.

// hardhat.config.js: sourcify: { enabled: true }. Run: npx hardhat verify --network sepolia <address>
Contract verified on Sourcify's decentralized storage. Source code available on any Sourcify-compatible explorer.

Prevention

  • Enable Sourcify alongside Etherscan verification
  • Verify metadata matches contract compilation output
  • Use DodaTech's multi-explorer verification tool
  • Test verification on Sourcify's staging environment
  • Monitor Sourcify's supported networks list

DodaTech Tools

Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro. Doda Browser's developer tools include a Solidity debugger and transaction inspector. DodaZIP archives secure contract templates for team collaboration. Durga Antivirus Pro scans deployed contracts for known vulnerability signatures.

FAQ

### What is Sourcify?

A decentralized smart contract verification service that stores metadata on IPFS and Swarm.

How is Sourcify different from Etherscan?

Sourcify is decentralized and not tied to a single block explorer. Verification works on any chain.

Does Sourcify support all Solidity versions?

Yes, Sourcify supports all Solidity versions from 0.4.11 onwards.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro