fix: revenue_pool event shape vs schema (closes #508)#548
Merged
greatest0fallt1me merged 2 commits intoJun 27, 2026
Merged
Conversation
Two events introduced in recent PRs (CalloraOrg#516 admin_broadcast, CalloraOrg#521 yield_deposited) were emitted in contracts/revenue_pool/src/lib.rs without corresponding entries in EVENT_SCHEMA.md, leaving indexers with no documented shape for these topics. Changes: - EVENT_SCHEMA.md: add `yield_deposited` entry (topics: Symbol + treasury Address; data: (amount i128, source Symbol, cumulative_yield_deposited i128)) under callora-revenue-pool - EVENT_SCHEMA.md: add `admin_broadcast` entry (topics: Symbol + caller Address; data: AdminBroadcast { severity, message }) under callora-revenue-pool - EVENT_SCHEMA.md: add both events to the indexer quick-reference table - scripts/check-event-shape.sh: new bash gate that extracts all events::event_*(&env) call sites from lib.rs and verifies each has a matching ### heading in the revenue-pool section of EVENT_SCHEMA.md; exits 1 on mismatch - .github/workflows/ci.yml: new `event-shape` job that runs the gate on every push and PR Schema is the source of truth; no Rust code was changed. Closes CalloraOrg#508
…, admin_cancelled, upgraded)
Contributor
Author
|
The only check introduced by this PR is Event shape vs schema, which passes (green) on commit f8f71be. The other 5 failing checks (Test, Build, WASM, Coverage, Nightly) are pre-existing failures on \main\ unrelated to this change — confirmed via runs 28292295694 (CI), 28292295699 (Coverage), 28292295713 (WASM) on the base branch before this PR was opened. No Rust code was modified here. |
Contributor
|
Merged via direct push to main (admin) |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two events added in recent PRs were missing from EVENT_SCHEMA.md, leaving indexers with no documented shape for those topics:
Schema = source of truth. No Rust code was changed; only documentation and the CI gate were updated.
Changes
Test plan
Closes #508