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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@dappsoverapps.com/hardhat-patch

v0.1.2

Published

Hardhat plugin for Arbitrum precompile support

Readme

@dappsoverapps.com/hardhat-patch

A Hardhat plugin that adds native support for Arbitrum precompiles to local development networks.

Features

  • ArbSys Precompile (0x64): System-level utilities for L1↔L2 interactions
  • ArbGasInfo Precompile (0x6C): Gas pricing and L1 cost estimation
  • Modular Registry: Easy to add new precompile handlers
  • Configurable: Customize chain ID, ArbOS version, and gas pricing

Installation

npm install @dappsoverapps.com/hardhat-patch

Usage

Basic Setup

// hardhat.config.ts
import { HardhatUserConfig } from "hardhat/config";

const config: HardhatUserConfig = {
  solidity: "0.8.19",
  networks: {
    hardhat: {
      // Enable Arbitrum features
      arbitrum: {
        enabled: true,
        chainId: 42161, // Arbitrum One
        arbOSVersion: 20,
      },
    },
  },
};

export default config;

Custom Configuration

const config: HardhatUserConfig = {
  solidity: "0.8.19",
  networks: {
    hardhat: {
      arbitrum: {
        enabled: true,
        chainId: 421613, // Arbitrum Goerli
        arbOSVersion: 21,
        l1BaseFee: BigInt(15e9), // 15 gwei
        gasPriceComponents: {
          l2BaseFee: BigInt(2e9), // 2 gwei
          l1CalldataCost: BigInt(20), // 20 gas per byte
          l1StorageCost: BigInt(0),
          congestionFee: BigInt(1e8), // 0.1 gwei
        },
      },
    },
  },
};

Programmatic Usage

import { HardhatArbitrumPatch } from "@dappsoverapps.com/hardhat-patch";

// Create plugin instance
const arbitrumPatch = new HardhatArbitrumPatch({
  chainId: 42161,
  arbOSVersion: 20,
});

// Access the registry
const registry = arbitrumPatch.getRegistry();

// Check if a precompile is supported
if (arbitrumPatch.hasHandler("0x0000000000000000000000000000000000000064")) {
  console.log("ArbSys precompile is available");
}

// List all handlers
const handlers = arbitrumPatch.listHandlers();
console.log(
  "Available precompiles:",
  handlers.map((h) => h.name)
);

Supported Precompiles

ArbSys (0x64)

  • arbChainID() - Returns the Arbitrum chain ID
  • arbBlockNumber() - Returns the current L2 block number
  • arbBlockHash(uint256) - Returns block hash for given block number
  • arbOSVersion() - Returns the current ArbOS version

ArbGasInfo (0x6C)

  • getPricesInWei() - Returns 5-tuple of gas price components
  • getL1BaseFeeEstimate() - Returns estimated L1 base fee
  • getCurrentTxL1GasFees() - Returns L1 gas fees for current transaction
  • getPricesInArbGas() - Returns 3-tuple in ArbGas units

Development

Building

npm run build

Testing

npm test

Linting

npm run lint

Architecture

The plugin uses a modular registry system:

  1. Registry Interface: Defines the contract for precompile handlers
  2. Handler Implementation: Each precompile has its own handler class
  3. Plugin Integration: Automatically registers handlers on Hardhat startup
  4. Configuration: Supports customization of key parameters

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

License

MIT