Sign In

elizaos-plugin-zerodust

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elizaos-plugin-zerodust

ZeroDust plugin for ElizaOS - sweep native gas tokens to exactly zero balance

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

@elizaos/plugin-zerodust

ElizaOS plugin for sweeping native gas tokens to exactly zero balance using EIP-7702.

Installation

npm install @elizaos/plugin-zerodust

Configuration

Set your ZeroDust API key:

export ZERODUST_API_KEY=zd_your_key_here

Or in your agent's character file:

{
  "settings": {
    "secrets": {
      "ZERODUST_API_KEY": "zd_your_key_here"
    }
  }
}

Getting an API Key

curl -X POST https://zerodust-backend-production.up.railway.app/agent/register \
  -H "Content-Type: application/json" \
  -d '{"name": "My ElizaOS Agent", "agentId": "eliza-001"}'

Save the apiKey from the response - it's only shown once.

Usage

Add the plugin to your agent:

import { zerodustPlugin } from '@elizaos/plugin-zerodust';

const agent = {
  plugins: [zerodustPlugin],
  // ... other config
};

Actions

CHECK_DUST_BALANCES

Check sweepable balances across all supported chains.

Triggers:

  • "check my dust balances"
  • "how much do I have on each chain?"
  • "show my balances"

Example:

User: check my dust balances for 0x1234...
Agent: **Sweepable Balances**
| Chain | Balance | USD |
|-------|---------|-----|
| Arbitrum | 0.004 ETH | $9.54 |
| Polygon | 18.95 POL | $2.03 |
...

EXIT_CHAIN

Sweep 100% of native balance from a single chain.

Triggers:

  • "exit Arbitrum to Base"
  • "sweep my dust from Polygon"
  • "move all my ETH from Optimism"
  • "empty my wallet on BSC"

Example:

User: exit Arbitrum to Base
Agent: **Sweep Quote**
From: Arbitrum (42161)
To: Base (8453)
Balance: 0.004 ETH
You'll Receive: ~0.00388 ETH
Fee: 1% (min $0.05, max $0.50)
...

EXIT_ALL_CHAINS

Batch sweep from multiple chains to a single destination.

Triggers:

  • "consolidate everything to Base"
  • "sweep all chains"
  • "exit everything to Ethereum"

Example:

User: consolidate everything to Base
Agent: **Batch Sweep Preview**
Destination: Base (8453)
Chains to sweep:
| Chain | Balance | USD |
|-------|---------|-----|
| Arbitrum | 0.004 ETH | $9.54 |
| Polygon | 18.95 POL | $2.03 |
| Optimism | 0.0008 ETH | $1.72 |
Total Value: ~$13.29
...

Supported Chains (25 EIP-7702 Compatible)

ChainIDNative Token
Ethereum1ETH
Optimism10ETH
BSC56BNB
Gnosis100XDAI
Unichain130ETH
Polygon137POL
Sonic146S
X Layer196OKB
Fraxtal252FRAX
World Chain480ETH
Sei1329SEI
Story1514IP
Soneium1868ETH
Mantle5000MNT
Superseed5330ETH
Base8453ETH
Plasma9745XPL
Mode34443ETH
Arbitrum42161ETH
Celo42220CELO
Ink57073ETH
BOB60808ETH
Berachain80094BERA
Scroll534352ETH
Zora7777777ETH

Not Supported: Avalanche, Blast, Linea, Apechain (no EIP-7702)

Fees

  • Service fee: 1% of balance (min $0.05, max $0.50)
  • Gas costs: Paid by ZeroDust, reimbursed from sweep amount
  • User receives: ~97-99% of balance

How It Works

  • EIP-7702 Delegation: User temporarily delegates their EOA to the ZeroDust contract
  • Sponsored Execution: ZeroDust executes the sweep, paying gas costs
  • Exact Zero Balance: The contract transfers the entire balance minus fees
  • Automatic Revocation: Delegation is revoked after the sweep

Important Notes

  • Signatures Required: Sweeps require user wallet signatures. ZeroDust never has custody.
  • EIP-7702 Only: Only works on chains that support EIP-7702 (25 chains listed above).
  • Minimum Balance: $0.10 minimum per chain to sweep.

API Documentation

Full API docs: https://zerodust-backend-production.up.railway.app/docs

Support

License

MIT

Keywords

elizaos

FAQs

Package last updated on 04 Feb 2026

Related posts