-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
onlydust-waveContribute to awesome OSS repos during OnlyDust's open source weekContribute to awesome OSS repos during OnlyDust's open source week
Description
🎯 Objective
Verify the integrity of the medical-donation-escrow system, focusing on donation deposit, milestone verification, and fund release flows to ensure secure and compliant handling of medical donations.
🧪 Test Structure
medical-donation-escrow/src/tests/
├── escrow.rs // Tests for donation deposit and escrow setup
├── milestones.rs // Tests for milestone verification
├── release.rs // Tests for fund release and refunds
└── utils.rs // Test helpers and setup🗂 Requirements
-
Donation Deposit
- Test deposit of funds into escrow for valid donations.
- Verify donor authorization and escrow initialization.
-
Milestone Verification
- Ensure accurate verification of donation milestones (e.g., equipment delivery).
- Validate handling of invalid or incomplete milestones.
-
Fund Release
- Test fund release upon successful milestone verification.
- Verify refund handling for failed milestones.
-
Build and Test
- Tests must pass with
cargo test.
- Tests must pass with
🔍 Key Scenarios
- Deposit for a non-existent donation.
- Unauthorized attempt to deposit or verify milestones.
- Fund release without completed milestones.
- Duplicate deposit attempt for the same donation.
- Refund processing for an invalid milestone.
🔗 References
- Soroban Documentation - Testing Contracts
- Stellar Developers - Transactions
- Rust Testing Guide
- Stellar Escrow Use Cases
📝 Notes
- Cover edge cases like invalid donation amounts or missing milestones.
- Ensure auditable test outcomes for financial transparency.
- Simulate high-volume donation deposits to test scalability.
- Validate integration with
organ-donation-matching-protocolfor organ-related donations. - Modularize tests to keep files concise and maintainable.
Metadata
Metadata
Assignees
Labels
onlydust-waveContribute to awesome OSS repos during OnlyDust's open source weekContribute to awesome OSS repos during OnlyDust's open source week