Skip to content

Document the complete event schema and topic layout in docs/EVENT_SCHEMA.md #272

@mikewheeleer

Description

@mikewheeleer

Description

The contract emits fourteen #[contractevent] types (e.g. EscrowFunded, EscrowSettled, LegalHoldChanged, TreasuryDustSwept, AllowlistEnabledChanged) with specific #[topic] fields and symbol_short! names. Produce an authoritative event reference so the indexer in docs/escrow-indexer.md and the read API stay in sync with the on-chain emission.

Requirements and context

  • Scoped to the LiquiFact escrow Soroban contract.
  • For each event, document its symbol_short! name, topic fields, data fields, and the entrypoint that emits it.
  • Call out the indexed/topic vs data split (e.g. EscrowFunded topics: name, invoice_id, investor).
  • Cross-link docs/escrow-events.md and docs/escrow-indexer.md; note the openapi.yaml mapping.
  • Invariant: documented field order/types must match the #[contractevent] structs in lib.rs.
  • Must be accurate, reviewed, and aligned with code.

Suggested execution

  • Fork the repo and create a branch:
    • git checkout -b docs/event-schema
  • Implement changes:
    • escrow/src/lib.rs
    • Tests: escrow/src/tests/coverage.rs
    • Docs: docs/EVENT_SCHEMA.md
    • Include rustdoc/NatSpec-style doc comments on public functions
    • Validate security assumptions (auth, overflow, storage TTL, double-spend)

Test and commit

  • Run tests: cargo test
  • Cover edge cases (zero amounts, overflow, unauthorized callers, double-spend, state-machine misuse)
  • Include test output and security notes in the PR

Example commit message

docs(escrow): authoritative event schema reference

Guidelines

  • Minimum 95% test coverage on new/changed code
  • Clear documentation
  • Timeframe: 96 hours from assignment

Metadata

Metadata

Assignees

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions