Skip to content

feat(indexer): add treasury, early incentive, verification and health score APIs - #1199

Merged
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
damola-sketch:feature/treasury-incentive-verification-health-api
Oct 21, 2026
Merged

Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
damola-sketch:feature/treasury-incentive-verification-health-api

Conversation

@damola-sketch

Copy link
Copy Markdown
Contributor

Closes #1178
Closes #1179
Closes #1180
Closes #1181

Summary

Notes for review

  • Event payload field names and the get_health_score return shape are assumptions; the contract events are not in this repo. Please check them against the contract ABI.
  • total_balance = gross inflows minus allocations; per_source_breakdown is gross inflow per source.
  • Migration 20261021120000_add_treasury_early_incentive_verification was written by hand. Run pnpm exec prisma generate before type-checking.
  • Unit tests only; integration tests for the new endpoints are not included yet.

… score APIs

- Treasury balance and allocation REST API for the admin dashboard, indexing FeeReceived and FundsAllocated (GET /admin/treasury, /allocations, /inflows). Balances move only on newly inserted events, so replays are no-ops.
- Invoice early funding incentive status from EarlySlotFilled events (GET /invoices/:invoice_id/early-incentive).
- Issuer verification badge status from VerificationGranted and VerificationRevoked (GET /issuers/:wallet/verification, GET /issuers/verified).
- Investor portfolio health score read from get_health_score with a 5 minute cache, invalidated on HealthScoreUpdated (GET /investors/:wallet/health-score). Requires PORTFOLIO_HEALTH_CONTRACT_ID.

Closes accesslayerorg#1178
Closes accesslayerorg#1179
Closes accesslayerorg#1180
Closes accesslayerorg#1181
@drips-wave

drips-wave Bot commented Oct 21, 2026

Copy link
Copy Markdown

@damola-sketch Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Chucks1093
Chucks1093 merged commit 771e947 into accesslayerorg:main Oct 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants