skills$openclaw/zerodust-chain-exit
zerodustxyz6.0k

by zerodustxyz

zerodust-chain-exit – OpenClaw Skill

zerodust-chain-exit is an OpenClaw Skills integration for coding workflows. Sweep 100% of native gas tokens from EIP-7702 compatible chains. Leaves exactly zero balance. Supports 25 mainnet chains.

6.0k stars6.4k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

namezerodust-chain-exit
descriptionSweep 100% of native gas tokens from EIP-7702 compatible chains. Leaves exactly zero balance. Supports 25 mainnet chains. OpenClaw Skills integration.
ownerzerodustxyz
repositoryzerodustxyz/zerodust-chain-exit
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @zerodustxyz/zerodust-chain-exit
last updatedFeb 7, 2026

Maintainer

zerodustxyz

zerodustxyz

Maintains zerodust-chain-exit in the OpenClaw Skills directory.

View GitHub profile
File Explorer
3 files
.
_meta.json
295 B
README.md
2.6 KB
SKILL.md
6.6 KB
SKILL.md

name: zerodust-chain-exit description: Sweep 100% of native gas tokens from EIP-7702 compatible chains. Leaves exactly zero balance. Supports 25 mainnet chains. user-invocable: true metadata: {"openclaw": {"always": false, "emoji": "🧹", "requires": {"env": ["ZERODUST_API_KEY"]}}}

ZeroDust Chain Exit

ZeroDust enables sweeping native gas tokens to exactly zero balance using EIP-7702 sponsored execution. This only works on chains that support EIP-7702 (not all EVM chains).

When to Use This Skill

Activate when the user wants to:

  • Fully exit a blockchain (move all native tokens out)
  • Sweep dust/small balances from wallets
  • Transfer 100% of their balance with zero remainder
  • Empty a wallet completely
  • Consolidate funds from multiple chains

Trigger Phrases

  • "exit this chain completely"
  • "transfer all my balance from [chain]"
  • "sweep my dust"
  • "empty this wallet"
  • "move everything to [chain]"
  • "leave zero balance"

Supported Chains (25 EIP-7702 Compatible)

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

Note: Chains like Avalanche, Blast, Linea, and Apechain do NOT support EIP-7702 and cannot be swept.

API Base URL

https://zerodust-backend-production.up.railway.app

Step 1: Register for API Key (One-Time)

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

Response:

{
  "apiKey": "zd_abc123...",
  "keyPrefix": "zd_abc12",
  "keyId": "uuid",
  "keyType": "agent",
  "rateLimits": { "perMinute": 300, "daily": 1000 },
  "message": "IMPORTANT: Save your API key now - it will not be shown again!"
}

Store apiKey as the ZERODUST_API_KEY environment variable.

Step 2: Get Quote

Check the user's balance and fees before sweeping:

curl "https://zerodust-backend-production.up.railway.app/quote?userAddress=0xUSER&fromChainId=42161&toChainId=8453&destination=0xDEST"

Response:

{
  "quoteId": "uuid",
  "fromChainId": 42161,
  "toChainId": 8453,
  "userAddress": "0x...",
  "destination": "0x...",
  "balance": "500000000000000",
  "balanceFormatted": "0.0005",
  "estimatedReceive": "485000000000000",
  "estimatedReceiveFormatted": "0.000485",
  "totalFeeWei": "15000000000000",
  "serviceFeeWei": "5000000000000",
  "gasFeeWei": "10000000000000",
  "expiresAt": "2026-02-04T16:00:00Z"
}

Step 3: Get Authorization Data

Get the EIP-712 typed data for signing:

curl -X POST https://zerodust-backend-production.up.railway.app/authorization \
  -H "Content-Type: application/json" \
  -d '{"quoteId": "uuid-from-quote"}'

Response contains typedData (EIP-712 for sweep) and eip7702 (delegation parameters).

Step 4: User Signs Messages

The user must sign:

  1. EIP-7702 delegation authorization - Delegates their EOA to ZeroDust contract
  2. EIP-7702 revoke authorization - Pre-signed revocation (executed after sweep)
  3. EIP-712 sweep intent - Authorizes the specific sweep parameters

Step 5: Submit Sweep

curl -X POST https://zerodust-backend-production.up.railway.app/sweep \
  -H "Content-Type: application/json" \
  -d '{
    "quoteId": "uuid",
    "delegationSignature": "0x...",
    "revokeSignature": "0x...",
    "sweepSignature": "0x..."
  }'

Response:

{
  "sweepId": "uuid",
  "status": "pending",
  "txHash": null
}

Poll GET /sweep/{sweepId} for status updates until status: "completed".

Convenience Endpoint: Combined Quote + Auth

For agents, use this single endpoint to get quote and auth data together:

curl -X POST https://zerodust-backend-production.up.railway.app/agent/sweep \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $ZERODUST_API_KEY" \
  -d '{
    "fromChainId": 42161,
    "toChainId": 8453,
    "userAddress": "0x...",
    "destination": "0x..."
  }'

