Skip to content

Fix #52: Emit Soroban events across all state transitions - #130

Open
funds0033-cmyk wants to merge 1 commit into
SPulse-Org:mainfrom
funds0033-cmyk:fix/issue-52-event-emission
Open

Fix #52: Emit Soroban events across all state transitions#130
funds0033-cmyk wants to merge 1 commit into
SPulse-Org:mainfrom
funds0033-cmyk:fix/issue-52-event-emission

Conversation

@funds0033-cmyk

Copy link
Copy Markdown

Closes #52

Problem

State transitions across the contracts weren't emitting events, leaving off-chain indexers with no reliable way to track activity.

What landed

All four contracts now emit Soroban events on the transitions the maintainer specified. Topics are (event_name, actor [, market_id]) so indexers can filter; data carries the state delta.

Contract Events
prediction_market market_created, bet_placed, market_resolved, market_cancelled, cancel_refund, claim_processed, fees_withdrawn, withdraw_requested, withdraw_cancelled, config_changed, paused / unpaused
referral_registry referral_registered, referral_credited, referral_missed
leaderboard leaderboard_updated (points / rewards / bonuses)
pulse_token mint, transfer, burn

Scope

This branch is off upstream/main and does not include the #51 work.

Tests

Light tests assert the last emitted event name on create/bet/resolve, mint, referral register, and leaderboard update.

Notes

Event emission will change existing snapshots — flag it if CI shows diffs there and they can be refreshed.

Branch: fix/issue-52-event-emission

…cts so indexers can track every state transition.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

[HIGH] No event emission anywhere — off-chain indexers, UIs, and auditors cannot track state transitions

1 participant