Background
Marketplace and operations surfaces need fast visibility into escrow health so users can understand whether assets are still locked, disputed, or eligible for release without manually combining multiple reads.
Feature Focus
Add escrow status and release-readiness accessors to the escrow marketplace contract.
Where to Implement (Exact Targets)
contracts/escrow-marketplace/src/lib.rs
contracts/escrow-marketplace/src/storage.rs
contracts/escrow-marketplace/src/types.rs
contracts/escrow-marketplace/src/test.rs
What to Implement
- Add a snapshot accessor that returns escrow state, buyer/seller identifiers, expiry metadata, and dispute flags.
- Add a release-readiness accessor that explains whether release conditions are satisfied and which blocker remains when not ready.
- Normalize response payloads so frontend workflows can render badges and CTA states directly.
- Preserve compatibility with existing settlement logic and dispute windows.
Interface / Endpoint / Method Details
- Return structured data rather than a narrow boolean so clients can present actionable state.
- Include timestamp or ledger-derived readiness context where already tracked by the contract.
- Avoid duplicating settlement transitions inside the read path.
Acceptance Criteria
- Clients can distinguish locked, releasable, disputed, and expired escrows using public reads alone.
- Accessors gracefully handle unknown escrow ids.
- Existing write flows continue to behave unchanged.
Required Tests
- Unit tests for pending, releasable, expired, disputed, and missing-escrow cases.
- Regression coverage confirming reads do not affect escrow settlement state.
Definition of Done
- Snapshot and readiness accessors are live, documented, and tested.
- Contract interface docs stay in sync.
Background
Marketplace and operations surfaces need fast visibility into escrow health so users can understand whether assets are still locked, disputed, or eligible for release without manually combining multiple reads.
Feature Focus
Add escrow status and release-readiness accessors to the escrow marketplace contract.
Where to Implement (Exact Targets)
contracts/escrow-marketplace/src/lib.rscontracts/escrow-marketplace/src/storage.rscontracts/escrow-marketplace/src/types.rscontracts/escrow-marketplace/src/test.rsWhat to Implement
Interface / Endpoint / Method Details
Acceptance Criteria
Required Tests
Definition of Done