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
Description
The contract emits fourteen
#[contractevent]types (e.g.EscrowFunded,EscrowSettled,LegalHoldChanged,TreasuryDustSwept,AllowlistEnabledChanged) with specific#[topic]fields andsymbol_short!names. Produce an authoritative event reference so the indexer indocs/escrow-indexer.mdand the read API stay in sync with the on-chain emission.Requirements and context
escrowSoroban contract.symbol_short!name, topic fields, data fields, and the entrypoint that emits it.EscrowFundedtopics: name, invoice_id, investor).docs/escrow-events.mdanddocs/escrow-indexer.md; note theopenapi.yamlmapping.#[contractevent]structs inlib.rs.Suggested execution
git checkout -b docs/event-schemaescrow/src/lib.rsescrow/src/tests/coverage.rsdocs/EVENT_SCHEMA.mdTest and commit
cargo testExample commit message
Guidelines