Skip to content

Lightweight indexer for CCA auctions using Ponder

Notifications You must be signed in to change notification settings

Huddle01/cca-indexer

 
 

Repository files navigation

Continuous Clearing Auction Indexer

special thanks to the Aztec team (@saleel) for building out the indexing logic

A Ponder-based indexer for tracking Continuous Clearing Auction events on Ethereum mainnet.

Disclaimer: This indexer is not production-ready and is intended for development and testing purposes only.

Prerequisites

  • Node.js >= 18.14
  • npm or yarn

Installation

npm install

Configuration

Create a .env file in the root directory with the following variables:

RPC_URL={your_ethereum_rpc_url}
AUCTION_CONTRACT_ADDRESS={0x_auction_contract_address}
START_BLOCK={deployment_block_number}

Environment Variables

  • RPC_URL: Ethereum mainnet RPC endpoint (e.g., from Infura, Alchemy, or your own node)
  • AUCTION_CONTRACT_ADDRESS: The address of the auction contract to index
  • START_BLOCK: The block number to start indexing from (use the deployment block of the auction to index)

Running the CCA Indexer

Development Mode

Start the indexer in development mode with hot reloading:

npm run dev

Production Mode

Start the indexer in production mode:

npm run start

Database Management

Manage the Ponder database:

npm run db

Code Generation

Generate TypeScript types from your schema:

npm run codegen

GraphQL API

Once the indexer is running, you can access the GraphQL API at:

http://localhost:42069/graphql

The GraphQL playground provides an interactive interface to explore the schema and query auction data

Additional Commands

  • npm run lint - Run ESLint
  • npm run format - Format code with Prettier
  • npm run typecheck - Run TypeScript type checking

Resources

Future work

PRs welcome!

  • Separate out the fill math from core indexer logic into a separate file
  • Improve performance of the indexer

About

Lightweight indexer for CCA auctions using Ponder

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%