This repository is a template for a Ponder project that indexes Uniswap V3 on Ethereum and Base.
- Install dependencies
pnpm install- Add environment variables (RPC endpoints)
Create a file named .env.local and add an RPC endpoint for Ethereum and Base.
PONDER_RPC_URL_1=
PONDER_RPC_URL_8453=- Start the dev server
pnpm devThe ponder.config.ts file registers two contracts:
UniswapV3Pool- Uses a factory address configuration to index Swap events emitted by any Uniswap V3 pool, starting from the latest block.UniswapV3Factory- IndexesPoolCreatedevents emitted by the factory contract and runs pool initialization logic, starting from the factory deployment block number.