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

create-bridge-kit

v1.0.3

Published

Scaffold a working USDC bridge modal from Sepolia to Arc Testnet using Circle Bridge Kit

Readme

create-bridge-kit

Scaffold a working bidirectional USDC bridge modal between Ethereum Sepolia and Arc Testnet using Circle Bridge Kit.

Quick Start

npx create-bridge-kit my-bridge-app
cd my-bridge-app
npm install
npm run dev

What's Included

  • ✅ Fully functional BridgeModal component with bidirectional bridging
  • useBridge hook for flexible bridge integration
  • ✅ Beautiful UI with Framer Motion animations
  • ✅ Wagmi + RainbowKit wallet integration
  • ✅ Circle Bridge Kit integration
  • ✅ Automatic USDC balance fetching (both chains)
  • ✅ Chain switching automation
  • ✅ Visual chain swap button (↔) for direction toggle
  • ✅ Progress timer during bridge process
  • ✅ Confetti animation on successful bridge
  • ✅ Chain icons (Sepolia & Arc)
  • ✅ Error handling and user guidance
  • ✅ TypeScript + React + Vite setup
  • ✅ Tailwind CSS for styling

Usage

The scaffolded project includes a ready-to-use BridgeModal component:

import BridgeModal from './components/BridgeModal';
import { useState } from 'react';

function App() {
  const [isOpen, setIsOpen] = useState(false);
  
  return (
    <>
      <button onClick={() => setIsOpen(true)}>
        Bridge USDC
      </button>
      <BridgeModal isOpen={isOpen} onClose={() => setIsOpen(false)} />
    </>
  );
}

Using the Hook Directly

For more control, use the useBridge hook:

import { useBridge } from './hooks/useBridge';

function MyComponent() {
  const { state, tokenBalance, bridge, fetchTokenBalance } = useBridge();
  
  const handleBridge = async () => {
    // Bridge from Sepolia to Arc
    await bridge('USDC', '10', 'sepolia-to-arc');
    
    // Or bridge from Arc to Sepolia
    // await bridge('USDC', '10', 'arc-to-sepolia');
  };
  
  return (
    <div>
      <p>Balance: {tokenBalance} USDC</p>
      <button onClick={handleBridge}>Bridge</button>
      {state.step === 'success' && <p>Bridge successful!</p>}
    </div>
  );
}

Features

Bridge Modal Component

  • Bidirectional Bridging: Bridge USDC from Sepolia ↔ Arc Testnet in either direction
  • Visual Chain Swap: Click the swap button (↔) to toggle bridge direction
  • Auto-detects USDC balance on source chain (Sepolia or Arc)
  • Multi-RPC fallback for reliable balance fetching
  • Chain switching prompts users to switch when needed
  • Progress Timer: Shows elapsed time during bridge process
  • Confetti Animation: Celebration on successful bridge
  • Error handling with helpful messages
  • USDC contract address validation and guidance
  • Real-time status updates during bridging
  • Transaction Links: Direct links to view transactions on block explorers

Supported Chains (Bidirectional)

  • Ethereum Sepolia (Chain ID: 11155111) ↔ Arc Testnet (Chain ID: 5042002)

Requirements

  • Node.js 18+
  • MetaMask or compatible wallet
  • USDC on Ethereum Sepolia or Arc Testnet (depending on bridge direction)
    • Get Sepolia USDC from Circle Faucet
    • Get Arc Testnet USDC from Arc Testnet faucet

Manual Arc Testnet Setup

Important: Arc Testnet must be manually added to your wallet before using the bridge.

Add Arc Testnet to MetaMask with these details:

  • Network Name: Arc Testnet
  • RPC URL: https://rpc.testnet.arc.network
  • Chain ID: 5042002
  • Currency Symbol: USDC
  • Block Explorer: https://testnet.arcscan.app
  • Decimals: 6 (USDC uses 6 decimals)

Configuration

WalletConnect Project ID

Update your WalletConnect Project ID in src/config/wagmi.ts:

export const config = getDefaultConfig({
  appName: 'Bridge Kit App',
  projectId: 'your-project-id', // Get from https://cloud.walletconnect.com
  chains: [sepolia, arcTestnet],
});

Project Structure

my-bridge-app/
├── src/
│   ├── components/
│   │   └── BridgeModal.tsx    # Main bridge modal component
│   ├── hooks/
│   │   └── useBridge.ts        # Core bridging logic hook
│   ├── config/
│   │   └── wagmi.ts           # Wagmi/RainbowKit configuration
│   ├── App.tsx                # Example app
│   ├── main.tsx               # Entry point
│   └── index.css              # Tailwind CSS
├── public/                    # Static assets (chain icons, USDC icon)
├── index.html
├── package.json
├── vite.config.ts
└── tailwind.config.js

Token Addresses

  • Sepolia USDC: 0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238
  • Arc Testnet USDC: 0x3600000000000000000000000000000000000000

Documentation

License

MIT