- Introduction
- Ethereum Network & Wallet Generation
- Overview of the Bot’s Functionality
- Workflow & Architecture
- Detailed Script Workflow
- Command-Line Options & Telegram Commands
- Error Handling, Scalability & Advanced Features
- Credits, Community, and Donations
- Contact & Support
The Ethereum Blockchain Scanner Bot is a high-end, asynchronous Python application designed to monitor the Ethereum blockchain in real time. It extracts block data, processes transaction details, and communicates updates through Telegram. This documentation explains its inner workings, workflow, and key features, along with giving credit to the brilliant coders behind it.
Ethereum Network Overview:
Ethereum is a decentralized platform that enables smart contracts and decentralized applications (DApps) to run without downtime, fraud, or interference. Transactions on Ethereum are recorded on a public ledger known as the blockchain.
Wallet Generation Process:
Creating an Ethereum wallet involves three major steps:
- Private Key Generation: A cryptographically secure random number is generated. This private key is confidential and must remain secret.
- Public Key Derivation: Using elliptic curve cryptography (specifically, the secp256k1 curve), the private key is mathematically transformed into a public key.
- Address Creation: The public key is hashed using Keccak-256, and a segment of this hash is used to form the wallet address. This address is public and used for receiving funds.
Understanding these steps is critical, as they ensure the uniqueness, security, and integrity of wallet addresses and transactions on the Ethereum network.
The bot script performs the following core functions:
- Blockchain Monitoring: Constantly polls Ethereum RPC endpoints to detect new blocks.
- Data Extraction: Retrieves full block details, including transaction lists, addresses involved, and specific transaction details.
- Data Logging: Logs block data to multiple text files (addresses, whale movements, transaction details).
- Telegram Integration: Uses the Telegram Bot API (via the aiogram library) to send updates to users. It supports commands such as
/start,/database,/whales,/custum,/stop,/donate, and/admin. - File Transmission Control: Offers command-line flags (
-sendvs.-nosend) to control whether files are sent along with text updates or only textual information is provided (especially important because of Ethereum’s high transaction speed).
Below is a text-based flowchart summarizing the bot’s workflow:
+--------------------------+
| Ethereum Network |
+--------------------------+
│
▼
+---------------------------+
| Multiple RPC Endpoints |
| (Ankr, Cloudflare, etc.) |
+---------------------------+
│
▼
+---------------------------+
| Block Number Fetcher |
+---------------------------+
│
▼
+---------------------------+
| Block Data Retriever |
| (Transactions, Data) |
+---------------------------+
│
▼
+------------------------------+
| Data Processing & Logging |
| - Balance, Tx Count |
| - Whale Detection |
| - File Generation |
+------------------------------+
│
▼
+------------------------------+
| Telegram Bot Integration |
| (Broadcast updates, files) |
+------------------------------+
Additional Control:
Command-line options determine if the bot sends the block file or only a text update. This flexibility ensures that even under Ethereum’s fast-paced environment, updates remain timely and resource-efficient.
-
Blockchain Monitoring:
- The bot uses asynchronous loops (via
asyncio) to poll multiple RPC endpoints. - It retrieves the latest block number using the
eth_blockNumberRPC call. - If a new block is detected, the bot initiates a detailed data fetch for that block.
- The bot uses asynchronous loops (via
-
Block Processing:
- The bot extracts all unique addresses from the block’s transactions.
- For each address, it fetches the balance (
eth_getBalance) and the transaction count (eth_getTransactionCount). - Special handling is applied to detect “whale” addresses (holding >10 Ether), and these are logged separately.
-
Transaction Details:
- Each transaction’s detailed data (sender, receiver, value, gas, gas used, confirmations) is fetched and saved.
- A dedicated file is created for transaction details for each block (using a
_tx.txtsuffix).
-
File Generation & Management:
- The script generates text files for each block’s data and aggregates logs into central files like
addresses.txtandWHALESMOVED.txt. - Depending on the command-line flag, files may either be sent to users or omitted in favor of a text-only update.
- The script generates text files for each block’s data and aggregates logs into central files like
-
Telegram Bot Integration:
- Using the aiogram library, the bot listens for Telegram commands.
- Commands include:
- /start: Registers the user.
- /database & /whales: Provide data files (for premium users).
- /custum: Allows custom block requests with rate-limiting.
- /stop: Manages user subscription for updates.
- /donate: Shares donation wallet addresses.
- /admin: Provides access to administrative logs.
- The bot then broadcasts block updates. When in
-nosendmode, it sends only text notifications; when in-sendmode, it sends the processed block file.
-
Command-Line Options:
-B <block_number>: Start scanning from a specific block.-sendvs.-nosend: Controls whether file attachments (block files) are sent or not. This option helps manage resource usage given Ethereum’s rapid block generation.
-
Error Handling & Robustness:
- The script uses try/except blocks to gracefully handle RPC call failures.
- Multiple RPC endpoints are used as fallbacks to ensure high availability.
- File sending functions include retry mechanisms to manage transient failures.
- -B: Start scanning from a designated block number.
- -send: (Default mode) Send block files along with Telegram updates.
- -nosend: Only send text updates (block process messages) without file attachments.
- /start: Initiates bot interaction and registers users.
- /database: Sends the database file (
addresses.txt) for premium users. - /whales: Provides data on whale movements.
- /custum [block_number]: Allows users to request processing of a specific block.
- /stop: Offers a confirmation to stop receiving notifications.
- /donate: Displays donation addresses.
- /admin: Grants admins access to various log files.
-
Robust Asynchronous Calls:
The use ofasyncioandaiohttpensures that RPC calls and file operations do not block the main execution thread, allowing simultaneous processing of multiple tasks. -
Fallback Mechanisms:
Multiple RPC endpoints serve as fallbacks if one or more fail, ensuring continuous monitoring despite network fluctuations. -
Dynamic File Management:
Based on the speed of the Ethereum network, the script dynamically chooses whether to send full files or only text updates, thereby maintaining performance. -
Rate Limiting & User Tracking:
The bot logs user interactions and implements rate limiting for custom block requests, protecting against abuse. -
Admin Controls & Logging:
Special commands and file logs allow admins to monitor the bot’s performance and user interactions, facilitating maintenance and further development.
Credits to the Coders:
Join Our Channels:
Remember: #DOORS are always open for DONATIONS. Your support helps us continuously improve our service.
For any questions, clarifications, or support, please reach out to us using the following contacts:
- CLOUDHUNTERS: @code_Crusaders0
- KEYFOUND: @privatekeydirectorygroup
- Trading with Bots: Join Here
- GitHub Repository: Shubsaini08
Donations & Direct Contact:
- Email: keyfoundhunt4ever@gmail.com
- Telegram DM: @Shub_saini08
Below is an ASCII flowchart summarizing the complete workflow:
+-----------------------+
| Ethereum Network |
+-----------+-----------+
│
▼
+-----------------------+ +------------------------+
| RPC Endpoints (Multi) | <--> | Fallback Mechanism |
+-----------+-----------+ +------------------------+
│
▼
+-----------------------+
| Block Number Fetcher |
+-----------+-----------+
│
▼
+-----------------------+
| Block Data Retriever |
+-----------+-----------+
│
▼
+-------------------------------+
| Data Extraction & Processing |
| - Unique Address Extraction |
| - Balance & Tx Count Fetching |
| - Whale Detection |
+-----------+-----------+-------+
│ │
▼ ▼
+-------------------+ +-----------------------+
| File Generation | | Telegram Integration |
| (tx files, logs) | | (Updates & Commands) |
+-------------------+ +-----------------------+
│
▼
+-----------------------------+
| File Sending Mode? |
| - -send: Send Files |
| - -nosend: Text Updates Only|
+-----------------------------+
This documentation provides a deep dive into the workings of the Ethereum Blockchain Scanner Bot, its asynchronous architecture, and its integration with Telegram. We have designed the bot to be robust and flexible while adapting to the rapid pace of the Ethereum network. The comprehensive logging, dynamic file management, and extensive user command suite make it a powerful tool for real-time blockchain monitoring.
We hope this detailed explanation and accompanying workflow diagrams help you fully understand the bot’s functionality and architecture. Thank you for your support, and remember—the doors are always open for donations!
Have a wonderful day, stay blessed, and happy scanning!
BYE!!
End of Documentation