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

sfi-deployment-sdk

v0.1.1

Published

Reusable ethers v5 helpers for contract deployment scripts and local fork testing.

Readme

SFI Deployment SDK

A small TypeScript module extracted from DynaVaults' deployment-scripts/utils. It provides reusable ethers v5 helpers for:

  • RPC providers, wallets, and gas options
  • deployment transaction cost reporting
  • Hardhat fork account impersonation and token funding

The module has no DynaVaults contract dependency and contains no private or credentialed RPC URLs.

Requirements

  • Node.js 18 or newer
  • ethers 5.8

Install

From a sibling project while developing locally:

npm install ../deployment-framework

Once the package is published:

npm install sfi-deployment-sdk ethers@^5.8.0

Import the complete utility surface directly or as a named namespace:

import * as utils from "sfi-deployment-sdk/utils";
// or
import { utils } from "sfi-deployment-sdk";

const account = utils.getEthersAccount();
const txOptions = await utils.getTxOptions(account.provider!);

Configure a deployment

The legacy environment variables are supported, but this package deliberately does not load .env as an import side effect. Load it in the deployment entry point if needed (for example, with import "dotenv/config").

RPC_URL=https://your-rpc.example
ACCOUNT_PRIVATE_KEY=0x...
FORKED_CHAIN_ID=8453 # optional; useful when RPC_URL is a local fork

Configuration can also be supplied directly:

import {
  configureDeploymentFramework,
  getEthersAccount,
  getTxOptions,
} from "sfi-deployment-sdk/chain-config";

configureDeploymentFramework({
  rpcUrl: process.env.RPC_URL,
  privateKey: process.env.ACCOUNT_PRIVATE_KEY,
});

const account = getEthersAccount();
const txOptions = await getTxOptions(account.provider!);

getTxOptions uses the configured EIP-1559 strategy for Ethereum and Base. On other chains it returns a boosted legacy gas price. Override or add a chain without changing the package:

configureDeploymentFramework({
  gasConfigurations: {
    10: {
      eip1559: true,
      percentile: 70,
      boostPercent: 10,
      gasThresholdGwei: 0.1,
      gasRetryMs: 5_000,
    },
  },
});

Report deployment costs

The reporting helpers retain the original function names so existing scripts need only change their import paths.

import { getFastProvider } from "sfi-deployment-sdk/chain-config";
import {
  initPhase,
  initProvider,
  reportCosts,
  waitForTx,
} from "sfi-deployment-sdk/chain-utils";

const provider = getFastProvider();
initProvider(provider);

initPhase("Deploy registry");
await waitForTx(await registry.deployTransaction);
await reportCosts();

Public, rate-limited reference RPCs and Coinbase spot price endpoints are used for cost comparisons. Production scripts should provide their own endpoints:

import { configureChainUtilities } from "sfi-deployment-sdk/chain-utils";

configureChainUtilities({
  mainnetRpcUrls: { 1: process.env.ETHEREUM_REFERENCE_RPC! },
  priceEndpoints: { 1: process.env.ETH_USD_PRICE_ENDPOINT! },
});

Work with a Hardhat fork

These helpers call Hardhat-only JSON-RPC methods and should never be used against a production RPC.

import {
  replenishGas,
  transferTokensFromWhale,
} from "sfi-deployment-sdk/testnet-utils";

await replenishGas(provider, deployer.address);
await transferTokensFromWhale(provider, usdc, "1000000", deployer.address, 1);

Additional whale mappings can be supplied with configureWhaleWallets. Unknown chain/token pairs fail before attempting impersonation.

Imports and compatibility

The complete utilities are available from sfi-deployment-sdk/utils. The focused subpaths are:

  • sfi-deployment-sdk/chain-config
  • sfi-deployment-sdk/chain-utils
  • sfi-deployment-sdk/testnet-utils

The original underscore paths (chain_config and chain_utils) are also exported to simplify migration. The root export exposes the three modules as chainConfig, chainUtils, and testnetUtils; its two conflicting chain ID helpers are named getProviderChainId and getReportingChainId.

Development

npm install
npm test
npm run format:check
npm pack --dry-run