Skip to content

profmcc/portals

Repository files navigation

Portals Affiliate Fee Tracker

A comprehensive tool for tracking ShapeShift DAO affiliate fees from Portals Protocol bridge transactions across multiple EVM chains.

🚀 Features

  • Multi-Chain Support: Ethereum, Polygon, Optimism, Arbitrum, Base
  • Real-Time Monitoring: Live transaction scanning and affiliate fee detection
  • CSV Data Storage: Efficient CSV-based data management
  • Affiliate Fee Tracking: Automatic detection of ShapeShift partnership transactions
  • Block Tracking: Smart block range management to avoid reprocessing

🔧 Quick Start

# Install dependencies
./install.sh

# Run the listener
python run_portals.py

# Quick test
./portals

📊 What It Tracks

  • Portals Router: 0xbf5A7F3629fB325E2a8453D595AB103465F75E62
  • ShapeShift Treasury: 0x90A48D5CF7343B08dA12E067680B4C6dbfE551Be
  • Portal Events: Cross-chain bridge transactions with affiliate partnerships
  • Affiliate Fees: Token transfers to ShapeShift DAO

🎯 Key Components

  • portals_listener.py - Core listener with CSVPortalsListener class
  • run_portals.py - Interactive launcher
  • csv_data/ - Data storage directory
  • Analysis scripts for transaction investigation

📈 Data Output

  • Transactions CSV: All detected Portals transactions
  • Block Tracker: Processed block ranges
  • Affiliate Events: ShapeShift partnership transactions

🔍 Example Usage

from portals_listener import CSVPortalsListener

# Initialize listener
listener = CSVPortalsListener()

# Scan for events
events = listener.fetch_portals_events("ethereum", 23217750, 23217760)

# Process transactions
listener.process_transactions("ethereum", 23217750, 23217760)

📝 Requirements

  • Python 3.8+
  • Web3.py
  • eth-abi
  • python-dotenv
  • Alchemy API key

🚨 Important Notes

  • Requires valid Alchemy API key in .env file
  • Processes transactions in chunks to avoid RPC rate limits
  • Tracks last processed block to avoid reprocessing
  • CSV-based storage for simplicity and portability

📄 License

MIT License - See LICENSE file for details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors