Repository navigation
feat(indexer): add treasury, early incentive, verification and health score APIs - #1199
Merged
Chucks1093 merged 1 commit intoOct 21, 2026
Conversation
… 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
|
@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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1178
Closes #1179
Closes #1180
Closes #1181
Summary
FeeReceived/FundsAllocated; admin-onlyGET /admin/treasury,/allocations,/inflows. Balances change only when an event row is newly inserted, so replays are no-ops.EarlySlotFilled;GET /invoices/:invoice_id/early-incentive.VerificationGranted/VerificationRevoked;GET /issuers/:wallet/verificationandGET /issuers/verified.GET /investors/:wallet/health-scorereadsget_health_score(5 min cache, invalidated onHealthScoreUpdated). Requires the newPORTFOLIO_HEALTH_CONTRACT_ID; returns 503 when unset.Notes for review
get_health_scorereturn 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_breakdownis gross inflow per source.20261021120000_add_treasury_early_incentive_verificationwas written by hand. Runpnpm exec prisma generatebefore type-checking.