## Context `src/indexer.ts` only `console.log`s events. The DB is never updated, so API responses are stale. ## Acceptance criteria - On `request_created`: upsert a `PaymentRequest` row (`status='Open'`). - On `request_paid`: set that row's `status='Paid'` and store `payer`. - On `request_cancelled`: set `status='Cancelled'`. - Idempotent: re-processing the same ledger window does not duplicate rows. ## Technical notes - Parse event topics/payload per the contract's emitted shape (see contracts issue on structured events). - Key rows on `(contract, requestId)`. - Update `Cursor` after each successful window. ## Testing - Unit-test the mapping function with a fixture event object asserting the resulting DB write.
Activity