A Twitter bot that detects Comic Sans in images and rewards users with $COMICSANS tokens on Base network.
graph TD
A[Twitter User] -->|Tags Bot with Image| B[Eliza Bot]
B --> C{Comic Sans Plugin}
C -->|Detect Action| D[Comic Sans Detector]
D -->|Found Comic Sans| E[Wallet Plugin]
D -->|No Comic Sans| F[Response Generator]
E -->|Request Wallet| G[User Replies with Wallet]
G -->|Process Wallet| H[Token Transfer]
H -->|Success| I[Confirmation Message]
H -->|Failure| J[Error Handler]
- Main detection and reward logic
- Components:
index.ts: Plugin registrationaction.ts: Comic Sans detection actionmessages.ts: Response generation
- Handles wallet operations and token transfers
- Components:
index.ts: Plugin registrationaction.ts: Wallet processing action
- High-level coordination between plugins
- Manages state and user interactions
- Python-based font detection script
- OCR and font comparison
- Integrated with Node.js through utility functions
- Base network integration for $COMICSANS tokens
- Automated wallet validation and transfers
- Gas estimation and transaction management
- User interaction tracking
- Double-claim prevention
- Automatic cleanup of unclaimed requests
- Python 3.x
- Node.js
- Tesseract OCR
# Clone the repository
git clone <repository-url>
# Run the setup
make allThe Makefile handles:
- System dependency checks
- Python virtual environment setup
- Node.js dependencies
- Twitter client patching
- Environment configuration
Required environment variables:
# Twitter Configuration
TWITTER_COOKIES=[{"key":"auth_token","value":"YOUR_AUTH_TOKEN","domain":".twitter.com","path":"/"},{"key":"ct0","value":"YOUR_CT0","domain":".twitter.com","path":"/"}]
TWITTER_USERNAME=your_bot_username
TWITTER_PASSWORD=mock_password
TWITTER_EMAIL=mock@example.com
# Base Network Configuration
BASE_WALLET_PK=your_private_key
BASE_RPC_URL=https://mainnet.base.org- Network: Base
- Contract: 0x00Ef6220B7e28E890a5A265D82589e072564Cc57
- Standard: ERC20
# Full setup
make all
# Check dependencies
make check-deps
# Clean installation
make clean
# Show help
make help- Optimized image processing pipeline
- RPC fallback mechanisms
- Rate limiting implementation
- Efficient state management
- Wallet address validation
- Transaction timeout handling
- Rate limiting for API calls
- Error handling for failed transactions