A utility bot that sweeps ETH from a source wallet to a safe wallet, intelligently estimating gas, retrying failed transactions, and supporting both fast and normal sweep modes.
- ✅ Fast mode for rapid sweeping
- ✅ Intelligent gas estimation
- ✅ Works with HTTPS & WebSocket RPC URLs
- ✅ Automatic retries with delay
- ✅ Flexible config via
.envor direct object
npm i eth-sweeper-botYou can configure the bot in two different ways:
// bot.js or index.js
const ethSweeperBot = require("eth-sweeper-bot");
ethSweeperBot.start({
ethRpcUrl: "https://mainnet.infura.io/v3/YOUR_INFURA_KEY",
targetWalletPrivateKey: "your_private_key",
safeWalletAddress: "your_safe_address",
isFastMode: true
});- Create a
.envfile in your project root:
ETHEREUM_RPC_URL=https://mainnet.infura.io/v3/YOUR_INFURA_KEY
TARGET_WALLET_PRIVATE_KEY=your_target_wallet_private_key
SAFE_WALLET_ADDRESS=your_safe_wallet_address
IS_FAST_MODE=true
- Use the following code:
// bot.js or index.js
const ethSweeperBot = require("eth-sweeper-bot");
// Use default .env
ethSweeperBot.start();
// Or specify a custom path
// ethSweeperBot.start(".env");
// ethSweeperBot.start("config/myenv.env");node bot.jsproject/
├── bot.js
├── .env
└── node_modules/
- DO NOT share your
.envfile or private key. - Use a cold wallet as the safe destination for best security.
- Supports both HTTP and WebSocket RPC endpoints.
MIT License © 2025
Happy sweeping! 🚀