A sophisticated Telegram bot for managing cryptocurrency wallets and balances, supporting TON and TRC20 networks. Built with Python and aiogram framework.
- Secure wallet binding for TON and TRC20 networks
- Advanced address validation with regex patterns
- Multi-wallet support per user
- Automated wallet ownership verification
- Real-time USDT balance tracking
- Secure deposit and withdrawal system
- Transaction verification with blockchain APIs
- Support for both TON and TRON USDT transfers
- Robust transaction validation
- Secure state management
- Rate limiting and spam protection
- Automated verification processes
- Real-time logging system
- Interactive sticker animations
- CEX deposit support
- Multi-currency conversion
- Python 3.10 or higher
- SQLite3
- Telegram Bot Token
- TON/TRON API Keys
-
Clone the Repository
git clone <REPO_URL> cd <PROJECT_NAME>
-
Install Dependencies: Ensure Python 3.10+ is installed:
pip install -r requirements.txt
-
Configure Environment Variables: Define these in
.envor directly in the script:TOKEN: Telegram bot token.CHANNEL_ID,WITHDRAW_GROUP_ID,GROUP_CHAT_ID: Telegram group/channel IDs.ETH_WALLET,TRON_WALLET,TON_WALLET: Wallet addresses.API_TRON_KEY,API_TON_KEY: TRON and TON API keys.TON_USDT_KEY: API URL for TON/USDT exchange rate.
-
Initialize Database: Create the SQLite database with schema:
sqlite3 database.db < schema.sql -
Run the Bot:
python bot.py
-
Bind Wallet:
Example for TON wallet binding:/set_wallet TON <wallet_address> -
Check Balance:
/get_balance -
Deposit or Withdraw USDT:
Deposit:/deposit <amount>Withdraw:
/withdraw <amount>
database.py: Handles database interactions (wallets, balances).bot.py: Main bot logic.requirements.txt: Dependency list.