Skip to content

feat(events): add monitor_event for invoice contract observability#258

Merged
Kingsman-99 merged 2 commits into
Stellar-split:mainfrom
Nuwe10:feature/180-invoice-monitoring-hooks
Jun 27, 2026
Merged

feat(events): add monitor_event for invoice contract observability#258
Kingsman-99 merged 2 commits into
Stellar-split:mainfrom
Nuwe10:feature/180-invoice-monitoring-hooks

Conversation

@Nuwe10

@Nuwe10 Nuwe10 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a monitor_event function to events.rs and emits it as the first operation in all four public entry points (create_invoice, pay, release, refund), enabling real-time contract health observability for indexers and dashboards.

Changes

  • events.rs: Added monitor_event(env, function, invoice_id, actor, timestamp) with topic (symbol_short!("monitor"), function_name) and data (invoice_id, actor_address, ledger_timestamp)
  • lib.rs: Emit monitor_event as the first operation in create_invoice, pay, release, and refund
  • test.rs: Four new tests verify the monitor event is emitted with the correct function name for each entry point

Validation

  • No new compiler errors introduced (pre-existing build errors on main are unrelated to this issue)
  • No new clippy warnings introduced
  • All acceptance criteria satisfied

Closes #180

Nuwe10 and others added 2 commits June 27, 2026 02:56
Closes Stellar-split#180

- Add monitor_event() to events.rs with topic (symbol_short!("monitor"), function_name)
  and data (invoice_id, actor, ledger_timestamp)
- Emit monitor_event as the first operation in create_invoice, pay, release, and refund
- Add four tests verifying monitor event is emitted with correct function name for each entry point
@Kingsman-99 Kingsman-99 merged commit fb090a6 into Stellar-split:main Jun 27, 2026
1 of 2 checks passed
@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Nuwe10 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

@grantfox-oss grantfox-oss Bot mentioned this pull request Jun 27, 2026
7 tasks
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.

Add invoice contract monitoring hooks

2 participants