Repository navigation
feat: index ReferralRewardPaid events and referral stats model - #724
Open
Holarconcept wants to merge 2 commits into
Open
Holarconcept wants to merge 2 commits into
Holarconcept wants to merge 2 commits into
Conversation
Contributor
✅ PR Ready for ReviewDue to a recent malware incident affecting our repositories, all PRs are required to pass automated security checks before being reviewed for merging. This PR has passed all automated checks:
A maintainer will review and merge this PR shortly. |
Author
Contributor
✅ PR Ready for ReviewDue to a recent malware incident affecting our repositories, all PRs are required to pass automated security checks before being reviewed for merging. This PR has passed all automated checks:
A maintainer will review and merge this PR shortly. |
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.
Overview
This PR adds the event indexing layer for referral rewards:
ReferralRewardPaidcontract events are processed into areferral_earningstable, and the referral data model is extended to support the stats and earnings queries required by the referral REST API.Related Issue
Closes #[issue-number]
Changes
🔗 Event Indexing
src/services/stellar/event-indexer.service.tsReferralRewardPaidcontract events.referral_earningstable with referrer wallet, referred wallet, amount, and ledger timestamp.🗂️ Data Model
src/models/Referral.model.tsVerification Results
No automated tests were added in this PR. Indexing completeness, stats accuracy, pagination, and date filtering are to be verified against a testnet event replay before merge.
ReferralRewardPaidevents indexed with no gapsCloses #662