feat(contracts): add auto-refund logic to donation-escrow (#634)#720
Merged
Idrhas merged 4 commits intoJun 30, 2026
Merged
Conversation
…t#634) Track per-donation milestone deadlines and let donors claim refunds when location verification is not submitted before the deadline expires.
|
@kingbitnation 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! 🚀 |
…m-credit#634) Reconcile HarvestaError codes after merging origin/main: keep shortened names, carbon marketplace (100-113), farmer/species slots (67-70), and add auto-refund codes MilestoneDeadlineNotPassed (82) and LocationAlreadyVerified (83).
Contributor
|
Fix merge conflict and dont forget to Offramp your USDC on https://fundable.finance when you receive your rewards |
…ith main Merge latest main conflict in contracts/harvesta-errors/src/lib.rs and align species/zk contract test panic codes to the updated enum values.
Contributor
Author
|
@Idrhas conflicts resolved kindly take a look |
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.
Summary
milestone_deadline,location_verified) when donors lock USDC/XLM into escrowverify_location(seq)for admin to confirm location verification proofs were submittedclaim_refund(donor, seq)so donors can reclaim locked funds after the deadline if verification never occurredharvesta-errorsenum and addMilestoneDeadlineNotPassed(Build Analytics Dashboard Widget #82) andLocationAlreadyVerified(Create Webhook Event Logs Viewer (Admin) #83)Test plan
cargo test --package donation-escrowdonate()setsmilestone_deadlineto now + configured window (default 90 days)claim_refundsucceeds only after deadline withlocation_verified == falseclaim_refundpanics before deadline (Build Analytics Dashboard Widget #82) and afterverify_location(Create Webhook Event Logs Viewer (Admin) #83)initialize()now acceptsmilestone_deadline_secs(pass0for default)Closes #634