Issue #20 — refactor: Event Schema Hardening
Description
Off-chain indexers and data lakes rely entirely on emitted contract events to track state. If events lack consistency (e.g., differing topic structures or payload types), indexers break. Hardening the event schema ensures predictable, reliable data feeds for the PadiPay backend.
Requirements & Context
Architectural Goal: Guarantee a deterministic, strict schema for all emitted events.
Implementation Expectations: Audit events.rs. Ensure that every event consistently places the primary identifier (EscrowId) as the first topic. Standardize the data payload shapes (e.g., passing explicit structs rather than loose tuple fragments) if appropriate.
Acceptance Criteria
Out of Scope
- Changing the underlying event emission mechanisms of Soroban.
Suggested Execution
git checkout -b refactor/event-schema
Suggested Commit Message
refactor: standardize event emission payloads for indexer reliability
Testing Notes
- Verify test suites are updated to match the new event signatures.
- Perform manual event verification using
soroban-cli if necessary to verify payload decoding.
References
Soroban env.events().publish() mechanics.
src/events.rs
Definition of Done
Issue #20 — refactor: Event Schema Hardening
Description
Off-chain indexers and data lakes rely entirely on emitted contract events to track state. If events lack consistency (e.g., differing topic structures or payload types), indexers break. Hardening the event schema ensures predictable, reliable data feeds for the PadiPay backend.
Requirements & Context
Architectural Goal: Guarantee a deterministic, strict schema for all emitted events.
Implementation Expectations: Audit
events.rs. Ensure that every event consistently places the primary identifier (EscrowId) as the first topic. Standardize the data payload shapes (e.g., passing explicit structs rather than loose tuple fragments) if appropriate.Acceptance Criteria
events.rsexposes a highly uniform structure.Out of Scope
Suggested Execution
Suggested Commit Message
Testing Notes
soroban-cliif necessary to verify payload decoding.References
Soroban
env.events().publish()mechanics.src/events.rsDefinition of Done