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

@tychilabs/react-ugf

v2.0.0

Published

UGF gasless payment component for React — let users pay gas in stablecoins across EVM chains

Readme

@tychilabs/react-ugf

npm

Pay gas in USDC across any EVM chain — drop-in React component powered by Universal Gas Framework

No paymasters. No bundlers. No ERC-4337. Just sign and execute.


Demo

UGF Demo

Users pay gas in USDC instead of native tokens — transaction executes on another chain without needing ETH, AVAX, or any gas token.


Payment Modal (What users see)

UGF Modal

Users choose how to pay gas — USDC across any supported chain.
UGF handles pricing, balances, and execution automatically.


How it works

  1. Trigger — call openUGF() with your transaction
  2. Pay — user selects token (USDC, etc.) and signs payment
  3. Execute — UGF sponsors gas and executes on destination chain

Your users never need native gas tokens.


Install

npm install @tychilabs/react-ugf

Peer dependencies:

npm install ethers

Quick Start

Wrap your app

import { UGFProvider } from "@tychilabs/react-ugf";

export default function App() {
  return (
    <UGFProvider>
      <YourApp />
    </UGFProvider>
  );
}

Use in your component

import { useUGFModal } from "@tychilabs/react-ugf";

const { openUGF } = useUGFModal();

openUGF({
  signer,
  tx: {
    to: CONTRACT_ADDRESS,
    data,
    value: 0n,
  },
  destChainId: "43114", // Avalanche
});

Testnet Usage (Base Sepolia)

react-ugf also runs in testnet mode against Base Sepolia.

Wrap your app in testnet mode

import { UGFProvider } from "@tychilabs/react-ugf";

export default function App() {
  return (
    <UGFProvider mode="testnet">
      <YourApp />
    </UGFProvider>
  );
}

Use openUGF() same way

import { useUGFModal } from "@tychilabs/react-ugf";

const { openUGF } = useUGFModal();

openUGF({
  signer,
  tx: {
    to: CONTRACT_ADDRESS,
    data,
    value: 0n,
  },
  destChainId: "84532", // Base Sepolia
});

Testnet notes

  • mode="testnet" makes react-ugf use @tychilabs/ugf-testnet-js under the hood
  • destination chain is Base Sepolia (84532)
  • settlement coin is TYI_MOCK_USD
  • openUGF() API stays same
  • if you do not pass mode, provider stays in production mode

Gasless on Base Sepolia

In testnet mode, execution on Base Sepolia is gasless for the end user:

  • user pays in MOCK TYI USD (TYI_MOCK_USD) inside the UGF modal
  • UGF covers native gas onchain on Base Sepolia for the user's transaction
  • destination call executes on Base Sepolia without the user holding Base Sepolia ETH

What the dApp does not need to operate to get this:

  • no app-side paymaster
  • no bundler
  • no ERC-4337 / smart wallet migration
  • no app-managed gas tank or sponsorship backend

The dApp only encodes the destination call and opens the modal. UGF handles quote, MOCK TYI USD payment, and gas on Base Sepolia.

Faucets

Get MOCK TYI USD and other testnet assets here:


Example Flow

  • User connects wallet
  • Clicks action (swap / mint / send)
  • Sees payment modal
  • Pays gas in USDC (or supported token)
  • Transaction executes on destination chain

Supported

Chains

  • Ethereum (EVM)
  • Base (EVM)
  • Optimism (EVM)
  • Polygon (EVM)
  • Avalanche (EVM)
  • BNB Chain (EVM)
  • Arbitrum (EVM)

What UGF handles

  • Payment modal (token selection + balances)
  • Gas estimation and conversion
  • Cross-chain execution
  • Wallet chain switching
  • Gas sponsorship

Requirements

  • EVM-compatible wallet (MetaMask, Rabby, etc.)
  • ethers.js signer

Demo

Live demo: https://universalgasframework.com/dapp-integration — connect your wallet and try it.

Example repo: https://github.com/TychiWallet/demo_react_ugf

Try it locally

git clone https://github.com/TychiWallet/demo_react_ugf.git
cd demo_react_ugf
npm install
npm run dev

Open the dev server, connect your wallet, and trigger a transaction — the UGF modal handles payment and execution.


API

openUGF

openUGF({
  signer,
  tx,
  destChainId,
});

| Field | Type | Description | | ----------- | -------------------- | -------------------- | | signer | Signer | ethers signer | | tx | TransactionRequest | transaction object | | destChainId | string | destination chain ID |


Compatibility

| Environment | Status | | ------------ | ------------ | | React | Full support | | Vite 5 | Supported | | Next.js | Supported | | React Native | Coming soon |


Examples

Full working demo: TychiWallet/demo_react_ugf

Includes:

  • Counter interaction (EVM → EVM)
  • Token payment flow
  • Modal UI integration
  • Mainnet + testnet (Base Sepolia) modes

About

Tychi Labs builds infrastructure for gasless and agentic Web3 execution.

react-ugf is the simplest way to integrate UGF into frontend apps.

Links