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

gaswise

v1.0.0

Published

Multi-chain gas estimation SDK and CLI

Readme

GasWise ⛽

A lightweight multi-chain Node.js SDK and CLI tool for gas fee estimation, transaction cost calculation, and blockchain unit conversion.

GasWise supports:

  • Ethereum
  • Polygon
  • Arbitrum
  • Base

with live RPC-based gas estimation and USD transaction cost calculation.


Features

✅ Multi-chain gas fee tracking
✅ RPC-based gas estimation
✅ USD transaction cost estimation
✅ Transaction-type gas estimation
✅ Wei / Gwei / ETH conversion utilities
✅ CLI support
✅ Lightweight and modular architecture
✅ EIP-1559 ready architecture


Supported Chains

| Chain | Native Token | |---|---| | Ethereum | ETH | | Polygon | MATIC | | Arbitrum | ETH | | Base | ETH |


Supported Transaction Types

| Transaction Type | Gas Limit | |---|---| | transfer | 21000 | | erc20 | 65000 | | nft | 120000 |


Installation

npm install gaswise

CLI Usage

Ethereum

gaswise ethereum

Polygon

gaswise polygon

Arbitrum

gaswise arbitrum

Base

gaswise base

Example CLI Output

POLYGON GAS TRACKER

Slow: 285.95 gwei
Standard: 285.95 gwei
Fast: 298.08 gwei

Estimated ERC20 Cost: $0.0019

SDK Usage

Import Package

const gaswise = require("gaswise");

Get Live Gas Fees

const gas =
    await gaswise.getGasFees(
        "polygon"
    );

console.log(gas);

Example Output

{
  chain: 'polygon',
  slow: '285.95 gwei',
  standard: '285.95 gwei',
  fast: '298.08 gwei'
}

Estimate Transaction Cost

const estimate =
    await gaswise
    .estimateTransactionCost(
        "erc20",
        285.95,
        "polygon"
    );

console.log(estimate);

Example Output

{
  chain: 'polygon',
  nativeToken: 'MATIC',
  transactionType: 'erc20',
  gasLimit: 65000,
  gasPriceGwei: 285.95,
  totalNative: '0.01858',
  estimatedUsd: '$0.0019'
}

Conversion Utilities

Gwei → Wei

gaswise.gweiToWei(20);

Wei → Gwei

gaswise.weiToGwei(value);

ETH → Wei

gaswise.ethToWei(1);

Wei → ETH

gaswise.weiToEth(value);

Full SDK Example

const gaswise = require("gaswise");

async function main() {

    const gas =
        await gaswise.getGasFees(
            "polygon"
        );

    console.log(gas);

    const gasPrice =
        parseFloat(gas.standard);

    const estimate =
        await gaswise
        .estimateTransactionCost(
            "erc20",
            gasPrice,
            "polygon"
        );

    console.log(estimate);

    console.log(
        gaswise
        .gweiToWei(20)
        .toString()
    );
}

main();

Project Structure

gaswise/
│
├── cli.js
├── index.js
├── package.json
├── README.md
│
└── src/
    ├── gas.js
    ├── estimator.js
    ├── converter.js
    ├── chains.js
    ├── constants.js
    └── price.js

Tech Stack

  • Node.js
  • ethers.js
  • axios
  • CoinGecko API
  • RPC Providers

Architecture

GasWise uses:

  • RPC providers for reliable gas estimation
  • CoinGecko for native token USD pricing
  • modular chain configuration
  • CLI + SDK dual support

Upcoming Features

  • EIP-1559 support
  • TypeScript definitions
  • Smart contract deployment estimation
  • Swap/bridge estimation
  • Historical gas analytics
  • Custom RPC support

Contributing

Contributions are welcome.

Feel free to:

  • open issues
  • suggest improvements
  • submit pull requests

License

MIT