Skip to content

Align event parser contracts with Rust event schema as a generated artifact #7

Description

@grantfox-oss

Refactor / Enhancement
Impact: Rust event schemas live in app/contract/contracts/quickex/src/events.rs, while TypeScript parser expectations live separately in backend ingestion code. Manual drift can break event ingestion silently during contract releases.

Affected areas: app/contract/contracts/quickex/src/events.rs, app/backend/src/ingestion/soroban-event.parser.ts, app/backend/src/ingestion/types/contract-event.types.ts, app/backend/src/ingestion/__tests__/*schema*, app/backend/docs/openapi.yaml, contract docs.

Implementation scope:

  • Define a machine-readable event schema source or export generated JSON from the contract package.
  • Generate TypeScript event names, payload keys, compatibility versions, and parser validation fixtures.
  • Add CI check that backend schema matches the contract schema.
  • Expand unknown-schema handling docs and operational alerts.

Acceptance criteria:

  • Adding or changing a Rust event field fails backend tests until parser fixtures are updated.
  • Backend parser compatibility versions are derived from the same source as contract docs.
  • Unknown schema metrics include contract ID, event name, schema version, and paging token.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignenhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions