Automated Aavegotchi pet sitter bot for Base chain. Monitors and pets Aavegotchis every 12 hours to maintain kinship.
- Call function
setPetOperatorForAllusing pet operator address andtrueas function arguments here https://basescan.org/address/0x683a56589203b186ea3a0d089665a90f023e9f7a#writeContract - Node.js 18+
- Wallet with ETH on Base
- Telegram bot (optional, for notifications)
-
Clone the repository:
git clone https://github.com/egornomic/aavegotchi-pet-sitter.git cd aavegotchi-pet-sitter -
Configure environment:
cp .env.example .env # Edit .env with your configuration -
Run with Docker Compose:
docker compose up -d
-
Install dependencies:
npm install
-
Build the project:
npm run build
-
Configure environment:
cp .env.example .env # Edit .env with your configuration -
Start the bot:
npm start
| Variable | Description | Example |
|---|---|---|
PRIVATE_KEY |
Private key of wallet that will pet Aavegotchis | 0x123... |
TARGET_ADDRESS |
Address that owns the Aavegotchis | 0xabc... |
TELEGRAM_BOT_TOKEN |
Telegram bot token (optional) | 123:ABC... |
TELEGRAM_CHAT_ID |
Telegram chat ID (optional) | -1001... |
| Variable | Description | Default |
|---|---|---|
BASE_RPC_URL |
Base chain RPC endpoint | https://mainnet.base.org |
DIAMOND_CONTRACT_ADDRESS |
Aavegotchi contract on Base | 0xA99c4B... |
LOG_LEVEL |
Logging level | info |
PET_INTERVAL_HOURS |
Hours between pet checks | 12 |
npm run dev # Run in development mode with hot reload
npm run watch # Run with file watchingnpm test # Test main service functionality
npm run test:interact # Test single Aavegotchi interaction
npm run test:batch # Test batch interaction (all Aavegotchis)npm run build # Build for production
npm start # Start production server# Start the service
docker compose up -d
# View logs
docker compose logs -f
# Stop the service
docker compose down# Build image
docker build -t aavegotchi-pet-sitter .
# Run container
docker run -d --env-file .env --name aavegotchi-bot aavegotchi-pet-sitter- Location:
./logs/directory - Format: JSON structured logs
- Levels: error, warn, info, debug
- Rotation: Automatic log rotation
- Docker: Built-in health check every 30 seconds
- Status: Monitor via Docker or container orchestration
- Alerts: Telegram notifications for important events
- Connection Issues: Automatic retry with exponential backoff
- Gas Price Spikes: Dynamic adjustment with safety limits
- Cooldown Management: Respects 12-hour Aavegotchi interaction cooldown
- Transaction Failures: Detailed logging and optional Telegram alerts
- Private Keys: Stored in environment variables only
- No Hardcoded Secrets: All sensitive data via environment
- Minimal Permissions: Bot only needs interaction permissions
- Docker Security: Non-root user, minimal base image
LOG_LEVEL=debug npm run dev