
🚀Sonic Blaza AI-Powered Telegram Agent

Sonic Blaza is an AI-powered Telegram agent built for the Sonic Chain, offering real-time blockchain insights and smart contract execution. It simplifies tasks like gas fee tracking, wallet balance checking, and transaction queries through intelligent, human-like AI responses. With MongoDB caching for optimized performance, it streamlines blockchain interactions directly within Telegram. Sonic Blaza enhances user accessibility and efficiency in managing blockchain data.
📌 Project Overview
The Sonic Blaza AI-Powered Telegram Agent is an advanced blockchain AI assistant designed to interact with the Sonic Chain. This agent offers real-time blockchain insights, executes smart contract queries, and leverages AI for intelligent, human-like responses directly within Telegram.
Key Features:
- Provides real-time blockchain data.
- Supports smart contract execution.
- Delivers AI-driven responses to crypto-related queries.
- Optimized performance using MongoDB caching.
Purpose & Impact
- Sonic Blaza aims to make blockchain data more accessible and intelligent by integrating AI into daily blockchain tasks. It simplifies complex tasks like gas fee tracking, wallet balance checking, and transaction queries, all while offering real-time data insights directly in Telegram. This project is paving the way for more user-friendly interactions with blockchain technology, reducing the reliance on multiple tools and enhancing the overall user experience.


Node.js :- Backend runtime for the AI Agent.
Telegraf.js :- Framework for Telegram AI agent development.
MongoDB :- Caching blockchain queries and optimizing performance.
Sonic Blaza :- Blockchain network for contract execution and data querying.
Smart Contracts (Sonic Chain) :- Fetching wallet balances, transactions, staking rewards, and token prices.
The Graph API :- Querying real-time blockchain data.
Alchemy API :- Fetching gas fees for transactions.
OpenAI API :- AI-generated responses for intelligent blockchain-related queries.
IPFS/Arweave :- Storing decentralized AI reports for transparent, accessible data.
dotenv :- Managing environment variables securely.
- Ask the AI about wallet balances, token transactions, staking rewards, gas fees, and general crypto/DeFi questions.
- Powered by OpenAI GPT-4 for intelligent responses.
- Top Wallet Holders: Fetch top 3 wallet holders of Sonic tokens.
- Staking Rewards: Query staking rewards for any wallet.
- Token Price: Tracks real-time Sonic token prices.
- Gas Fees: Retrieves current gas fees using the Alchemy API.
- Start the bot and view instructions.
- Query Examples:
- "What are the top 3 wallets holding Sonic tokens?"
- "What is my wallet address?"
- "What is the gas fee now?"
- "What is the Sonic token price?"
- General crypto-related questions, with AI responses powered by OpenAI.
- Frequently asked queries are cached for 24 hours to reduce API calls, improving performance and response time.
- Cached data includes wallet balances, staking rewards, and token prices.
IPFS/Arweave is used to store AI-generated reports, ensuring decentralized and transparent access to data.