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)
| Chain | ID | Native Token |
|---|
| Ethereum | 1 | ETH |
| BSC |
56 | BNB |
| Base | 8453 | ETH |
| Arbitrum | 42161 | ETH |
| Optimism | 10 | ETH |
| Polygon | 137 | POL |
| Gnosis | 100 | XDAI |
| Scroll | 534352 | ETH |
| Zora | 7777777 | ETH |
| Mode | 34443 | ETH |
| Mantle | 5000 | MNT |
| Celo | 42220 | CELO |
| Fraxtal | 252 | FRAX |
| Unichain | 130 | ETH |
| World Chain | 480 | ETH |
| Berachain | 80094 | BERA |
| Ink | 57073 | ETH |
| Plasma | 9745 | XPL |
| BOB | 60808 | ETH |
| Story | 1514 | IP |
| Superseed | 5330 | ETH |
| Sei | 1329 | SEI |
| Sonic | 146 | S |
| Soneium | 1868 | ETH |
| X Layer | 196 | OKB |
Note: Chains like Avalanche, Blast, Linea, and Apechain do NOT support EIP-7702 and cannot be swept.
API Base URL
CODEBLOCK0
Step 1: Register for API Key (One-Time)
CODEBLOCK1
Response:
CODEBLOCK2
Store apiKey as the ZERODUST_API_KEY environment variable.
Step 2: Get Quote
Check the user's balance and fees before sweeping:
CODEBLOCK3
Response:
CODEBLOCK4
Step 3: Get Authorization Data
Get the EIP-712 typed data for signing:
CODEBLOCK5
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
- EIP-7702 revoke authorization - Pre-signed revocation (executed after sweep)
- EIP-712 sweep intent - Authorizes the specific sweep parameters
Step 5: Submit Sweep
CODEBLOCK6
Response:
CODEBLOCK7
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:
CODEBLOCK8
Batch Sweeps (Multiple Chains)
Sweep from multiple chains in one request:
CODEBLOCK9
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
| Error | Meaning |
|---|
| INLINECODE6 | Balance below minimum (~$0.10) |
| INLINECODE7 |
Quote older than 5 minutes |
|
CHAIN_NOT_SUPPORTED | Chain doesn't support EIP-7702 |
|
INVALID_SIGNATURE | Signature verification failed |
|
RATE_LIMIT_EXCEEDED | Daily 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 - 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?"
- If yes, call
/authorization to get typed data - Request wallet signatures (EIP-7702 delegation, revoke, and EIP-712 sweep)
- Submit to
/sweep with signatures - Poll status until complete
- 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.
ZeroDust 链上清空
ZeroDust 利用 EIP-7702 赞助执行功能,可将原生 Gas 代币余额精确清零。此功能仅适用于支持 EIP-7702 的链(并非所有 EVM 链都支持)。
何时使用此技能
当用户希望以下操作时激活:
- - 完全退出某条区块链(将所有原生代币转出)
- 清空钱包中的小额/零散余额
- 转移 100% 余额,不留任何剩余
- 完全清空钱包
- 合并来自多条链的资金
触发短语
- - 完全退出此链
- 将我在 [链名] 的所有余额转出
- 清空我的零散余额
- 清空此钱包
- 将所有资产转移到 [链名]
- 余额归零
支持的链(25 条兼容 EIP-7702 的链)
56 | BNB |
| Base | 8453 | ETH |
| Arbitrum | 42161 | ETH |
| Optimism | 10 | ETH |
| Polygon | 137 | POL |
| Gnosis | 100 | XDAI |
| Scroll | 534352 | ETH |
| Zora | 7777777 | ETH |
| Mode | 34443 | ETH |
| Mantle | 5000 | MNT |
| Celo | 42220 | CELO |
| Fraxtal | 252 | FRAX |
| Unichain | 130 | ETH |
| World Chain | 480 | ETH |
| Berachain | 80094 | BERA |
| Ink | 57073 | ETH |
| Plasma | 9745 | XPL |
| BOB | 60808 | ETH |
| Story | 1514 | IP |
| Superseed | 5330 | ETH |
| Sei | 1329 | SEI |
| Sonic | 146 | S |
| Soneium | 1868 | ETH |
| X Layer | 196 | OKB |
注意: Avalanche、Blast、Linea 和 Apechain 等链不支持 EIP-7702,无法进行清空操作。
API 基础 URL
https://zerodust-backend-production.up.railway.app
第一步:注册获取 API 密钥(一次性操作)
bash
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
}
响应:
json
{
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!
}
将 apiKey 存储为 ZERODUSTAPIKEY 环境变量。
第二步:获取报价
在清空前检查用户余额和费用:
bash
curl https://zerodust-backend-production.up.railway.app/quote?userAddress=0xUSER&fromChainId=42161&toChainId=8453&destination=0xDEST
响应:
json
{
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
}
第三步:获取授权数据
获取用于签名的 EIP-712 类型化数据:
bash
curl -X POST https://zerodust-backend-production.up.railway.app/authorization \
-H Content-Type: application/json \
-d {quoteId: uuid-from-quote}
响应包含 typedData(用于清空的 EIP-712 数据)和 eip7702(委托参数)。
第四步:用户签署消息
用户需要签署:
- 1. EIP-7702 委托授权 - 将其 EOA 委托给 ZeroDust 合约
- EIP-7702 撤销授权 - 预先签署的撤销授权(清空后执行)
- EIP-712 清空意图 - 授权特定的清空参数
第五步:提交清空请求
bash
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...
}
响应:
json
{
sweepId: uuid,
status: pending,
txHash: null
}
轮询 GET /sweep/{sweepId} 获取状态更新,直到 status: completed。
便捷接口:合并报价 + 授权
对于代理,使用此单一接口同时获取报价和授权数据:
bash
curl -X POST https://zerodust-backend-production.up.railway.app/agent/sweep \
-H Content-Type: application/json \
-H X-API-Key: $ZERODUSTAPIKEY \
-d {
fromChainId: 42161,
toChainId: 8453,
userAddress: 0x...,
destination: 0x...
}
批量清空(多条链)
一次请求中清空多条链:
bash
curl -X POST https://zerodust-backend-production.up.railway.app/agent/batch-sweep \
-H Content-Type: application/json \
-H X-API-Key: $ZERODUSTAPIKEY \
-d {
sweeps: [
{fromChainId: 42161},
{fromChainId: 10},
{fromChainId: 137}
],
destination: 0x...,
consolidateToChainId: 8453
}
费用
- - 服务费: 余额的 1%(最低 $0.05,最高 $0.50)
- Gas 费用: 由 ZeroDust 支付,从清空金额中扣除
- 用户收到: 约余额的 97-99%(因 Gas 价格而异)
速率限制
- - 代理密钥:每分钟 300 次请求,每天 1000 次清空
- 如需更高限制,请联系 ZeroDust
错误代码
| 错误 | 含义 |
|---|
| BALANCETOOLOW | 余额低于最低要求(约 $0.10) |
| QUOTE_EXPIRED |
报价超过 5 分钟 |
| CHAIN
NOTSUPPORTED | 链不支持 EIP-7702 |
| INVALID_SIGNATURE | 签名验证失败 |
| RATE
LIMITEXCEEDED | 超出每日或每分钟限制 |
代理对话示例
用户: 我想把我所有的 ETH 从 Arbitrum 转到 Base
代理:
- 1. 调用 /quote 检查余额和费用
- 向用户显示:您在 Arbitrum 上有 0.005 ETH。扣除费用(约 1%)后,您将在 Base 上收到约 0.00495 ETH。这需要签署 3 条消息。是否继续?
- 如果同意,调用 /authorization 获取类型化数据
- 请求钱包签名(EIP-7702 委托、撤销和 EIP-712 清空)
- 将签名提交到 /sweep
- 轮询状态直到完成
- 确认:完成!您的 Arbitrum 余额现在正好为 0。在 Base 上收到 0.00494 ETH。
重要说明
- 1. 需要 EIP-7702: 用户的钱包必须支持 EIP-7702。截至