A Telegram bot that monitors smart contract events on Mantle and sends real-time notifications.
Mantle Blockchain Event Notifications Bot
A Telegram bot that monitors smart contract events on the Mantle blockchain and sends real-time notifications to users.
Features
Easy Registration: Users can register contract addresses and select specific events to monitor
Real-time Monitoring: WebSocket-based monitoring via Alchemy for instant event detection
Automatic ABI Fetching: Fetches contract ABIs from Mantle explorer automatically
Event Decoding: Decodes event parameters and displays them in a formatted, readable way
Multi-user Support: MongoDB storage allows multiple users to subscribe to the same events
Duplicate Prevention: Prevents duplicate notifications using transaction hash and log index tracking
How It Works
Users send a contract address via /start command
Bot fetches the contract ABI from Mantle explorer and displays available events
User selects an event to monitor from an inline keyboard
Bot stores the subscription in MongoDB
Background task subscribes to blockchain logs via WebSocket
When the event is emitted, bot sends Telegram notifications with:
Decoded event parameters (indexed and non-indexed)
Block number
Transaction hash with link to Mantlescan
Formatted parameter values (addresses, amounts, etc.)
Tech Stack
Rust with Tokio async runtime
Teloxide for Telegram bot API
Alloy for Ethereum/Mantle blockchain interaction
MongoDB for subscription storage
Alchemy WebSocket for real-time log monitoring
This entire bot was built from scratch during the hackathon.
No funding