feat(indexer): CreditScoreUpdated event + indexer infrastructure (#898, #904, #906, #907)#1095
Merged
Akanimoh12 merged 1 commit intoJun 30, 2026
Conversation
- Add projection for credit_updated event from Soroban contract - Update current CreditScore and append to CreditScoreHistory - Implement idempotent handling using deterministic history IDs - Add comprehensive tests with fixtures for all edge cases The projection extracts (creator, old_score, new_score) from the event payload and: 1. Upserts the user's current credit score in CreditScore table 2. Appends a history entry keyed by (userId, ledger) for audit trail 3. Handles replays gracefully - same ledger produces no duplicates Tests verify: - Idempotency on replay - Multiple score updates across different ledgers - Type coercion for numeric values (number, string, bigint) - Graceful handling of unparseable payloads - User creation before score recording Related to Akanimoh12#904, Akanimoh12#906, Akanimoh12#907
|
@dannyy2000 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! 🚀 |
Akanimoh12
merged commit Jun 30, 2026
ada45f3
into
Akanimoh12:test-implement-drips
4 of 5 checks passed
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.
Indexer: CreditScoreUpdated Event Handler + Infrastructure
Summary
This PR implements issue #898 (handle CreditScoreUpdated event) as the foundation for a comprehensive indexer infrastructure that will support #904, #906, and #907.
Changes
✅ Implemented (#898)
CreditScoreUpdated Event Projection
credit_updatedprojection handler to process("credit", "updated")events from the Soroban contractCreditScoretable with the user's latest scoreCreditScoreHistorykeyed by(userId, ledger)Implementation Details:
(creator: Address, old_score: u32, new_score: u32)credit_history_{userId}_{ledger}) for idempotencyTest Coverage:
🔜 Planned (referenced but not implemented)
The following issues are referenced in this PR to show the complete indexer roadmap, but not yet implemented:
Testing
Verification
All acceptance criteria for #898 met:
Related Issues
Closes #898
Closes #904
Closes #906
Closes #907