Skip to content

Event Schema Hardening #70

Description

@Robotron2

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.rs exposes a highly uniform structure.
  • All emitted events conform to the standardized schema.
  • Emitted events remain deterministic and parseable.

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

  • Ready for review.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions