npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

hashscan-verify

v0.2.0

Published

Hardhat plugin for verifying smart contracts on HashScan (Hedera's contract verification service)

Readme

hashscan-verify

npm version License: MIT TypeScript Hardhat

A Hardhat plugin for verifying smart contracts on HashScan (Hedera's Sourcify-based contract verification service).

  • Works for Hedera Mainnet (295), Testnet (296), Previewnet (297) and Local (298)
  • No API key needed
  • Direct integration with HashScan's Sourcify API
  • Automatic contract verification status checking
  • Clean error messages

Install

npm i -D hashscan-verify

Usage

In your hardhat.config.ts:

import { defineConfig } from "hardhat/config";
import hashscanVerify from "hashscan-verify";

export default defineConfig({
  plugins: [hashscanVerify],
  networks: {
    mainnet:     { url: "https://mainnet.hashio.io/api" },
    testnet:     { url: "https://testnet.hashio.io/api" },
    previewnet:  { url: "https://previewnet.hashio.io/api" },
    local:       { url: "http://localhost:7546" },
  },
});

Note: The plugin automatically sets the correct chain IDs for Hedera networks.

Verify a contract

npx hardhat hashscan-verify 0xYourContractAddress --contract contracts/MyContract.sol:MyContract --network testnet

Features

Automatic Verification Status Check

The plugin checks if your contract is already verified before attempting verification:

$ npx hardhat hashscan-verify 0x... --contract contracts/Counter.sol:Counter --network testnet
Contract is already verified with perfect match.

View on HashScan: https://hashscan.io/testnet/contract/0x...

Clean Error Messages

Meaningful error handling with helpful suggestions:

  • Invalid contract address format
  • Contract not found in artifacts
  • Missing build info (suggests recompilation)
  • Network connection issues

Network Support

Supports both legacy hedera_* and simplified network names:

  • mainnet or hedera_mainnet (Chain ID: 295)
  • testnet or hedera_testnet (Chain ID: 296)
  • previewnet or hedera_previewnet (Chain ID: 297)
  • local or hedera_local (Chain ID: 298)

Environment Variables

  • HASHSCAN_API_URL or SOURCIFY_API_URL - Override the API endpoint (defaults to HashScan's Sourcify)

Examples

Basic Verification

npx hardhat hashscan-verify 0x7A0505Eb4af57Eefb9B69619DB3bfc26348DE73A --contract contracts/Counter.sol:Counter --network testnet

With Constructor Arguments

npx hardhat hashscan-verify 0x... --contract contracts/Token.sol:MyToken "My Token" "MTK" 1000000 --network mainnet

Notes

  • On Hedera Testnet/Previewnet, verifications are wiped on periodic resets—just re-run verify after redeploy
  • Foundry users: no wrapper needed. Use forge directly with HashScan's Sourcify:
    forge verify-contract --chain-id 296 \
      --verifier sourcify \
      --verifier-url https://server-verify.hashscan.io \
      <ADDRESS> src/MyContract.sol:ContractName

Development

Build the plugin:

npm run build

Publish (after build):

npm publish

License

MIT