Escrow Contract Enhancements#677
Conversation
|
@ahmadogo Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Escrow hardening is always appreciated @ahmadogo — landed! |
|
@ahmadogo just a heads-up — the recent batch of merges that landed ahead of yours touched some shared surface this PR also lives in (errors/traits around escrow), so this one is now reporting a conflict. The escrow error-model + types work here looks good to me; would you mind rebasing onto current main and pushing it again? I will pick it up as soon as it is clean. 🙏 |
|
Escrow enhancements are focused and the access-control trait tweak looks intentional. Cargo.lock refresh is fine. Merging. ✅ |
|
🟡 Holding for author coordination. This PR and #698 both modify the same files in escrow ( |
This PR introduces two major enhancements to the escrow contract: a governance-controlled pause/unpause mechanism and an automatic refund feature for expired escrows.
closes #566
To provide administrators with better control over the contract's lifecycle, we've introduced a pausable state.
closes fix(escrow): Refund expired escrows when no dispute was opened #567
Changes:
New ESCROW_ADMIN Role: A new ESCROW_ADMIN role has been added to access_control.rs to manage the contract's pausable state.
closes test(escrow): Add fuzz tests for dispute-evidence edge cases #568
Pause and Unpause Functions: Only accounts with the ESCROW_ADMIN role can call the new pause() and unpause() functions.
State Guard: The create_escrow_advanced, dispute, and release_funds functions are now protected by a when_not_paused guard, preventing them from being executed when the contract is paused.
closes feat(escrow): Emit structured events for milestone-state transitions #569
Events: Paused and Unpaused events are now emitted to allow for off-chain monitoring of the contract's state.