Ponder is an open-source TypeScript framework designed for indexing data from EVM-compatible blockchains. It provides tools to define a database schema, write indexing functions to process on-chain events, and then query the indexed data via automatically generated GraphQL or SQL APIs. The current stable version is 0.16.6, with frequent patch releases indicating active development. Ponder differentiates itself by offering a powerful local development server with hot reloading, end-to-end type safety, support for Postgres, and the ability to index data from multiple chains within a single application. It aims to provide a robust, performant alternative to traditional subgraph indexing solutions, optimized for application developers who require custom backend logic and greater control over their data infrastructure.
npm install ponderVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to set up a Ponder project, configure chains and contracts, define a database schema, and write an indexing function to process Ethereum events and persist them to a database.
Ensure your development environment meets the minimum requirements: Node.js >=18.14, TypeScript >=5.0.4. If using VSCode, explicitly select the workspace TypeScript version.
Always ensure peer dependencies are installed in your project. The `create-ponder` CLI usually handles this, but manual installation might require checking `package.json` for correct versions.
Ensure `ponder-env.d.ts` is present and committed, and your `tsconfig.json` is correctly configured to include Ponder's type declarations. Patch releases (e.g., 0.16.5) have addressed issues with `tsconfig.json` payload, indicating past problems.
Verify RPC URLs are correct for the specified `chain.id`. Use a reliable RPC provider or configure Viem fallback transports with multiple RPC URLs in `ponder.config.ts`.
Upgrade Node.js to version 18.14 or newer using a version manager like `nvm` or `volta`.
Ensure `ponder-env.d.ts` is present in your project root and accept any changes Ponder's dev server suggests. Verify `tsconfig.json` is correctly configured to include this file.
Double-check the RPC URL and `chain.id` in `ponder.config.ts`. Confirm the RPC endpoint is active and serves the correct network. Consider using a more robust RPC provider or a Viem fallback transport.
When importing or defining your ABI, ensure it is `as const`, for example: `import { BaseRegistrarAbi } from './abis/BaseRegistrar' as const;` or `const MyAbi = [...] as const;`.