Skip to content

docs: add on-chain event schema documentation (#109)#187

Open
Philzwrist07 wants to merge 1 commit into
PrincessnJoy:mainfrom
Philzwrist07:feat/issue-109-event-schema-docs
Open

docs: add on-chain event schema documentation (#109)#187
Philzwrist07 wants to merge 1 commit into
PrincessnJoy:mainfrom
Philzwrist07:feat/issue-109-event-schema-docs

Conversation

@Philzwrist07
Copy link
Copy Markdown

Closes #109

Summary

Both contracts emit Soroban events on every state transition, but there was no documentation of
the topic names, data fields, or encoding format, making it impossible for off-chain indexers
and frontends to reliably parse them.

This PR adds the missing documentation and TypeScript types to fully address that gap.

Changes

docs/events.md

  • Documents all 18 events emitted by the governance and token contracts
  • Each entry includes: event name, topic symbols, data fields with types and descriptions, and
    a JSON example
  • Covers encoding format (XDR ScVal types for Address, i128, u64, String, and enum variants)
  • Ends with a quick-reference table for all events at a glance

frontend/src/events.ts

  • TypeScript interface for every individual event
  • GovernanceEvent, TokenEvent, and CosmosVoteEvent union types for exhaustive pattern matching
    in consumers
  • GOV_TAGS and TOKEN_TAGS constants to avoid magic strings when filtering events

Testing

Documentation-only change. No contract logic was modified.

───────────────────────────────────────────────────────────────────────────────────────────────

- docs/events.md: full schema for all 18 events across governance and
  token contracts — topics, data fields, types, and JSON examples
- frontend/src/events.ts: TypeScript interfaces for every event,
  GovernanceEvent / TokenEvent / CosmosVoteEvent union types, and
  GOV_TAGS / TOKEN_TAGS constants for type-safe topic matching

Closes PrincessnJoy#109
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 31, 2026

@Philzwrist07 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No documentation for the on-chain event schema

1 participant