How yaasiinaxmed/solana-memecoin-tg-bot works
Project type and purpose
• This is a *Telegram Bot* whose core responsibility is to let users create Solana wallets and SPL tokens, check balances, and manage simple memecoin launches via Telegram.
File structure
• bot/main.py
– Entrypoint: initializes the Telegram bot, handles incoming updates, routes commands to handlers.
• utils/solana_utils.py
– Encapsulates Solana RPC interactions: wallet generation, balance queries, token creation with metadata.
• .env
– Holds configuration (Telegram Bot Token, Solana RPC endpoint URLs, network choice).
• README.md
– Summarizes features and high‐level behavior.
README for additional insights
• The README lists features but does not detail internal modules beyond “create wallets,” “check balances,” etc.
• No database is mentioned, suggesting ephemeral or on‐chain state only.
Main components & their interactions
a. Telegram Client (User’s mobile/desktop)
b. Telegram Bot API (cloud)
c. Bot Application (bot/main.py)
d. Solana Utilities Module (utils/solana_utils.py)
e. Solana RPC Endpoint (Devnet/Mainnet)
Interaction flow:
1. User → Telegram Client sends command
2. Telegram Client → Telegram API → Bot Application receives webhook or poll
3. Bot Application routes command → calls functions in solana_utils
4. solana_utils → Solana RPC endpoint (HTTP JSON RPC) to create wallet / mint token / query balance
5. Solana responds → solana_utils returns result
6. Bot Application formats reply → Telegram API → User
Architectural patterns & design principles
• *Separation of Concerns*: bot/main.py handles messaging & control flow; solana_utils.py encapsulates blockchain logic.
• *Stateless Service*: No persistent database—state lives on‐chain or in memory per request.
• *Modular Design*: Future features (e.g., logging, analytics) can be added as new utility modules.
Relevant technologies
• Python TeleBot or python-telegram-bot library
• Solana JSON RPC API
• .env for secret management
• Optional: Uvicorn/Flask if using webhook mode