Skip to content

Comments

Add Ethereum account monitoring tool#51

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/monitor-accounts
Draft

Add Ethereum account monitoring tool#51
Copilot wants to merge 3 commits intomasterfrom
copilot/monitor-accounts

Conversation

Copy link

Copilot AI commented Feb 16, 2026

Implements real-time monitoring for Ethereum accounts via Etherscan API, complementing existing Bitcoin P2P and mempool monitors.

Implementation

Core Monitor (monitor-accounts.js)

  • Continuous polling with configurable intervals (default: 60s, min: 10s)
  • Tracks ETH balance and last 5 ERC20 token transfers per address
  • Detects new transactions by comparing hash chains
  • Console UI with transaction direction indicators (⬇ IN / ⬆ OUT)
  • Multi-address support in single process

Testing (test-monitor-accounts.js)

  • 21 unit tests covering token formatting, Wei conversion, address validation
  • Demo script showing expected output format

Documentation

  • Complete usage guide with troubleshooting
  • Rate limit considerations for Etherscan API

Usage

# Single address
ETHERSCAN_API_KEY=key node contrib/devtools/monitor-accounts.js 0xAddress

# Multiple addresses, custom interval
POLL_INTERVAL=30 ETHERSCAN_API_KEY=key node contrib/devtools/monitor-accounts.js 0xAddr1 0xAddr2

Output Format

Address: 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0
  ETH Balance: 5.234567 ETH
  Status: 🔔 NEW TRANSACTION DETECTED!

  Recent Token Transfers:
  1. ⬇ IN  | 100.000000 USDT
     Block: 19123456 | 2026-02-16T05:40:00.000Z

Technical notes:

  • Zero external dependencies (uses Node.js built-ins only)
  • Etherscan API V2 for Ethereum mainnet (chain ID 1)
  • Promise-based async with proper timeout handling

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 16, 2026 05:45
Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
Copilot AI changed the title [WIP] Add account monitoring functionality Add Ethereum account monitoring tool Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants