How cipher-rc5/anti-venom works
Main Components
a. CLI Interface
b. Configuration Manager
c. Transaction Fetcher
d. Address Labeler
e. Translator Service
f. Cache Manager
g. Output Formatter & Exporter
h. External Services: Dune Analytics API, Noves Translate API
i. File System Resources: .env, ~/.config/evm-fetcher/config.toml, address_book.csv, ~/.cache/anti-venom
Relationships & Data Flow
• CLI Interface parses arguments and invokes components in sequence.
• Configuration Manager loads environment variables (.env) and TOML config.
• Transaction Fetcher uses the Dune Analytics API (via SIM_API_KEY) to retrieve raw EVM transaction data.
• Address Labeler reads address_book.csv (or user-provided CSV) to annotate known addresses.
• Translator Service calls the Noves Translate API (NOVES_API_KEY) to obtain human-readable transaction descriptions.
• Cache Manager intercepts translation requests:
– Checks cache directory (~/.cache/anti-venom) first
– On cache miss, forwards request to Translator Service, then stores the result.
• Exporter writes formatted data to stdout or to user‐specified file.
Architectural Patterns
– Modular pipeline: each responsibility is a discrete “stage” in a linear workflow.
– Decorator‐style caching between the Translation stage and external API.
– Pluggable output via strategy pattern (different formatters).
– Environment‐driven configuration, supporting defaults and overrides.
Relevant Technologies & Frameworks
– Nushell script (anti-venom.nu) orchestrates all stages.
– Dune Analytics REST API
– Noves Translate REST API
– File system (CSV, TOML, ENV)
– Exponential backoff retry logic built into the script.