viem-sweep
Installation
SKILL.md
Viem Sweep
Overview
This skill provides implementation patterns for advanced transaction strategies using viem v2. It covers methods for moving assets from multiple sources to a destination, ranging from simple private key transfers to advanced gas-optimized and signature-based patterns.
Strategy Selection Guide
Choose the appropriate strategy based on your requirements and infrastructure:
1. Legacy Strategy (Direct Transfer)
Best for: General use case with private keys.
- Pros: Works with any ERC20 token; simple logic.
- Cons: High gas cost (requires ETH on every source account); management of dust ETH.
- Mechanism: Admin funds source -> Source sends token.
2. Factory Strategy (CREATE2)
Best for: High-volume deposit addresses (e.g., exchanges).
- Pros: Lowest gas cost; clean address management; no private keys needed (just salt).