Skip to main content

Introduction

This guide shows how to verify a deployed smart contract on Quai Network’s official mainnet block explorer, Quai Explorer (explorer.qu.ai). Verifying your smart contract publishes its source code and ABI on-chain so users and developers can audit the bytecode and interact with Read and Write contract tabs directly inside the explorer.
For Orchard Testnet deployments (chainId: 15000), use the Orchard explorer at orchard.quaiscan.io.

Supported Verification Methods on Quai Explorer

Quai Explorer supports three contract verification workflows:
  • Solidity (Standard JSON Input) (recommended) — Upload the compiler’s Standard JSON input (or the IPFS metadata file generated by @quai/hardhat-deploy-metadata).
  • Solidity (Flattened Source Code) — Paste single-file flattened Solidity source code along with compiler version and optimization flags.
  • Sourcify Import — Automatically import verified contract metadata and source files from Sourcify.

Prerequisites

To deploy contracts with IPFS metadata and verify them on Quai Explorer, you’ll need:

Walkthrough

This walkthrough follows the Deploy with Solidity guide using the hardhat-example repository.

1. Deploy a Smart Contract

Following the Deploy with Solidity guide, deploy a smart contract with IPFS metadata enabled:
Example output:
Capture both your deployed contract address and the IPFS CID uploaded to ipfs.qu.ai.

2. Download the Formatted IPFS Metadata

When using @quai/hardhat-deploy-metadata, download the formatted metadata JSON from ipfs.qu.ai using your deployment’s CID:

3. Verify & Publish on Quai Explorer

  1. Open Quai Explorer (explorer.qu.ai) and navigate to the Contract Verification page (or search your deployed contract address and open its Contract → Verify & Publish tab).
  2. Enter your deployed Contract Address and select the License matching the SPDX-License-Identifier in your source file.
  3. Choose Solidity (Standard JSON Input) as the verification method and select the exact Solidity Compiler version used to compile your contract (or choose Flattened Source / Sourcify if preferred).
  4. Upload ipfsMeta.json (or your Standard JSON input file) and click Verify & Publish.
Once verified, your contract page on explorer.qu.ai will display a verified badge, full source code, ABI, and interactive Read Contract and Write Contract tabs.
Need programmatic verification or contract ABI queries? Check out the Quai Explorer API.