Skip to content

nushell script for fetching and analyzing EVM blockchain transactions with advanced features like transaction translations, address labeling, and intelligent caching

License

Notifications You must be signed in to change notification settings

cipher-rc5/anti-venom

Repository files navigation

Anti-Venom 🐍⚡

A powerful Nushell script for fetching and analyzing EVM blockchain transactions with advanced features like transaction translations, address labeling, and intelligent caching.

anti-venom_demo

Features

  • 🔍 Transaction Fetching: Query transactions for any EVM address across multiple chains
  • 🌐 Multi-Chain Support: Works with Ethereum, BSC, Polygon, and other EVM chains
  • 📝 Transaction Translations: Human-readable descriptions via Noves Translate API
  • 🏷️ Address Labeling: Identify known addresses (exchanges, contracts, etc.)
  • 💾 Smart Caching: Cache translations to reduce API calls
  • 🎨 Beautiful Output: Colorized terminal output with multiple format options
  • Retry Logic: Automatic retry with exponential backoff
  • 📊 Multiple Export Formats: Table, JSON, CSV, and compact views

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/anti-venom.git
cd anti-venom
  1. Make the script executable:
chmod +x anti-venom.nu
  1. Initialize the configuration:
./anti-venom.nu init
  1. Copy the example .env file and add your API keys:
cp .env.example .env
# Edit .env with your favorite editor

Configuration

Environment Variables (.env)

# Your default EVM address
EVM_ADDR=0xYourAddressHere

# Required API Keys
SIM_API_KEY=your-dune-api-key
NOVES_API_KEY=your-noves-api-key

Config File (~/.config/anti-venom/config.toml)

The config file supports various customization options:

evm_addr = "0xYourDefaultAddress"
default_limit = 25
cache_dir = "~/.cache/anti-venom"
address_book_path = "address_book.csv"
timestamp_format = "relative"           # Options: relative, unix, human
sort_by = "block_time"                  # Options: block_time, value, nonce
sort_order = "desc"                     # Options: asc, desc

Address Book (address_book.csv)

Label known addresses for better readability:

address,chain,label
0x742d35Cc6634C0532925a3b844Bc9e7595f5b9e1,eth,Binance Hot Wallet
0xBE0eB53F46cd790Cd13851d5EFf43D12404d33E8,eth,Binance Cold Wallet

Usage

Basic Usage

Fetch transactions for your default address:

./anti-venom.nu

Fetch transactions for a specific address:

./anti-venom.nu --address 0x742d35Cc6634C0532925a3b844Bc9e7595f5b9e1

Advanced Options

# Fetch with transaction translations
./anti-venom.nu --translate

# Use address labels from address book
./anti-venom.nu --labels

# Export to different formats
./anti-venom.nu --format json --export transactions.json
./anti-venom.nu --format csv --export transactions.csv

# Filter by chain
./anti-venom.nu --chain eth --limit 50

# Custom timestamp format
./anti-venom.nu --timestamp-format unix

# Sort by value in ascending order
./anti-venom.nu --sort-by value --sort-order asc

Commands

# Initialize configuration
./anti-venom.nu init

# Check configuration status
./anti-venom.nu --show-config

# Clear translation cache
./anti-venom.nu clear-cache

Output Formats

  • table (default): Rich terminal table with colors
  • json: JSON format for programmatic use
  • csv: CSV format for spreadsheet import
  • compact: Simplified table with essential fields

Examples

Analyze Recent High-Value Transactions

./anti-venom.nu --translate --sort-by value --sort-order desc --limit 100

Export Labeled Transactions for Specific Chain

./anti-venom.nu --chain eth --labels --format csv --export eth_transactions.csv

Monitor Address with Human-Readable Timestamps

./anti-venom.nu --address 0xA090e606E30bD747d4E6245a1517EbE430F0057e --timestamp-format human

Troubleshooting

API Key Issues

  • Ensure your API keys are correctly set in the .env file
  • Run ./anti-venom.nu --config to verify configuration status

Permission Errors

  • Make sure the script is executable: chmod +x anti-venom.nu
  • Check write permissions for cache directory

Rate Limiting

  • The script includes automatic retry logic with exponential backoff
  • Consider reducing --limit if experiencing consistent failures

author

@author: ℭ𝔦𝔭𝔥𝔢𝔯
gh: cipher-rc5
tg: cipher0091

License

MIT License - see LICENSE file for details

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Acknowledgments


Note: Never commit your .env file or expose your API keys. Always use .gitignore to exclude sensitive files.

About

nushell script for fetching and analyzing EVM blockchain transactions with advanced features like transaction translations, address labeling, and intelligent caching

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published