Project · Advanced · about 28 hours

A full dApp with an event indexer and API

Ship a complete application: contracts on a testnet, an indexer that turns events into a database, an API, and a React front end, with handling for reorganisations.

Skills:React, Smart contracts and Solidity, System design, TypeScript and JavaScript

Part of: Blockchain Developer

Brief

Reading data straight from a chain is slow for anything beyond a single value, so real dApps index events into a database. Build the whole stack around one of your earlier contracts (the NFT collection, escrow or staking contract). Use a local Anvil chain and, when you deploy publicly, a testnet such as Sepolia with free test ether from a faucet. Never use real funds or a wallet that holds any, and never paste a private key into code or a website.

What to build

  1. Deploy the contracts to Sepolia and verify their source

  2. Write an indexer in TypeScript or Rust that backfills events from the deployment block, follows new blocks, and records the block hash of each event

  3. Handle reorganisations: wait for a number of confirmations, or detect changed block hashes and roll back affected rows

  4. Build an API for the front end (for example holders, activity and totals) and a React app that combines it with wallet actions

  5. Document the architecture, failure modes (node outage, reorganisation, indexer crash) and the metrics you monitor

Deliverables

  • Repository with contracts/, indexer/, api/, app/ and docs/architecture.md

How it is graded

Reviewers restart the indexer mid-backfill, simulate a reorganisation on Anvil, and compare API data with the chain.

Stretch

Replace your indexer with a hosted subgraph or an open-source indexing framework and compare effort, cost and control.

Deliverables

  • Contracts deployed to a testnet with verified source
  • An indexer that reads events, stores them in PostgreSQL and handles chain reorganisations
  • A typed API over the indexed data and a React front end that uses it together with direct contract calls
  • An architecture document with failure modes and monitoring

How a reviewer grades it

CriterionWeightWhat good looks like
Indexer is correct under restarts and reorganisations30%
API and front end give users fast, accurate data25%
Architecture handles node failures and backfills25%
Deployment, monitoring and documentation20%