Completed clean root directory structure: - Root now contains only: .git, .env, docs/, orig/ - Moved all remaining files and directories to orig/: - Config files (.claude, .dockerignore, .drone.yml, etc.) - All .env variants (except active .env) - Git config (.gitconfig, .github, .gitignore, etc.) - Tool configs (.golangci.yml, .revive.toml, etc.) - Documentation (*.md files, @prompts) - Build files (Dockerfiles, Makefile, go.mod, go.sum) - Docker compose files - All source directories (scripts, tests, tools, etc.) - Runtime directories (logs, monitoring, reports) - Dependency files (node_modules, lib, cache) - Special files (--delete) - Removed empty runtime directories (bin/, data/) V2 structure is now clean: - docs/planning/ - V2 planning documents - orig/ - Complete V1 codebase preserved - .env - Active environment config (not in git) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1.2 KiB
1.2 KiB
You are an expert in Ethereum transaction processing and MEV optimization. I'm building an MEV bot that needs to efficiently decode and analyze Uniswap V3 swap transactions.
I need help with:
- Decoding transaction calldata for Uniswap V3 swap functions
- Extracting token addresses and amounts from swap transactions
- Identifying the pool contract and fee tier from transaction data
- Calculating price impact of swaps using Uniswap V3 mathematics
- Detecting multi-hop swaps and complex routing patterns
- Efficiently processing large volumes of transactions
- Handling different versions of Uniswap contracts
- Working with Ethereum event logs for additional data
Please provide production-ready Go code that:
- Uses the go-ethereum library for transaction processing
- Implements efficient decoding of transaction data
- Handles errors gracefully
- Follows Go best practices
- Includes comprehensive comments explaining the decoding process
- Provides metrics for monitoring performance
The code should:
- Accurately decode Uniswap V3 swap transactions
- Extract all relevant data for MEV analysis
- Handle various edge cases and error conditions
- Process transactions with minimal latency
- Include benchmarks for critical functions