Skip to content

feat: add Po-Rep contracts indexer#241

Open
tmaciej-neti wants to merge 3 commits intomainfrom
feature/fil-1496-po-rep-contracts-indexer
Open

feat: add Po-Rep contracts indexer#241
tmaciej-neti wants to merge 3 commits intomainfrom
feature/fil-1496-po-rep-contracts-indexer

Conversation

@tmaciej-neti
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an on-chain Po-Rep contracts indexer to persist provider and deal state into the application database, and wires it into the NestJS app.

Changes:

  • Introduces a Po-Rep indexer module with cron-driven runner base class plus provider/deal runners that ingest viem logs.
  • Adds new Prisma models + migrations for indexer runs, storage providers, provider capabilities, deals, and deal requirements.
  • Adds Prisma BigInt update-merge helper and new Po-Rep environment variables.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/utils/prisma.ts Adds helper to merge Prisma BigInt field update operations.
src/po-rep-indexer/runners/abstract-po-rep-indexer.runner.ts Base cron runner: fetches logs, applies DB ops in a transaction, records indexing progress.
src/po-rep-indexer/runners/po-rep-providers-indexer.runner.ts Indexes SP registry events into provider + capabilities tables.
src/po-rep-indexer/runners/po-rep-deals-indexer.runner.ts Indexes PoRep market events into deal + requirements tables.
src/po-rep-indexer/po-rep-indexer.utils.ts Creates viem clients per chain and validates Po-Rep config via zod.
src/po-rep-indexer/po-rep-indexer.types.ts Declares Po-Rep-related types for config and viem public client.
src/po-rep-indexer/po-rep-indexer.module.ts Registers runners and provides recent/archive RPC clients via DI.
src/po-rep-indexer/po-rep-indexer.constants.ts Defines DI tokens, supported chains, and config schema.
src/po-rep-indexer/abis/*.abi.ts Adds typed ABI constants for the indexed contracts.
src/app.module.ts Wires the indexer module into the main application.
prisma/schema.prisma Adds Po-Rep tables and enum to the Prisma schema.
prisma/migrations/*/migration.sql Creates the new Po-Rep DB tables and enum.
.env.example Documents Po-Rep-related configuration keys.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/po-rep-indexer/runners/abstract-po-rep-indexer.runner.ts Outdated
Comment thread src/po-rep-indexer/runners/po-rep-deals-indexer.runner.ts Outdated
Comment thread src/po-rep-indexer/runners/abstract-po-rep-indexer.runner.ts
Comment thread src/po-rep-indexer/runners/po-rep-deals-indexer.runner.ts Outdated
Comment thread src/po-rep-indexer/runners/po-rep-providers-indexer.runner.ts Outdated
Comment thread src/po-rep-indexer/runners/po-rep-providers-indexer.runner.ts Outdated
Comment thread src/utils/prisma.ts
Comment thread src/po-rep-indexer/po-rep-indexer.types.ts Outdated
Comment thread src/po-rep-indexer/runners/abstract-po-rep-indexer.runner.ts
Comment thread src/po-rep-indexer/runners/abstract-po-rep-indexer.runner.ts Outdated
@tmaciej-neti tmaciej-neti deployed to production-fidl April 28, 2026 08:38 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants