Skip to content

Contracts - Document escrow state machine and authorization matrix in contracts README #498

@1nonlypiece

Description

@1nonlypiece

Contracts - Document escrow state machine and authorization matrix in contracts README

Description

contracts/README.md lists functions but lacks a formal state-machine diagram and an authorization matrix. Document every EscrowStatus transition, which entrypoint triggers it, and who is authorized, so integrators and auditors can reason about the contract in contracts/escrow/src/lib.rs.

Requirements and context

  • Must be secure, tested, and documented
  • Should be efficient and easy to review
  • Add a state-transition diagram for EscrowStatus
  • Add an authorization matrix per entrypoint (owner/admin/attestor/any)
  • Cross-reference the #[contracterror] codes
  • Keep it in sync with contracts/escrow/src/lib.rs

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b docs/escrow-state-machine
  • Implement changes
    • Expand contracts/README.md with the diagram and matrix
    • Add a doc-consistency note referencing the test file
    • Reference function names exactly as in lib.rs
    • Verify accuracy against the implementation
  • Test and commit
    • Run tests, cover edge cases
    • Include test output and notes

Example commit message

docs: add escrow state machine and authorization matrix

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions