Repository navigation
Feat/issues 23 26 - #31
Merged
Merged
Conversation
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.
This PR implements four core enhancements to the aidline campaign and escrow workflows, focusing on emergency fast-tracking, cost observability, test reliability, and milestone-level due dates.
🚀 Features & Changes
Emergency Fast Track (Issue #23)
Added the emergency_fast_track capability exclusively for Emergency campaigns, allowing verified release of up to 20% of the campaign goal before milestone 0 approval.
Escrow math is safely enforced so the initial advance acts as a downpayment on milestone 0 without double-spending.
Resource Cost Observability (Issue #24)
Documented resource costs (CPU & Memory) within docs/ARCHITECTURE.md.
Added the test_measure_resource_costs harness into test.rs to allow maintainers to seamlessly regenerate cost data using Soroban's budget tracking.
Exact Event Assertions (Issue #25)
Enhanced test.rs to assert explicit, exact topics and data structures for all critical contract events (CampaignCreated, Donated, EmergencyAdvanceReleased, MilestoneReleased, CampaignCancelled, Refunded, and VerifierUpdated).
Per-Milestone Due Dates & Partial Refunds (Issue #26)
Introduced the ability to specify custom due dates per milestone (create_campaign_with_due_dates), safely stored in the MilestoneDueDates persistent data key without breaking existing campaigns.
Updated the refund mechanism to support idempotent, partial refunds for overdue milestones while keeping the campaign active. Refund math perfectly tracks the reduction in raised and released values, keeping proportional shares intact for remaining donors.
🔗 Linked Issues
Closes #23
Closes #24
Closes #25
Closes #26