📌 Description
COVERAGE_ANALYSIS.md reports 92.16% line coverage with the event-publish lines
in release_funds showing as uncovered, and the integration suite in
tests/lifecycle.rs only loosely asserts the escrow balance movement. We need
explicit balance-delta assertions proving that on release_funds the
contract address is debited and success_destination is credited by exactly
vault.amount.
Goal: add focused tests asserting the exact USDC balance changes of the
contract, creator, and success_destination across every release_funds path.
🎯 Requirements and Context
- Must be deterministic and isolated.
- Cover both release triggers: validated-before-deadline and deadline-reached.
- Assert pre/post balances on the contract address and
success_destination.
- Confirm the
funds_released event is emitted with the correct amount via
env.events().
🛠️ Suggested Execution
1. Fork the repo and create a branch
git checkout -b feature/release-funds-balance-tests
2. Implement changes
- Tests: extend
tests/lifecycle.rs with balance-delta assertions using
TokenClient::balance before/after release_funds.
- Assert the
funds_released event with env.events().all().
- Docs: update
TESTING_GUIDE.md and COVERAGE_ANALYSIS.md with the new cases.
- Add comments explaining each balance assertion.
3. Test and commit
- Run
cargo test and regenerate coverage with the tarpaulin.toml config.
- Cover edge cases: validated release, deadline release, contract balance reaches
zero post-release, double-release rejection leaves balances unchanged.
Example commit message
test: explicit balance-flow coverage for release_funds in lifecycle suite
✅ Guidelines
- Minimum 95% test coverage on
release_funds lines.
- Clear documentation of the new cases in
TESTING_GUIDE.md.
- All tests deterministic and passing.
- Timeframe: 96 hours.
🏷️ Labels
type-testing · area-contracts · MAYBE REWARDED · GRANTFOX OSS ·
OFFICIAL CAMPAIGN
💬 Community & Support
- Join the Disciplr contributor Discord to coordinate, ask questions, and get
unblocked fast: https://discord.gg/xvNAvMJf
- Please introduce yourself before you start so we can avoid duplicate work,
pair you with a reviewer, and merge your PR quickly.
📌 Description
COVERAGE_ANALYSIS.mdreports 92.16% line coverage with the event-publish linesin
release_fundsshowing as uncovered, and the integration suite intests/lifecycle.rsonly loosely asserts the escrow balance movement. We needexplicit balance-delta assertions proving that on
release_fundsthecontract address is debited and
success_destinationis credited by exactlyvault.amount.🎯 Requirements and Context
success_destination.funds_releasedevent is emitted with the correct amount viaenv.events().🛠️ Suggested Execution
1. Fork the repo and create a branch
2. Implement changes
tests/lifecycle.rswith balance-delta assertions usingTokenClient::balancebefore/afterrelease_funds.funds_releasedevent withenv.events().all().TESTING_GUIDE.mdandCOVERAGE_ANALYSIS.mdwith the new cases.3. Test and commit
cargo testand regenerate coverage with thetarpaulin.tomlconfig.zero post-release, double-release rejection leaves balances unchanged.
Example commit message
✅ Guidelines
release_fundslines.TESTING_GUIDE.md.🏷️ Labels
type-testing·area-contracts·MAYBE REWARDED·GRANTFOX OSS·OFFICIAL CAMPAIGN💬 Community & Support
unblocked fast: https://discord.gg/xvNAvMJf
pair you with a reviewer, and merge your PR quickly.