How onekill0503/ethereum_gas_alert works
Project type and purpose
• This is a backend-focused Node.js microservice (a Telegram Bot) whose sole responsibility is to alert users when the Ethereum gas price meets a threshold.
• It has no separate “frontend,” but it integrates two external services: the Telegram Bot API and an Ethereum JSON-RPC provider.
File structure
Top-level files:
• .env.example – environment variables template (likely includes TELEGRAM_TOKEN, ETHEREUM_RPC_URL, GAS_THRESHOLD, etc.)
• Dockerfile – containerization of the bot
• index.js – application entry point or bootstrapper
• README.md – high-level description
• package.json – Node.js dependencies, scripts, metadata
• node_modules – installed packages
• database/alert.sqlite – persistent store for user subscriptions or last‐seen values
• backend/index.js – main bot logic (polling or webhook setup, gas-check scheduler, notification dispatch)
• backend/index.test.js – unit/integration tests for core functionality
README for additional insights
• The README confirms the core use case: monitor Ethereum gas price and send Telegram notifications when price ≤ user-specified threshold.