A Discord bot that monitors HoneyFarms smart contract activity on the WAX blockchain and sends notifications to Discord channels.
- Monitors farmforhoney contract actions (claim, unstake, transfer)
- Special formatting for stakehive transfers ("🏠 New Hive Staked")
- Special formatting for stakebees transfers ("🐝 Bees Staked to Hive")
- Prevents spam on startup by filtering historical actions
- Automatic failover between multiple Hyperion API endpoints
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
- Copy
.env.exampleto.envand fill in your values:cp .env.example .env
- Run the bot:
python3 bot.py
- A Discord bot token
- A GitHub repository with your code
- A DigitalOcean account
-
Push your code to GitHub
git init git add . git commit -m "Initial commit" git remote add origin https://github.com/your-username/contract-bot-t.git git push -u origin main
-
Create a new App on DigitalOcean
- Go to DigitalOcean Apps
- Click "Create App"
- Choose "GitHub" as source
- Select your repository and branch
-
Configure the App
- DigitalOcean will auto-detect the
app.yamlfile - Update the GitHub repo URL in
app.yamlto match your repository - Set the
DISCORD_TOKENenvironment variable as a secret
- DigitalOcean will auto-detect the
-
Environment Variables Set these in the DigitalOcean App Platform dashboard:
DISCORD_TOKEN(Secret) - Your Discord bot tokenCHANNEL_ID- Discord channel ID to send notificationsCONTRACT_NAME- Smart contract name (default: farmforhoney)NETWORK- Blockchain network (testnet/mainnet)POLL_INTERVAL- Polling interval in seconds (default: 10)
-
Deploy
- Click "Create Resources"
- The app will automatically deploy and start running
- View logs in the DigitalOcean dashboard under "Runtime Logs"
- The bot will automatically restart if it crashes
- Monitor Discord channel for notifications
testnet- WAX Testnetmainnet- WAX Mainnet
claim- Honey claiming eventsunstake- Asset unstaking eventstransfer- Asset transfers (with special formatting for stakehive/stakebees)setbeevar- Bee variable updatessethivevar- Hive variable updates
-
Bot not responding
- Check Discord token is valid
- Verify bot has permissions in the target channel
- Check runtime logs for errors
-
No notifications appearing
- Verify CHANNEL_ID is correct
- Check if contract has recent activity
- Review API endpoint connectivity
-
Deployment fails
- Ensure all required environment variables are set
- Check GitHub repository is accessible
- Verify app.yaml syntax
For issues or questions, check the runtime logs in DigitalOcean dashboard or review the bot's console output.