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

@openscan/hardhat-plugin

v1.3.0

Published

Hardhat 3 plugin to use openscan explorer

Downloads

61

Readme

@openscan/hardhat-plugin

A Hardhat 3 plugin that automatically launches the OpenScan Explorer webapp and adds clickable OpenScan links to transaction logs in your terminal.

Learn more at https://openscan.eth.link

Installation

npm install --save-dev @openscan/hardhat-plugin

Configuration

In your hardhat.config.ts, import the plugin and add it to the plugins array:

import openScanPlugin from "@openscan/hardhat-plugin";
import { defineConfig } from "hardhat/config";

export default defineConfig({
  plugins: [openScanPlugin],
  solidity: "0.8.29",
  networks: {
    localhost: {
      type: "http",
      url: "http://127.0.0.1:8545",
    },
  },
  openScan: {
    url: "http://localhost:3030", // default
    chainId: 31337, // default
  },
});

Options

| Option | Type | Default | Description | | --------- | -------- | ------------------------- | -------------------------------- | | url | string | "http://localhost:3030" | URL where the explorer is served | | chainId | number | 31337 | Chain ID for the explorer links |

Features

Automatic Explorer Launch

When the first network connection is established (e.g. via npx hardhat node), the plugin:

  1. Checks if port 3030 is available
  2. Starts a local HTTP server serving the OpenScan Explorer webapp
  3. Opens your default browser to the explorer

The explorer serves contract artifacts (ABIs, source code, deployment addresses) so you can inspect deployed contracts directly in the browser. It supports both Hardhat Ignition deployments and raw deployment scripts.

Clickable Transaction Links

The plugin intercepts JSON-RPC requests and logs clickable terminal links (via OSC 8 hyperlinks) for:

  • eth_sendTransaction — logs links to the transaction, sender, and recipient addresses
  • eth_getTransactionReceipt — logs links to the transaction, block, sender, recipient, and deployed contract address (if applicable)
  • eth_accounts — logs links to each account address

Contract Deployment Tracking

When contracts are deployed (transactions with no to address), the plugin matches the creation bytecode against compiled artifacts in your project. This allows the explorer to display the contract name, ABI, and source code for deployed contracts — even without Hardhat Ignition.

Usage

1. Start the Hardhat node

npx hardhat node

The OpenScan Explorer will automatically launch and your browser will open.

2. Deploy contracts

With Hardhat Ignition:

npx hardhat ignition deploy ignition/modules/Counter.ts --network localhost

Or with a script:

npx hardhat run scripts/deploy.ts --network localhost

3. Send transactions

npx hardhat run scripts/send-tx.ts --network localhost

All transactions will be logged with clickable OpenScan links in the terminal.

Requirements

  • Hardhat 3.x
  • Node.js 24
  • Port 3030 must be available (the explorer is hardcoded to this port — the url option only affects terminal link URLs, not the server port)

Troubleshooting

Port 3030 Already in Use

If the explorer fails to start, check what is using the port:

lsof -i :3030

Then stop the conflicting process, or if it's a leftover Hardhat/OpenScan process:

kill $(lsof -t -i:3030)

License

MIT