Skip to content

feat: implement escrow state machine#925

Merged
yahia008 merged 1 commit into
StellarCheckMate:mainfrom
henrypeters:feature/issue-742-implement-escrow-state-machine
Jun 27, 2026
Merged

feat: implement escrow state machine#925
yahia008 merged 1 commit into
StellarCheckMate:mainfrom
henrypeters:feature/issue-742-implement-escrow-state-machine

Conversation

@henrypeters

Copy link
Copy Markdown
Contributor

Added docs/match-lifecycle.md with a complete visual and reference guide for the escrow contract's match state machine, grounded in the actual contract source (contracts/escrow/src/lib.rs).

What's included:

  • ASCII state machine diagram showing all transitions: Pending → Active → Completed and Pending → Cancelled (via cancel_match and expire_match)
  • Mermaid diagram for rendered GitHub/docs previews
  • Per-transition guard tables listing every authorization check, precondition, and the exact error code returned on violation
  • Error path recovery table mapping common mistakes to their root cause and fix
  • Timing reference: MIN (1 day / 17,280 ledgers), DEFAULT (30 days / 518,400 ledgers), MAX (90 days / 1,555,200 ledgers) with a ledger timeline illustration
  • Events emitted at each transition and balance snapshot reasons
  • Cross-references to error-codes.md, architecture.md, and oracle.md

docs/architecture.md updated to link to the new document from its Match Lifecycle section. README.md updated to include the state machine in the Documentation index.

closes #742

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@henrypeters 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

@yahia008 yahia008 merged commit cea1d6a into StellarCheckMate:main Jun 27, 2026
3 of 5 checks passed
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.

Implement Escrow State Machine Visualization

2 participants