Skip to content

Initialize Prisma Schema for the Fastify Indexer #38

@AlAfiz

Description

@AlAfiz

Description

The backend needs its relational schema defined so it can properly index the events emitted by the Soroban payout registry.

Acceptance Criteria

  • Initialize Prisma in packages/backend (npx prisma init).
  • Define Organization model (id, adminAddress, name, totalBudget).
  • Define Maintainer model (address, totalEarned).
  • Define PayoutEvent model (txHash, orgId, maintainerAddress, amount, type: 'ALLOCATED' | 'CLAIMED', timestamp).
  • Generate the Prisma client and run the initial migration.

Technical Details

  • Map the totalBudget and amount fields to Strings or BigInts in Postgres to prevent JavaScript from rounding large Stroop values.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions