Overview
This Python-based Telegram bot enables users to:
✅ Create new Ethereum wallets
✅ Import existing wallets via private keys
✅ Check ETH balances
✅ Send ETH to other addresses
Built with web3.py for blockchain interactions and pyTelegramBotAPI for Telegram functionality, this bot simplifies Ethereum wallet management directly within Telegram.
How It Works
Prerequisites
Telegram Bot Token:
- Create your bot via BotFather.
- Save the HTTP API token provided.
Blockchain API Key:
- Sign up on Infura (recommended) to obtain a free API key.
- Use the Goerli testnet endpoint for testing.
Setup Instructions
Install Required Libraries:
Run these commands in your terminal:pip install web3 pyTelegramBotAPIConfigure the Code:
Replace placeholders in
main.py:- Line 9: Insert your Telegram bot token.
- Lines 77 & 135: Add your Infura API key.
Deploy the Bot:
- Use PythonAnywhere (free tier) for 24/7 hosting.
- Upload
main.py, install dependencies via bash, and launch the bot.
👉 Need a reliable ETH wallet for mainnet?
Supported Commands
| Command | Description |
|-------------------|----------------------------------------------|
| /help | Lists all available commands. |
| /createWallet | Generates a new ETH wallet (public/private keys). Private keys are stored insecurely—use for testing only. |
| /importWallet | Restores a wallet using a private key (hex format). |
| /balance | Displays ETH balance for the active wallet. |
| /send | Sends ETH to another address; returns transaction hash. |
Security Notes
⚠️ Educational Use Only:
- This bot lacks production-grade security (e.g., private key encryption).
- Avoid using it on Ethereum mainnet.
🔒 For Secure Transactions:
👉 Explore trusted ETH wallet solutions
FAQs
Q1: Is this bot safe for mainnet use?
A: No. It stores private keys in plaintext—strictly for testnet demonstrations.
Q2: How do I get testnet ETH?
A: Use a Goerli faucet (e.g., Alchemy’s faucet).
Q3: Can I modify the bot for other blockchains?
A: Yes! web3.py supports EVM-compatible chains (e.g., BSC, Polygon).
Q4: Why PythonAnywhere?
A: Free, persistent hosting ideal for prototyping Telegram bots.
Q5: What’s the transaction fee?
A: Fees depend on network gas prices (paid in ETH by the sender).
Final Thoughts
This project illustrates basic blockchain interactions via Telegram. For advanced use cases:
- Implement private key encryption.
- Integrate hardware wallet support.
- Add multi-chain functionality.