Skip to content

zunmax/batchrevoker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Batch Revoker

A web application to revoke ERC-20 token approvals across multiple EVM chains in batch transactions.

Live Demo

https://batchrevoker.xyz/

Features

  • Scan and display all active token approvals across 8 EVM chains
  • Batch revoke multiple approvals in a single transaction
  • On-chain verification of allowances using multicall
  • Automatic filtering of phishing/scam tokens and spenders
  • Real-time transaction status updates
  • Caching to reduce API calls

Supported Chains

  • Ethereum
  • Base
  • Arbitrum
  • Avalanche
  • Optimism
  • Unichain
  • Zora
  • zkSync

Wallet Requirements

Important: This app uses EIP-5792 (Wallet Call API) for batch transactions. Wallets may use EIP-7702 under the hood to enable smart account batching for EOAs.

Compatible Wallets:

If your wallet doesn't support these standards, you'll see an error prompting you to install a compatible wallet.

Tech Stack

  • React + Vite
  • wagmi v2 + viem
  • RainbowKit for wallet connection
  • Routescan API for approval discovery
  • Alchemy RPC for on-chain verification

Local Development

1. Install Dependencies

cd frontend
npm install

2. Configure Environment

Copy the example environment file and fill in your API keys:

cp .env.example .env

Required environment variables:

VITE_WALLETCONNECT_PROJECT_ID=your_walletconnect_project_id
VITE_ALCHEMY_API_KEY=your_alchemy_api_key
ROUTESCAN_API_KEY=your_routescan_api_key

Note: ROUTESCAN_API_KEY has no VITE_ prefix because it's server-side only, protected by the /api/approvals proxy.

3. Run Development Server

npm run dev

4. Build for Production

npm run build

Vercel Deployment

1. Push to GitHub

Push your code to a GitHub repository.

2. Import to Vercel

Import the repository in Vercel Dashboard.

3. Configure Environment Variables

In Vercel project settings, add these environment variables:

Variable Description
VITE_WALLETCONNECT_PROJECT_ID WalletConnect project ID from cloud.walletconnect.com
VITE_ALCHEMY_API_KEY Alchemy API key from alchemy.com
ROUTESCAN_API_KEY Routescan API key from routescan.io (server-side only)

Security Note: ROUTESCAN_API_KEY is protected by the /api/approvals proxy and never exposed to the browser. Restrict your Alchemy API key to your production domain in the Alchemy dashboard.

4. Deploy

vercel --prod

How It Works

  1. Connect your EIP-5792 compatible wallet using RainbowKit
  2. Click "Scan All Chains" to fetch all your token approvals
  3. The app verifies each approval on-chain using multicall
  4. Select the approvals you want to revoke
  5. Click "Revoke Selected" to batch revoke in a single transaction
  6. The app verifies the revocations on-chain

Security

  • Phishing and scam tokens/spenders are automatically filtered out
  • All revocations are verified on-chain before and after execution
  • The app only calls approve(spender, 0) - it cannot transfer your tokens
  • No private keys are stored or transmitted
  • API keys are restricted to your production domain
  • Public RPCs are used for wallet network additions (not domain-restricted)

API Integrations

  • Routescan CDN API: Token approval discovery across all supported chains
  • Alchemy RPC: On-chain allowance verification via multicall

License

MIT

About

A web application to revoke ERC-20 token approvals across multiple EVM chains in batch transactions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors