Skip to content

Feature/contracts 35 escrow closure finalization#137

Merged
mikewheeleer merged 32 commits intoTalenttrust:mainfrom
gloskull:feature/contracts-35-escrow-closure-finalization
Apr 1, 2026
Merged

Feature/contracts 35 escrow closure finalization#137
mikewheeleer merged 32 commits intoTalenttrust:mainfrom
gloskull:feature/contracts-35-escrow-closure-finalization

Conversation

@gloskull
Copy link
Copy Markdown
Contributor

PR: feat/contracts-35-escrow-closure-finalization

Summary

Implements Escrow contract closure finalization with immutable close records and summary metadata.

What changed

  • contracts/escrow/src/lib.rs

    • EscrowContract now includes:
      • finalized_at: Option<u64>
      • finalized_by: Option<Address>
      • close_summary: Option<Symbol>
    • Added finalize_contract method with:
      • status precondition (Completed | Disputed)
      • one-time finalization guard (immutable once performed)
      • participant authorization guard (client/freelancer/arbiter)
    • Added read helpers:
      • is_finalized
      • get_close_summary
      • get_finalizer
  • contracts/escrow/src/test.rs

    • Added tests:
      • test_finalize_contract_success_and_immutable
      • test_finalize_contract_already_finalized
      • test_finalize_contract_not_ready
      • test_finalize_contract_unauthorized
  • README.md and docs/escrow/status-transition-guardrails.md

    • Documented finalization workflow and guardrails

Security notes

  • Finalization allowed only after final applicant status; prevents premature closure.
  • Finalization is immutable after the first call.
  • Caller must be a known contract participant.

Proof of successful build/tests

Screenshot from 2026-03-25 06-17-36

Closes #85

gloskull added 28 commits March 25, 2026 05:14
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 25, 2026

@gloskull 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! 🚀

Learn more about application limits

@mikewheeleer
Copy link
Copy Markdown
Contributor

@gloskull please resolve the conflicts

@gloskull
Copy link
Copy Markdown
Contributor Author

@mikewheeleer please merge

@gloskull
Copy link
Copy Markdown
Contributor Author

gloskull commented Mar 30, 2026

@mikewheeleer please merge

1 similar comment
@gloskull
Copy link
Copy Markdown
Contributor Author

gloskull commented Mar 30, 2026

@mikewheeleer please merge

@mikewheeleer mikewheeleer merged commit 8d3f743 into Talenttrust:main Apr 1, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Mike] 35. Escrow closure finalization

2 participants