Add onchain/script/backtesting/fetch-events.ts — a tsx script that: - Fetches Swap/Mint/Burn events from a Uniswap V3 pool via Infura (Base mainnet) - Batches eth_getLogs in 2 000-block chunks with 100 ms inter-batch delay - Decodes each log with viem and writes one JSON Line per event - Supports resume: reads last block from existing cache file on re-run - Retries with exponential back-off on 429 / rate-limit errors - Prints per-batch progress: "Fetching blocks X-Y... N events (B/T batches)" Also adds package.json, tsconfig.json, and cache/.gitkeep. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
52411e881a
commit
df89b8c2da
4 changed files with 330 additions and 0 deletions
0
onchain/script/backtesting/cache/.gitkeep
vendored
Normal file
0
onchain/script/backtesting/cache/.gitkeep
vendored
Normal file
Loading…
Add table
Add a link
Reference in a new issue