Description
EscrowError in types.rs defines 43 variants, several of which are unused (Accepted-related, SelfRating, CommentTooLong, EmptyComment, MilestonesAlreadyReleased, NotReadyForFinalization). Reviewers and integrators have no single reference mapping error codes to the conditions that raise them. Produce a complete error-code reference.
Requirements and context
- Scoped to TalentTrust
escrow Soroban contract (contracts/escrow).
- For each
EscrowError variant, document its numeric code, the entrypoint(s) that raise it, and the precise trigger condition; clearly mark variants that are currently unused/reserved.
- Cross-link to the relevant entrypoint docs and to issues that will start using reserved codes.
- Acceptance: the catalog matches the enum's numbering (1..=43) exactly.
- Must be secure, tested, and documented.
Suggested execution
- Fork the repo and create a branch:
git checkout -b docs/error-catalog
- Implement changes:
docs/escrow/SECURITY.md
- Tests:
contracts/escrow/src/test/security.rs
- Docs:
docs/escrow/SECURITY.md
- Include rustdoc/NatSpec-style doc comments on public functions
- Validate security assumptions (auth, overflow, fail-closed state machine, storage TTL, fee accounting)
Test and commit
- Run tests:
cargo test
- Cover edge cases (unauthorized callers, double release/refund, expired approvals, fee rounding, paused state)
- Include test output and security notes in the PR
Example commit message
docs(escrow): document EscrowError code catalog
Guidelines
- Minimum 95% test coverage on new/changed code
- Clear documentation
- Timeframe: 96 hours from assignment
Description
EscrowErrorintypes.rsdefines 43 variants, several of which are unused (Accepted-related,SelfRating,CommentTooLong,EmptyComment,MilestonesAlreadyReleased,NotReadyForFinalization). Reviewers and integrators have no single reference mapping error codes to the conditions that raise them. Produce a complete error-code reference.Requirements and context
escrowSoroban contract (contracts/escrow).EscrowErrorvariant, document its numeric code, the entrypoint(s) that raise it, and the precise trigger condition; clearly mark variants that are currently unused/reserved.Suggested execution
git checkout -b docs/error-catalogdocs/escrow/SECURITY.mdcontracts/escrow/src/test/security.rsdocs/escrow/SECURITY.mdTest and commit
cargo testExample commit message
Guidelines