Skip to content

Conversation

@andrewlfc7
Copy link

Summary

This PR introduces new multi-chain monitoring features and improves signal reliability in the Eremos framework.

What's Changed

  • EthereumWatcher (Ξ)
    • New agent polling Ethereum L1 using ethers.js (HTTP RPC).
    • Emits high_block_activity when a block’s tx count exceeds threshold (default: 50).
  • SolanaWatcher (◎)
    • Updated to HTTP polling only (removes logsSubscribe dependency for broader RPC compatibility).
    • Emits high_activity_detected when transaction logs exceed threshold (default: 5).
  • Signal Validation
    • Added createSignal utility (utils/signal.ts).
    • Enforces required fields (type, hash, timestamp, source) to prevent malformed logs.
  • Agent Runner Selection
    • Updated run-agents.ts to support CLI arg selection:
      npm run dev sol   # run SolanaWatcher only
      npm run dev eth   # run EthereumWatcher only
      npm run dev       # run all agents

Configuration

Update your .env.local to include both Solana and Ethereum RPC URLs:

# Solana RPC endpoint (Helius, Triton, or public)
SOLANA_RPC_URL="https://api.mainnet-beta.solana.com"

# Ethereum RPC endpoint (Infura, Alchemy, QuickNode, etc.)
ETH_RPC_URL="https://mainnet.infura.io/v3/<PROJECT_ID>"

# Optional overrides
POLL_INTERVAL=10000          # how often to poll the chain (ms)
ACTIVITY_THRESHOLD=5         # threshold for logging/logCount or txCount

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.

1 participant