Skip to content

docs(contracts): document event schemas and add drift tests - #482

Open
dotmantissa wants to merge 2 commits into
ToluLabs:mainfrom
dotmantissa:feat/issue-429-contract-events-schema
Open

docs(contracts): document event schemas and add drift tests#482
dotmantissa wants to merge 2 commits into
ToluLabs:mainfrom
dotmantissa:feat/issue-429-contract-events-schema

Conversation

@dotmantissa

Copy link
Copy Markdown
Contributor

What does this PR do?

Authoritatively documents all Soroban contract event schemas across ProofRegistry, IssuerRegistry, CredentialVerifier, and GatedPool in EVENTS.md and docs/EVENTS.md. Defines topic tuples, contract payload structs, field types, emission triggers, non-event operations, and indexer filter patterns. Adds unit tests across all four contracts asserting that emitted event topic tuples and payload structures match the specification to prevent schema drift, and updates the indexer, SDK, and repository documentation to reference the authoritative event schemas.

Closes #429

Type of change

  • Bug fix
  • New feature / credential type
  • Refactor / cleanup
  • Docs
  • CI / tooling

Merge requirements

  • CI is greencargo test (contracts), pnpm tsc --noEmit (frontend), pnpm build (frontend), circuit tests — all green
  • Greptile confidence ≥ 4/5 — all review comments addressed, no unresolved threads
  • Circuit changes: fixtures/<type>/ artifacts updated
  • No NEXT_PUBLIC_ prefix on server-only env vars
  • No identity fields stored or logged after KYC provider call
  • prehash:false preserved on any issuer signing path touched
  • Issuer private key never referenced from client-bundled code

✅ Merge requirements

  • All CI checks pass (contracts / frontend / circuits as applicable)
  • Every Greptile review comment is addressed — no unresolved review threads
  • Greptile confidence score is 4/5 or higher

Notes for reviewers

Event structs now derive Debug, Eq, PartialEq to support direct assertions in tests without changing the on-chain XDR layout generated by #[contracttype]. Unit tests assert exact emitted topic tuples and payload structs against Soroban event buffers.

Document all contract event schemas, topic tuples, payload structures,
emission triggers, non-event operations, and indexer filter patterns
in EVENTS.md and docs/EVENTS.md. Add unit tests asserting exact event
topics and payloads across ProofRegistry, IssuerRegistry,
CredentialVerifier, and GatedPool to prevent schema drift. Reference
the event specifications in the indexer, SDK, and repo documentation.
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@dotmantissa 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.

Improvement: structured, queryable contract events with a documented EVENTS.md schema

1 participant