Skip to content

brahim-cherifi/VegaTokenDistributor

Repository files navigation

🚀 Vega Token Airdrop System

A professional BSC (Binance Smart Chain) token distribution system for airdropping tokens to 20,000 wallets.

📋 Features

  • ✅ Batch processing for gas optimization
  • ✅ Automatic retry mechanism for failed transfers
  • ✅ Progress tracking with visual indicators
  • ✅ Comprehensive logging system
  • ✅ Gas estimation and balance checking tools
  • ✅ Support for 20,000+ wallet distributions
  • ✅ CSV wallet list management
  • ✅ Real-time transfer monitoring

🛠️ Prerequisites

  • Node.js v16 or higher
  • NPM or Yarn package manager
  • BSC wallet with:
    • Your tokens to distribute
    • Sufficient BNB for gas fees (~1-2 BNB for 20k transfers)
  • Private key of the wallet holding the tokens

📦 Installation

  1. Clone or download this repository
  2. Navigate to the project directory:
cd vegaAirdrop
  1. Install dependencies:
npm install

⚙️ Configuration

  1. Set up your environment variables:
    • Copy .env.example to .env
    • Edit .env and add your private key (remove 0x prefix if present)
    • Adjust token amount per wallet if needed
    • Configure gas settings based on network conditions
PRIVATE_KEY=your_private_key_without_0x_prefix
TOKENS_PER_WALLET=1000
BATCH_SIZE=100
GAS_PRICE_GWEI=5

⚠️ IMPORTANT: Never share your private key! Keep .env file secure and never commit it to version control.

🎯 Token Information

  • Token Address: 0x5Cca9154B79c09487b50Eb124E4C731CE6DbD8Fd
  • Network: BSC Mainnet
  • Chain ID: 56

📝 Usage

Step 1: Check Your Balance

First, verify you have enough tokens and BNB:

npm run check-balance

This will show:

  • Your BNB balance (for gas)
  • Your token balance
  • Maximum recipients you can airdrop to
  • Estimated gas costs

Step 2: Generate or Prepare Wallet List

Option A: Generate Random Wallets (for testing)

npm run generate-wallets

This creates 20,000 random wallet addresses in data/wallets.csv

Option B: Use Your Own Wallet List Create a CSV file at data/wallets.csv with the following format:

Index,Address
1,0x1234...
2,0x5678...

Step 3: Estimate Gas Costs

Check current gas prices and estimate total costs:

npm run estimate-gas

Step 4: Run the Airdrop

Start the distribution:

npm run airdrop

The system will:

  1. Connect to BSC network
  2. Load your token contract
  3. Verify sufficient balance
  4. Load recipient addresses
  5. Process transfers in batches
  6. Save results to logs/ directory

📊 Monitoring Progress

During the airdrop, you'll see:

  • Real-time progress bars
  • Batch completion status
  • Success/failure counts
  • Transaction hashes
  • Gas usage statistics

📁 Output Files

After completion, check the logs/ directory for:

  • success_[timestamp].json - Successful transfers with tx hashes
  • failed_[timestamp].json - Failed transfers with error reasons
  • summary_[timestamp].json - Overall distribution summary

🔧 Advanced Configuration

Batch Size Optimization

Adjust BATCH_SIZE in .env:

  • Smaller batches (50-100): More stable, slower
  • Larger batches (200-500): Faster, may hit RPC limits

Gas Price Strategy

Monitor BSCScan for optimal gas prices:

  • Low traffic: 3-5 Gwei
  • Normal: 5-7 Gwei
  • High traffic: 10+ Gwei

Retry Failed Transfers

To retry only failed transfers:

  1. Load failed addresses from logs
  2. Create new CSV with failed addresses
  3. Run airdrop again with the new list

⚠️ Important Security Notes

  1. Private Key Security:

    • Never share your private key
    • Use a dedicated wallet for airdrops
    • Consider using hardware wallet integration
  2. Test First:

    • Test with a small batch (10-100 wallets)
    • Verify transactions on BSCScan
    • Check token balances are correct
  3. Gas Management:

    • Keep extra BNB for unexpected gas spikes
    • Monitor network congestion
    • Use batch delays to avoid rate limits

🚨 Troubleshooting

"Insufficient token balance"

  • Check token balance: npm run check-balance
  • Ensure tokens are in the wallet with the private key

"Insufficient BNB for gas"

  • Add more BNB to your wallet
  • Reduce gas price if network allows
  • Process in smaller batches

"Transaction failed"

  • Check recipient address validity
  • Verify token contract allows transfers
  • Ensure no token lock or pause is active

Rate Limiting Errors

  • Increase BATCH_DELAY in .env
  • Reduce BATCH_SIZE
  • Use alternative RPC endpoints

📈 Performance Optimization

For 20,000 wallets:

  • Estimated time: 2-4 hours (depending on batch size and delays)
  • Estimated gas cost: 1-2 BNB (at 5 Gwei)
  • Recommended batch size: 100-200 transfers
  • Recommended delay: 3-5 seconds between batches

🔄 Multi-Send Contract (Advanced)

For even more gas optimization, consider deploying a MultiSender contract:

  • Reduces gas by 40-60%
  • Allows sending to multiple addresses in one transaction
  • Requires contract deployment first

📞 Support

For issues or questions:

  1. Check the logs in logs/ directory
  2. Verify all configuration settings
  3. Ensure sufficient balances
  4. Check BSC network status

📜 License

MIT License - Use at your own risk

⚡ Quick Start Checklist

  • Install dependencies: npm install
  • Configure .env with your private key
  • Set desired tokens per wallet in .env
  • Check balance: npm run check-balance
  • Prepare wallet list (generate or import)
  • Estimate gas: npm run estimate-gas
  • Run test with 10 wallets first
  • Execute full airdrop: npm run airdrop
  • Monitor progress and check logs

Remember: Always test with a small batch first! 🧪

Good luck with your airdrop! 🎊

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published