feat: implement donation enhancements (#195, #196, #197, #198)#206
Merged
ayshadogo merged 1 commit intoMay 30, 2026
Merged
Conversation
…der#197, Dfunder#198) Dfunder#195 - raised_amount update and milestone unlock check: - After donation, raised_amount updated atomically - Loop over milestones: if raised_amount >= target_amount && Locked, set Unlocked - milestone_unlocked event emitted for each newly unlocked milestone - Multiple milestones can unlock in single donation - TotalRaised storage updated after each donation - DonorRecord updated/created with cumulative totals Dfunder#196 - get_donor_record view function: - fn get_donor_record(env, donor) -> Option<DonorRecord> - Returns None if address has never donated - Read-only, no auth required Dfunder#197 - get_total_raised view function: - fn get_total_raised(env) -> i128 - Returns current raised_amount from TotalRaised storage - No auth required, returns 0 if no donations yet Dfunder#198 - goal reached status transition: - After donation, if raised_amount >= goal_amount, set status = GoalReached - campaign_goal_reached event emitted - Does not prevent additional donations (GoalReached still accepts) - Checked after every donation, only transitions from Active
|
@Mkalbani 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! 🚀 |
ayshadogo
approved these changes
May 30, 2026
Contributor
ayshadogo
left a comment
There was a problem hiding this comment.
LGTM
Thank you for your contribution
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.
#195 - raised_amount update and milestone unlock check:
#196 - get_donor_record view function:
#197 - get_total_raised view function:
#198 - goal reached status transition:
closes #195
closes #196
closes #197
closes #198