Scroll Rank Bot

A Telegram bot that tracks and compares Layer 2 cryptocurrency prices, market data, and gas fees. The bot provides real-time information about various L2 solutions including Scroll, ZkSync, Starknet, Taiko, and Movement.

Features

  • 📊 Real-time cryptocurrency price tracking
  • ⛽ Gas price monitoring across different networks
  • 📈 Market statistics including:
    • Current price
    • 24h price changes
    • Trading volume
    • Market cap
    • Fully Diluted Valuation (FDV)
  • 🔄 Automatic data updates
  • 💬 Easy-to-use Telegram commands

Commands

  • /rank - Get current market data for $SCR and its competitors
  • /gas_price - Get current gas prices across scroll and its competitors' networks

Environment Variables

The following environment variables need to be set:

TELEGRAM_BOT_TOKEN=your_telegram_bot_token
OPENAI_API_KEY=your_openai_api_key

Setup

  1. Clone the repository
git clone https://github.com/yourusername/scroll-rank-bot.git
cd scroll-rank-bot
  1. Install dependencies
go mod download
  1. Set up environment variables
export TELEGRAM_BOT_TOKEN=your_telegram_bot_token
export OPENAI_API_KEY=your_openai_api_key
  1. Run the bot
go run main.go

Architecture

The bot is built with the following components:

  • Bot: Main bot structure handling Telegram interactions
  • CoinGecko Client: Fetches cryptocurrency market data
  • Gas Price Service: Monitors gas prices across different networks
  • OpenAI Client: Handles AI-powered interactions (currently configured to use Deepseek API)

Data Update Intervals

  • Cryptocurrency data: Updates every 5 minutes
  • Gas prices: Real-time fetching on request

Dependencies

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License