Skip to main content

Overview

The Sourcify API enables programmatic access to smart contract verification services, allowing developers to verify contract source code, check verification status, and retrieve verified contract files. This decentralized verification service is essential for developers and auditors who need to ensure smart contract transparency and verify that deployed bytecode matches the provided source code across multiple blockchain networks.

Key Features

  • Contract Verification: Submit smart contract source code and metadata for verification against deployed bytecode on various blockchain networks.
  • Multiple Verification Methods: Support for direct file upload, Etherscan-verified contract import, and solc-json compilation artifact verification.
  • Verification Status Checking: Query the verification status of contracts by address and chain ID, with support for both full and partial matches.
  • File Retrieval: Access verified contract source code, metadata, and compilation artifacts for any verified contract.
  • Multi-Chain Support: Compatible with Ethereum mainnet, testnets, and other EVM-compatible networks including Hedera.
  • Repository Access: Browse and download verified contract files with organized file tree structures.
📣 For interactive API exploration and testing, visit https://server-verify.hashscan.io/api-docs/

Base URL

https://server-verify.hashscan.io

Endpoints

Stateless Verification

MethodEndpointDescription
POST/verifyverify contracts by uploading source files and metadata
POST/verify/etherscanverify contracts already verified on etherscan
POST/verify/solc-jsonverify contracts using solc-json compilation artifacts

Repository Access

MethodEndpointDescription
GET/check-all-by-addressescheck verification status (full or partial match) for multiple contracts
GET/check-by-addressescheck verification status (full match only) for multiple contracts
GET/files/any/{chain}/{address}retrieve all files for a contract (full and partial match)
GET/files/{chain}/{address}retrieve all files for a contract (full match only)
GET/files/contracts/{chain}get all verified contract addresses on a specific chain
GET/files/tree/any/{chain}/{address}get file tree structure (full and partial match)
GET/files/tree/{chain}/{address}get file tree structure (full match only)
GET/repository/contracts/{match_type}/{chain}/{address}/{filePath}download specific files from verified contracts

Session Management

MethodEndpointDescription
GET/session/dataretrieve current session verification data
POST/session/clearclear session data
POST/session/input-filesadd files to verification session
POST/session/input-contractimport deployed contract from ipfs
POST/session/verify-checkedverify contracts in current session
POST/session/input-solc-jsonadd solc-json to session for verification
POST/session/verify/etherscanverify etherscan contracts in session

Administration

MethodEndpointDescription
POST/change-log-levelmodify application logging level (requires authentication)