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

eip7702-revoker

v2.1.0

Published

CLI tool to revoke and delegate EIP-7702 authorizations with a separate gas sponsor account

Readme

EIP-7702 Revoker

CLI tool to revoke (remove) or delegate (set) EIP-7702 authorizations on Ethereum accounts using a separate gas sponsor account — so the compromised wallet does not need to hold ETH for gas fees. Works across 12 major EVM networks simultaneously.

License: MIT Node.js TypeScript PRs Welcome


The Problem

EIP-7702 lets regular wallets (EOAs) temporarily behave like smart contracts by delegating execution to a contract address. This is powerful — but if a malicious actor tricks you into signing a delegation, they can drain your wallet.

The catch: if your wallet has no ETH for gas, you can't revoke the delegation yourself.

This tool splits the operation:

  • Source wallet (the compromised one) signs the authorization — needs ZERO ETH
  • Sponsor wallet broadcasts the transaction — pays gas fees

Installation

# Install globally
npm install -g eip7702-revoker
eip7702-revoker --help

# Or clone and run locally
git clone https://github.com/Serge693/eip7702-revoker.git
cd eip7702-revoker
npm install
cp .env.example .env
# Edit .env with your private keys

Usage

# Revoke delegation on Base (default network)
npm run revoke

# Revoke on specific networks
npm run revoke -- --network base,ethereum,arbitrum

# Revoke on all 12 supported networks
npm run revoke:all

# Delegate to a contract
npm run delegate -- --network base --to 0xContractAddress...

# Delegate on all networks
npm run delegate:all

# Interactive mode without .env (tool prompts for keys)
npm run revoke -- --interactive

# Dry-run mode (simulate without broadcasting)
npm run revoke -- --dry-run

# JSON output (for scripting/automation)
npm run revoke -- --json

CLI Options

| Option | Description | |--------|-------------| | -n, --network <networks> | Comma-separated network names or "all" | | --dry-run | Simulate without broadcasting | | --rpc <url> | Custom RPC endpoint | | --nonce <number> | Manual nonce override for source account | | -y, --yes | Skip confirmation prompt | | --json | Output results as JSON | | -i, --interactive | Prompt for keys interactively (no .env needed) | | --to <address> | (delegate only) Target contract address | | -V, --version | Show version number |

Supported Networks

| Network | Chain ID | Alias | |---------|----------|-------| | Ethereum | 1 | eth, mainnet | | Base | 8453 | base | | Arbitrum One | 42161 | arb | | OP Mainnet | 10 | op | | Polygon | 137 | matic | | BNB Smart Chain | 56 | bnb | | Gnosis Chain | 100 | xdai | | Linea | 59144 | linea | | Blast | 81457 | blast | | Mode | 34443 | mode | | Soneium | 1868 | soneium | | zkSync Era | 324 | zksync |

Note: zkSync Era uses a different transaction model and may not support EIP-7702 in the standard way. Proceed with caution.

Configuration

Copy .env.example to .env and fill in:

| Variable | Description | |----------|-------------| | SOURCE_PRIVATE_KEY | Private key of the wallet whose delegation to revoke/set | | SPONSOR_PRIVATE_KEY | Private key of the wallet paying gas fees | | DELEGATE_TO | Address to delegate to (only for delegate command) | | SPONSOR_MIN_BALANCE | Minimum sponsor balance in ETH (default: 0.003) | | EIP7702_VERIFY_DELAY | Delay in ms before verifying delegation (default: 3000) | | SILENT | Set to 1 to suppress non-JSON output |

Security

  • The source wallet only signs — no ETH needed, no transaction broadcast from it
  • The sponsor wallet should be a separate account with minimal ETH
  • Keys are validated for format before use
  • Pre-flight checks verify RPC connectivity and sponsor balance
  • Dry-run mode simulates without broadcasting
  • Interactive mode keeps keys in memory only

Development

npm run typecheck   # TypeScript type checking
npm run test        # Run tests
npm run lint        # Lint source code
npm run format      # Check formatting
npm run format:fix  # Auto-fix formatting

Changelog

v2.0.0 (2026-05-21)

  • Rewritten in TypeScript (all .mjs.ts)
  • Added test suite (vitest, 9 tests)
  • Added ESLint + Prettier for code quality
  • Added --interactive flag for key input without .env
  • Added pre-flight checks: RPC health, sponsor balance
  • Added zkSync compatibility warning
  • MIN_SPONSOR_BALANCE is now enforced before sending
  • EIP7702_VERIFY_DELAY is configurable via .env
  • Added SILENT env var documentation
  • All output and comments are in English

v1.4.1 (2026-05-19)

  • Last stable JavaScript release
  • Available on the v1.4.1 tag

Contributing

Contributions are welcome! Here's how to help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Make your changes
  4. Run tests (npm test) and lint (npm run lint)
  5. Commit and push
  6. Open a Pull Request

Please ensure your code follows the existing style and all tests pass.

License

MIT © Serge693