API reference


The easiest way to get started with Ponder is create-ponder. This CLI tool creates a new Ponder project with package.json, ponder.config.ts, ponder.schema.ts, ABIs, and other project files set up for you.

pnpm create ponder {...options}


  $ create-ponder <directory> [options]
  -t, --template [id]        Use a template
  --etherscan [url]          Use the Etherscan template with the specified contract URL
  --subgraph [id]            Use the subgraph template with the specified subgraph ID
  --npm                      Use npm as your package manager
  --pnpm                     Use pnpm as your package manager
  --yarn                     Use yarn as your package manager
  --skip-git                 Skip initializing a git repository
  --etherscan-api-key [key]  Etherscan API key for Etherscan template
  -h, --help                 Display this message
  -v, --version              Display version number


Templates help get you started faster by copying contract addresses, ABIs, and deployment blocks from an existing source.

Etherscan contract link

The --etherscan [url] option creates a project using the address, ABI, and deployment block number of a contract on a block explorer. Enter the full URL, not just the contract address.

Chain support

The template uses the viem/chains list of block explorer URLs to determine the chain ID and fetch the contract ABI. Please reference the viem/chains definitions to see if your block explorer is supported. If you'd like to use an unsupported block explorer, please open a PR there to add it.

Etherscan contract link screenshot

Subgraph ID

The --subgraph [id] option creates a project from an existing subgraph by fetching the addresses, ABIs, and start blocks for each event source defined in subgraph.yaml.

To find the subgraph ID, go to the subgraph's page on the hosted service or Graph Explorer.

Subgraph ID screenshot

Example projects

The -t, --template [id] option creates a new project from one of the example projects. For example, this command creates a project using the feature-factory example project.

pnpm create ponder --template feature-factory

Here are the available projects:

NameTemplate IDLink
Factory contractfeature-factoryGitHub
Custom event filterfeature-filterGitHub
Multiple chainsfeature-multichainGitHub
Proxy contractfeature-proxyGitHub
Contract callsfeature-read-contractGitHub
Friendtech projectproject-friendtechGitHub
Uniswap V3 flash loansproject-uniswap-v3-flashGitHub
Basic ERC20 tokenreference-erc20GitHub
Basic ERC721 tokenreference-erc721GitHub