Context
Events in src/request.rs are emitted as env.events().publish((Symbol, id), ()) — the payload is empty, so the backend indexer cannot read fields without re-deriving state from storage.
Acceptance criteria
request_created publishes (request_id, payee, asset, amount, memo, expires_at).
request_paid publishes (request_id, payer).
request_cancelled publishes (request_id).
- The event payload shapes are documented in
README.md (Contract reference table).
Technical notes
- Soroban event topics must be Serde-serializable; use
Vec/tuple of Vals via IntoVal, or define #[contracttype] structs for payloads.
- Keep the first topic (the event name
Symbol) stable — the backend filters on it.
Testing
- Add a test asserting emitted event topics/body via
env.events().all() (testutils).
Context
Events in
src/request.rsare emitted asenv.events().publish((Symbol, id), ())— the payload is empty, so the backend indexer cannot read fields without re-deriving state from storage.Acceptance criteria
request_createdpublishes(request_id, payee, asset, amount, memo, expires_at).request_paidpublishes(request_id, payer).request_cancelledpublishes(request_id).README.md(Contract reference table).Technical notes
Vec/tupleofVals viaIntoVal, or define#[contracttype]structs for payloads.Symbol) stable — the backend filters on it.Testing
env.events().all()(testutils).