Important
This repository is deprecated, the lens faucet now requires a Google account
An automated bot for claiming tokens from the Lens Protocol testnet faucet. The bot solves maze challenges and handles Cloudflare Turnstile captchas automatically.
- 🎮 Automated maze solving using A* pathfinding algorithm
- 🔄 Proxy support with rotation
- 👛 Multiple wallet support
- 🤖 Automatic Cloudflare Turnstile captcha solving (via 2captcha)
- 📝 Detailed logging with colored output
- ⏱️ Configurable wait times between attempts
- Python 3.8 or higher
- A 2captcha.com API key (optional but recommended)
- Proxies (optional)
- EVM wallet addresses
- Clone the repository:
git clone https://github.com/Tnodes/lens-faucet-bot.git
cd lens-faucet-bot
- Install the required dependencies:
pip install -r requirements.txt
- Create a
.env
file in the root directory:
# Your 2captcha API key (optional)
TWOCAPTCHA_API_KEY=your_api_key_here
# Wait time between attempts in seconds
WAIT_TIME=60
# Don't change these
TURNSTILE_SITEKEY=0x4AAAAAAA1z6BHznYZc0TNL
PAGE_URL=https://testnet.lenscan.io/faucet
- Add your wallet addresses to
wallet.txt
:
# One wallet address per line
0x1234567890123456789012345678901234567890
0xabcdef0123456789abcdef0123456789abcdef01
- (Optional) Add your proxies to
proxy.txt
:
# Format: protocol://username:password@host:port
http://user:[email protected]:8080
http://user:[email protected]:8080
Run the bot using either:
python run.py
The bot will:
- Load your configuration
- Initialize the captcha solver if configured
- Start attempting to claim tokens by:
- Getting and solving mazes
- Solving Cloudflare Turnstile captchas
- Submitting solutions and claiming tokens
- Wait for the configured time between attempts
- Log all activities and results
The bot maintains two log files in the logs
directory:
success.txt
: Records successful claims with transaction detailsfailed.txt
: Records failed attempts with error information
├── run.py # Entry point
├── requirements.txt # Python dependencies
├── .env # Configuration file
├── wallet.txt # Wallet addresses
├── proxy.txt # Proxy list
├── src/
│ ├── main.py # Main program logic
│ ├── core/
│ │ └── solver.py # Maze solving algorithm
│ ├── models/
│ │ └── maze.py # Data models
│ ├── services/
│ │ └── api_client.py # API interaction
│ └── utils/
│ ├── banner.py # ASCII banner
│ ├── logger.py # Logging utilities
│ ├── proxy_manager.py # Proxy handling
│ └── wallet_manager.py # Wallet handling
The bot includes comprehensive error handling for:
- Network issues
- Invalid proxies
- API errors
- Captcha solving failures
- Invalid wallet addresses
Feel free to submit issues, fork the repository, and create pull requests for any improvements.
This bot is for educational purposes only. Use at your own risk and make sure to comply with the Lens Protocol's terms of service.