Batch Sweeps (Multiple Chains)

Sweep from multiple chains in one request:

curl -X POST https://zerodust-backend-production.up.railway.app/agent/batch-sweep \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $ZERODUST_API_KEY" \
  -d '{
    "sweeps": [
      {"fromChainId": 42161},
      {"fromChainId": 10},
      {"fromChainId": 137}
    ],
    "destination": "0x...",
    "consolidateToChainId": 8453
  }'

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 (varies by gas prices)

Rate Limits

  • Agent keys: 300 requests/minute, 1000 sweeps/day
  • Contact ZeroDust for higher limits

Error Codes

ErrorMeaning
BALANCE_TOO_LOWBalance below minimum (~$0.10)
QUOTE_EXPIREDQuote older than 5 minutes
CHAIN_NOT_SUPPORTEDChain doesn't support EIP-7702
INVALID_SIGNATURESignature verification failed
RATE_LIMIT_EXCEEDEDDaily or per-minute limit hit

Example Agent Conversation

User: "I want to move all my ETH from Arbitrum to Base"

Agent:

  1. Call /quote to check balance and fees
  2. Show user: "You have 0.005 ETH on Arbitrum. After fees (~1%), you'll receive ~0.00495 ETH on Base. This requires signing 3 messages. Proceed?"
  3. If yes, call /authorization to get typed data
  4. Request wallet signatures (EIP-7702 delegation, revoke, and EIP-712 sweep)
  5. Submit to /sweep with signatures
  6. Poll status until complete
  7. Confirm: "Done! Your Arbitrum balance is now exactly 0. 0.00494 ETH received on Base."

Important Notes

  1. EIP-7702 Required: User's wallet must support EIP-7702. Most modern wallets do as of 2026.

  2. Signatures Required: Sweeps require user wallet signatures. ZeroDust never has custody.

  3. Zero Balance Result: After sweep, source chain balance is EXACTLY zero.

  4. Cross-Chain: Sweeps can go to any supported destination chain via Gas.zip bridging.

  5. Not All EVM Chains: Only the 25 chains listed above support EIP-7702. Do not attempt sweeps on unsupported chains.

README.md

ZeroDust OpenClaw Skill

OpenClaw skill for sweeping native gas tokens to exactly zero balance using EIP-7702.

What This Skill Does

Enables OpenClaw agents to help users:

  • Sweep 100% of native gas tokens from EIP-7702 compatible chains
  • Leave exactly zero balance (no dust)
  • Cross-chain transfers via Gas.zip bridging
  • Batch sweeps from multiple chains to a single destination

Important: This only works on chains that support EIP-7702 (25 chains currently). Not all EVM chains are supported.

Supported Chains

Ethereum, BSC, Base, Arbitrum, Optimism, Polygon, Gnosis, Scroll, Zora, Mode, Mantle, Celo, Fraxtal, Unichain, World Chain, Berachain, Ink, Plasma, BOB, Story, Superseed, Sei, Sonic, Soneium, X Layer

Not supported: Avalanche, Blast, Linea, Apechain, and other chains without EIP-7702.

Publishing to ClawHub

Prerequisites

  1. Install the ClawHub CLI:

    npm install -g @openclaw/clawhub-cli
    
  2. Login with your GitHub account:

    clawhub login
    

    Note: Your GitHub account must be at least 1 week old to publish.

Publish Command

cd integrations/openclaw

clawhub publish . \
  --slug zerodust-chain-exit \
  --name "ZeroDust Chain Exit" \
  --version 1.0.0 \
  --changelog "Initial release - sweep native tokens to zero balance across 25 EIP-7702 chains"

Updating the Skill

clawhub publish . \
  --slug zerodust-chain-exit \
  --name "ZeroDust Chain Exit" \
  --version 1.1.0 \
  --changelog "Description of changes"

Local Testing

  1. Copy the skill to your OpenClaw skills directory:

    cp -r . ~/.openclaw/skills/zerodust-chain-exit/
    
  2. Enable in openclaw.json:

    {
      "skills": {
        "zerodust-chain-exit": {
          "enabled": true
        }
      }
    }
    
  3. Set your API key:

    export ZERODUST_API_KEY=zd_your_key_here
    
  4. Test with prompts like:

    • "sweep my dust from Arbitrum to Base"
    • "exit Polygon completely"
    • "move all my ETH to Base"

Getting an API Key

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

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

API Documentation

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

Fees

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

Support

License

MIT

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

  • OpenClaw CLI installed and configured.
  • Language: Markdown
  • License: MIT
  • Topics:

FAQ

How do I install zerodust-chain-exit?

Run openclaw add @zerodustxyz/zerodust-chain-exit in your terminal. This installs zerodust-chain-exit into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/zerodustxyz/zerodust-chain-exit. Review commits and README documentation before installing.