-
Notifications
You must be signed in to change notification settings - Fork 7
feat: Release fund logic for Campaign Milestone #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
feat: Release fund logic for Campaign Milestone #19
Conversation
|
GM ser @0xdevcollins. merge conflicts have been resolved |
|
GM @0xdevcollins |
|
reviewing now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle the below @anonfedora
Also write test for your implementation
| soroban_sdk::contractimport!( | ||
| file = "../../target/wasm32-unknown-unknown/release/boundless.wasm" | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert this to "../../target/wasm32v1-none/release/boundless.wasm"); For Rust v1.84.0 or higher, you need wasm32v1-none target.
| soroban_sdk::contractimport!( | ||
| file = "../../target/wasm32-unknown-unknown/release/boundless.wasm" | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert this to "../../target/wasm32v1-none/release/boundless.wasm"); For Rust v1.84.0 or higher, you need wasm32v1-none target.
| soroban_sdk::contractimport!( | ||
| file = "../../target/wasm32-unknown-unknown/release/boundless.wasm" | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert this to "../../target/wasm32v1-none/release/boundless.wasm"); For Rust v1.84.0 or higher, you need wasm32v1-none target.
|
fixed |


Pull Request: Implement Release Funds Logic for Campaign Milestones
🎯 Overview
This PR implements the fund release logic for campaign milestones, enabling the platform to release funds when milestones are approved. This is a core feature of the milestone-based funding system that ensures transparent and controlled fund disbursement.
🔗 Related Issue
Closes #10
✨ Changes Made
Core Implementation
release_fundsfunction incontracts/boundless/src/logic/campaign.rsApprovedbefore releaseReleasedEvent System
FundsReleasedevent incontracts/boundless/src/datatypes.rscampaign_id,milestone_id,amount, andreleaseraddressValidation Logic
The implementation includes comprehensive validation:
CampaignNotFounderror)InvalidOperationerror)MilestoneNotFounderror)Approved→ Can be releasedReleased→ Already released (error)Rejected→ Cannot release (error)Pending→ Must be approved first (error)Test Updates
wasm32-unknown-unknown)EntityType,Milestone,MilestoneStatus)📝 Technical Details
State Management
Error Handling
Follows existing error patterns with clear, actionable errors:
BoundlessError::CampaignNotFoundBoundlessError::MilestoneNotFoundBoundlessError::InvalidOperation✅ Acceptance Criteria Met
release_fundsfunction retrieves and validates campaign and milestoneReleasedFundsReleasedevent emitted with complete details🧪 Testing Notes
The implementation maintains compatibility with the existing test suite and updates necessary test configurations for proper WASM compilation paths.
🔍 Code Quality
Ready for review! 🚀