feat: Release fund logic for Campaign Milestone#19
feat: Release fund logic for Campaign Milestone#19anonfedora wants to merge 8 commits intoboundlessfi:developfrom
Conversation
|
GM ser @0xdevcollins. merge conflicts have been resolved |
|
GM @0xdevcollins |
|
reviewing now |
There was a problem hiding this comment.
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.
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.
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.
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! 🚀