{"id":31945342,"url":"https://github.com/ehsan6sha/mass-token-buy-web","last_synced_at":"2026-07-19T03:34:00.496Z","repository":{"id":318207014,"uuid":"1070338748","full_name":"ehsan6sha/mass-token-buy-web","owner":"ehsan6sha","description":"This is a bot to automatically create multiple wallets and transfer funds to it and buy a specific token ","archived":false,"fork":false,"pushed_at":"2025-10-05T18:59:11.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-05T20:43:31.030Z","etag":null,"topics":["crypto-bot","cryptocurrency","trading","trading-algorithms","trading-strategies","uniswap","uniswap-copy-trade","uniswap-v3","volume-bot"],"latest_commit_sha":null,"homepage":"https://ehsan6sha.github.io/mass-token-buy-web/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ehsan6sha.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-05T18:18:40.000Z","updated_at":"2025-10-05T19:07:12.000Z","dependencies_parsed_at":"2025-10-05T20:43:36.816Z","dependency_job_id":null,"html_url":"https://github.com/ehsan6sha/mass-token-buy-web","commit_stats":null,"previous_names":["ehsan6sha/mass-token-buy-web"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ehsan6sha/mass-token-buy-web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsan6sha%2Fmass-token-buy-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsan6sha%2Fmass-token-buy-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsan6sha%2Fmass-token-buy-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsan6sha%2Fmass-token-buy-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ehsan6sha","download_url":"https://codeload.github.com/ehsan6sha/mass-token-buy-web/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehsan6sha%2Fmass-token-buy-web/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018788,"owners_count":26086454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crypto-bot","cryptocurrency","trading","trading-algorithms","trading-strategies","uniswap","uniswap-copy-trade","uniswap-v3","volume-bot"],"created_at":"2025-10-14T10:55:03.949Z","updated_at":"2025-10-14T10:55:05.721Z","avatar_url":"https://github.com/ehsan6sha.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Mass Token Buy Bot - Base Network\n\nA production-ready, secure web application for automated token purchasing on the Base network. This bot creates multiple wallets, distributes ETH, swaps for tokens using Bungee.exchange, and consolidates funds - all from your browser.\n\n## ✨ Features\n\n- 🔐 **Secure \u0026 Encrypted**: All private keys are encrypted using AES-GCM with password protection\n- 💾 **Local Storage**: Uses IndexedDB for persistent, local-only data storage (no server required)\n- 🌐 **GitHub Pages Compatible**: Runs entirely in the browser - perfect for static hosting\n- 📊 **Real-time Tracking**: Monitor all transactions with detailed logs and status updates\n- 🔄 **Bungee Integration**: Utilizes Bungee.exchange API for optimal token swaps\n- 📈 **Batch Operations**: Create and manage up to 1000 wallets simultaneously\n- 🎨 **Modern UI**: Clean, responsive interface with dark theme\n- ⚡ **TypeScript**: Type-safe, production-level code\n\n## 🏗️ Architecture\n\n```\nmass-token-buy-web/\n├── src/\n│   ├── app.ts              # Main application logic\n│   ├── types.ts            # TypeScript type definitions\n│   ├── database.ts         # IndexedDB wrapper\n│   ├── crypto.ts           # Encryption utilities (Web Crypto API)\n│   ├── wallet.ts           # Wallet management (ethers.js)\n│   ├── bungee.ts           # Bungee.exchange API integration\n│   ├── transactions.ts     # Transaction orchestration\n│   └── ui.ts              # UI management\n├── index.html             # Main HTML file\n├── styles.css             # Styling\n├── package.json           # Dependencies\n├── tsconfig.json          # TypeScript configuration\n├── webpack.config.js      # Build configuration\n└── README.md             # This file\n```\n\n## 🛠️ Technology Stack\n\n- **TypeScript**: Type-safe development\n- **Ethers.js v6**: Ethereum wallet and transaction handling\n- **Axios**: HTTP client for Bungee API\n- **IndexedDB**: Browser-based local database\n- **Web Crypto API**: Secure encryption/decryption\n- **Webpack**: Module bundling for browser\n- **Base Network**: Layer 2 Ethereum blockchain\n\n## 📋 Prerequisites\n\n- Node.js v18 or higher\n- npm or yarn\n- Modern web browser (Chrome, Firefox, Edge, Safari)\n- Master wallet with sufficient ETH on Base network\n\n## 🚀 Installation\n\n1. **Clone or download the repository**\n   ```bash\n   cd mass-token-buy-web\n   ```\n\n2. **Install dependencies**\n   ```bash\n   npm install\n   ```\n\n3. **Build the project**\n   ```bash\n   npm run build\n   ```\n\n4. **Run development server (optional)**\n   ```bash\n   npm run serve\n   ```\n\n5. **Deploy to GitHub Pages**\n   - Build the project\n   - Upload the `dist` folder to GitHub Pages\n   - Or use GitHub Actions for automated deployment\n\n## 📦 Deployment to GitHub Pages\n\n### Method 1: Manual Deployment\n\n1. Build the project:\n   ```bash\n   npm run build\n   ```\n\n2. Push the `dist` folder to the `gh-pages` branch:\n   ```bash\n   git add dist -f\n   git commit -m \"Deploy to GitHub Pages\"\n   git subtree push --prefix dist origin gh-pages\n   ```\n\n### Method 2: GitHub Actions (Recommended)\n\nCreate `.github/workflows/deploy.yml`:\n\n```yaml\nname: Deploy to GitHub Pages\n\non:\n  push:\n    branches: [ main ]\n\njobs:\n  build-and-deploy:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      \n      - name: Setup Node.js\n        uses: actions/setup-node@v3\n        with:\n          node-version: '18'\n          \n      - name: Install dependencies\n        run: npm install\n        \n      - name: Build\n        run: npm run build\n        \n      - name: Deploy to GitHub Pages\n        uses: peaceiris/actions-gh-pages@v3\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          publish_dir: ./dist\n```\n\nThen enable GitHub Pages in your repository settings to serve from the `gh-pages` branch.\n\n## 📖 Usage Guide\n\n### Initial Setup\n\n1. **Open the application** in your browser\n2. **Set a master password** (minimum 8 characters)\n   - This password encrypts all wallet private keys\n   - **IMPORTANT**: Remember this password - it cannot be recovered!\n3. Click \"Unlock Application\"\n\n### Configuration Parameters\n\nFill in the following required fields:\n\n1. **Token Address**: The ERC-20 token contract address on Base (e.g., `0x9e12735d77c72c5C3670636D428f2F3815d8A4cB`)\n2. **Number of Wallets**: How many wallets to create (1-1000)\n3. **Master Wallet Private Key**: Private key of the wallet funding the operation\n   - Must have sufficient ETH to fund all wallets\n4. **Target Wallet Address**: Where remaining funds will be sent after swaps\n5. **Gas Fee Amount (ETH)**: Amount reserved for gas per wallet (e.g., `0.0001`)\n6. **Purchase Amount (ETH)**: Amount to swap for tokens per wallet (e.g., `0.001`)\n7. **Minimum Kept Tokens**: Minimum tokens to keep in each wallet after transfer\n8. **Base RPC URL**: Base network RPC endpoint (default: `https://mainnet.base.org`)\n\n### Operation Flow\n\n1. **Wallet Creation**: Creates N new wallets with encrypted private keys\n2. **Fund Distribution**: Transfers ETH from master wallet to each new wallet\n3. **Token Swaps**: Swaps ETH for target token using Bungee.exchange in each wallet\n4. **Fund Consolidation**: Transfers tokens and remaining ETH to target address\n   - Keeps minimum specified tokens in each wallet\n   - Transfers all remaining ETH\n\n### Monitoring\n\n- **Status Panel**: Real-time operation progress\n- **Activity Logs**: Detailed logs of all actions\n- **Transaction History**: Complete record with BaseScan links\n- **Wallets Table**: List of all created wallets with balances\n\n### Data Management\n\n- **Save Config**: All parameters are automatically saved to local storage\n- **Load Config**: Restore previously saved configuration\n- **Export Logs**: Download activity logs as text file\n- **Export Transactions**: Download transaction history as CSV\n- **Export Wallets**: Download wallet list with encrypted keys (CSV)\n\n## 🔒 Security Features\n\n### Encryption\n\n- **AES-GCM 256-bit encryption** for all private keys\n- **PBKDF2** key derivation with 100,000 iterations\n- **Random salt and IV** for each encryption operation\n- **Password hashing** using SHA-256\n\n### Data Storage\n\n- All data stored **locally** in IndexedDB\n- No data sent to external servers (except blockchain RPCs)\n- Private keys **never** leave your browser unencrypted\n- Password is **never** stored (only hash for verification)\n\n### Best Practices\n\n1. **Use a strong master password** (12+ characters, mixed case, numbers, symbols)\n2. **Backup your data** regularly (export wallets and transactions)\n3. **Test with small amounts** first\n4. **Keep your master wallet secure**\n5. **Use secure RPC endpoints** (avoid public nodes for production)\n6. **Clear browser data** only if you have backups\n\n## ⚙️ Configuration Examples\n\n### Small Test Run\n\n```\nToken Address: 0x9e12735d77c72c5C3670636D428f2F3815d8A4cB\nNumber of Wallets: 5\nGas Amount: 0.0001 ETH\nPurchase Amount: 0.001 ETH\nMin Kept Tokens: 100\n```\n\n**Total ETH needed**: 0.0055 ETH (plus extra for master wallet gas)\n\n### Production Run\n\n```\nToken Address: 0x9e12735d77c72c5C3670636D428f2F3815d8A4cB\nNumber of Wallets: 500\nGas Amount: 0.0002 ETH\nPurchase Amount: 0.005 ETH\nMin Kept Tokens: 1000\n```\n\n**Total ETH needed**: 2.6 ETH (plus extra for master wallet gas)\n\n## 🔧 Development\n\n### Build Commands\n\n```bash\n# Development mode with watch\nnpm run dev\n\n# Production build\nnpm run build\n\n# Run development server\nnpm run serve\n\n# Type checking only\nnpm run type-check\n```\n\n### Project Structure\n\n- **src/types.ts**: Shared TypeScript interfaces\n- **src/database.ts**: IndexedDB operations\n- **src/crypto.ts**: Encryption/decryption using Web Crypto API\n- **src/wallet.ts**: Wallet creation and transactions\n- **src/bungee.ts**: Bungee.exchange API integration\n- **src/transactions.ts**: Main operation orchestration\n- **src/ui.ts**: UI updates and event handling\n- **src/app.ts**: Application initialization and coordination\n\n## 🌐 Bungee.exchange API\n\nThis bot uses the Bungee.exchange API for token swaps:\n\n- **Endpoint**: `https://api.bungee.exchange/v1/quote`\n- **Chain ID**: 8453 (Base Mainnet)\n- **Native ETH Address**: `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE`\n- **Slippage**: Default 0.5%\n\nThe API returns optimal routing across multiple DEXs on Base for the best swap rates.\n\n## ⚠️ Important Notes\n\n### Gas Estimation\n\nThe bot uses the **exact** gas and token amounts you specify. Ensure you provide:\n- Sufficient gas amount for transactions on Base\n- Appropriate slippage for token swaps\n- Extra ETH in master wallet for gas fees\n\n### Rate Limits\n\n- Bungee API may have rate limits\n- Add delays between operations to avoid issues\n- Current delays: 100ms (wallet creation), 500ms (transfers), 1000ms (swaps)\n\n### Error Handling\n\n- All operations have try-catch error handling\n- Failed transactions are logged with details\n- Operation can be stopped at any time\n- Failed wallets remain in \"created\" or \"funded\" state for retry\n\n### Network Considerations\n\n- Base network uses EIP-1559 (priority fees)\n- Gas prices are fetched dynamically\n- Transactions wait for 1 confirmation by default\n- Failed transactions don't halt the entire operation\n\n## 🐛 Troubleshooting\n\n### \"Failed to open database\"\n- Clear browser cache/storage\n- Try a different browser\n- Check browser's IndexedDB support\n\n### \"Insufficient balance\"\n- Ensure master wallet has enough ETH\n- Account for gas costs in calculations\n- Check Base network balance, not mainnet\n\n### \"Transaction failed or was reverted\"\n- Check gas amount is sufficient\n- Verify token address is correct\n- Ensure sufficient liquidity for swap\n- Try increasing slippage tolerance\n\n### \"Bungee API error\"\n- Check internet connection\n- Verify Base RPC is accessible\n- Wait and retry (may be rate limited)\n- Check Bungee service status\n\n### \"Decryption failed\"\n- Wrong master password\n- Clear data and start fresh\n- Check for browser updates\n\n## 📊 Performance\n\n- **Wallet Creation**: ~100ms per wallet\n- **ETH Transfer**: ~500ms per transaction\n- **Token Swap**: ~1-3 seconds per swap (network dependent)\n- **Token Transfer**: ~500ms per transaction\n\nFor 100 wallets, expect total runtime of approximately **10-15 minutes**.\n\n## 🤝 Contributing\n\nThis is a production tool. If you'd like to contribute:\n\n1. Test thoroughly on testnet first\n2. Maintain security standards\n3. Add proper error handling\n4. Update documentation\n5. Follow TypeScript best practices\n\n## 📄 License\n\nMIT License - Use at your own risk\n\n## ⚡ Support\n\nFor issues and questions:\n1. Check this README thoroughly\n2. Review browser console for errors\n3. Test with small amounts first\n4. Verify all configuration parameters\n\n## 🎯 Roadmap\n\nPotential future enhancements:\n- [ ] Multi-chain support\n- [ ] Custom DEX selection\n- [ ] Advanced slippage controls\n- [ ] Batch retry for failed operations\n- [ ] Import/export encrypted config\n- [ ] Transaction cost estimation\n- [ ] Mobile-responsive improvements\n- [ ] Multi-language support\n\n---\n\n**⚠️ DISCLAIMER**: This software is for educational and personal use. Trading cryptocurrencies carries risk. Always test with small amounts first. The authors are not responsible for any losses incurred through the use of this software. Use at your own risk. The software comes with absolute no warranty. It is not intended for production use. It is provided as is, without any warranty of any kind, express or implied. No legal advice or support is provided. The authors are not liable for any damages or losses incurred through the use of this software. The authors are not liable for any legal or financial consequences of using this software.\n\n**🔐 SECURITY WARNING**: Never share your private keys or master password. Always verify smart contract addresses before interacting. This tool handles sensitive cryptographic material - use responsibly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehsan6sha%2Fmass-token-buy-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fehsan6sha%2Fmass-token-buy-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehsan6sha%2Fmass-token-buy-web/lists"}