Skip to content

A Next.js app for selling ERC20 tokens to USDC on Base mainnet using Thirdweb Bridge. Features batch transactions, smart wallet support, and dynamic token fetching.

Notifications You must be signed in to change notification settings

mykcryptodev/wallet-sweep

Repository files navigation

tw-banner

Wallet Sweep - Farcaster Mini App

A Farcaster mini app that allows users to easily batch sell multiple tokens from their wallet in one transaction. Built with Next.js, Thirdweb, and Base chain.

Features

  • 🧹 Batch Token Selling: Select multiple tokens and sell them all in one transaction
  • 🎯 Swipe Mode: Tinder-style interface for quick token management decisions
  • 📈 Price Charts: Visual price history and market data in swipe mode powered by Zapper XYZ
  • 🚀 Farcaster Mini App: Fully integrated as a Farcaster mini app with embeds and manifest
  • Optimized Performance: Includes caching, pagination, and parallel quote fetching
  • 🎨 Beautiful UI: Clean interface with loading states, error handling, and toast notifications
  • 🔄 Real-time Updates: Automatic balance refresh after successful transactions
  • 📊 Zapper XYZ Integration: Uses Zapper XYZ for comprehensive token balance data

Farcaster Mini App Integration

This app is fully configured as a Farcaster mini app with:

  • Mini App Embeds: OpenGraph metadata for sharing in Farcaster feeds
  • Dynamic Images: Auto-generated OG images and splash icons
  • Manifest File: Located at /.well-known/farcaster.json
  • Webhook Support: Ready to handle mini app events

See docs/FARCASTER_MINIAPP_INTEGRATION.md for setup details.

Getting Started

Prerequisites

Setup

  1. Clone the repository:
git clone https://github.com/yourusername/wallet-sweep.git
cd wallet-sweep
  1. Install dependencies:
npm install
  1. Configure environment variables:
cp .env.local.example .env.local

Then edit .env.local and add your credentials:

  • NEXT_PUBLIC_THIRDWEB_CLIENT_ID (required for wallet connection)
  • ZAPPER_API_KEY (required for token balance fetching)
  • Redis credentials (optional, for caching)
  • 1inch API key (optional, for quote fetching)
  1. Run the development server:
npm run dev

Open http://localhost:3000 to see the app.

Deployment

Deploy to Vercel or any platform that supports Next.js:

npm run build
npm start

Remember to:

  1. Set your environment variables in the deployment platform
  2. Update all domain references if not using wallet-sweep.vercel.app
  3. Complete the Farcaster account association in the manifest

Technical Documentation

Architecture

The app uses:

  • Next.js 14 with App Router
  • Thirdweb SDK for Web3 functionality
  • Zapper XYZ for comprehensive token balance data
  • Base Chain for transactions
  • Redis for caching (optional)
  • 1inch API for token quotes

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details

About

A Next.js app for selling ERC20 tokens to USDC on Base mainnet using Thirdweb Bridge. Features batch transactions, smart wallet support, and dynamic token fetching.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages