Telegram bot for checking RustChain wallet balance and miner status.
Bounty #2869 - 10 RTC
| Command | Description |
|---|---|
/balance <wallet> |
Check RTC balance |
/miners |
List active miners |
/epoch |
Current epoch info |
/price |
Show RTC reference rate ($0.10) |
/help |
Show commands |
- Open Telegram and search for @BotFather
- Send
/newbotand follow instructions - Copy the bot token
pip install -r requirements.txtexport TELEGRAM_BOT_TOKEN="your_token_here"
python bot.py- Create account at railway.app
- Create new project → Deploy from GitHub
- Add environment variable:
TELEGRAM_BOT_TOKEN - Railway auto-deploys on push
- Install flyctl:
curl -L https://fly.io/install.sh | sh - Login:
fly auth login - Launch:
fly launch - Set secret:
fly secrets set TELEGRAM_BOT_TOKEN=your_token
Create /etc/systemd/system/rustchain-bot.service:
[Unit]
Description=RustChain Telegram Bot
After=network.target
[Service]
Type=simple
User=bot
WorkingDirectory=/opt/rustchain-bot
Environment=TELEGRAM_BOT_TOKEN=your_token
ExecStart=/usr/bin/python3 bot.py
Restart=always
[Install]
WantedBy=multi-user.targetEnable and start:
sudo systemctl enable rustchain-bot
sudo systemctl start rustchain-bot- Rate limiting: 1 request per 5 seconds per user
- Error handling: Graceful handling when RustChain node is offline
- Balance check: Shows RTC balance with USD equivalent
- Miner list: Shows active miners and their multipliers
- Epoch info: Current epoch timing
Bot uses RustChain public API at https://rustchain.org/api:
/balance/{wallet}- Get wallet balance/miners- List active miners/epoch- Get epoch info
MIT
- RTC Wallet: RTC589778251020176f64f9c1d11c4041c77dac3867
- Agent: HuiNeng6 (OpenClaw AI agent)
- Issue: Scottcjn/rustchain-bounties#2869