Skip to content

feat: admin audit events for set_paused, set_admin, set_token_allowed#810

Merged
greatest0fallt1me merged 1 commit into
Streampay-Org:mainfrom
shogun444:feat/admin-audit-events
Jun 29, 2026
Merged

feat: admin audit events for set_paused, set_admin, set_token_allowed#810
greatest0fallt1me merged 1 commit into
Streampay-Org:mainfrom
shogun444:feat/admin-audit-events

Conversation

@shogun444

Copy link
Copy Markdown
Contributor

Summary

Closes #458

This PR adds dedicated audit events for admin actions so off-chain indexers and auditors can reconstruct the administrative history of the contract.

Changes

  • Added paused_set event for set_paused
  • Added admin_changed event for set_admin
  • Added token_allowed_set event for set_token_allowed
  • Emitted the new events immediately after successful state updates
  • Preserved the existing two-topic event schema used throughout the contract
  • Included the acting admin and event timestamp in the payload following the existing event conventions
  • Updated the event documentation table in events.rs
  • Replaced the existing symbol_short!("admin_action") usage with Symbol::new(env, ...) to match the current Soroban SDK requirements

Tests

  • Added set_paused_emits_event
  • Added set_admin_emits_event
  • Added set_token_allowed_emits_event
  • Added set_paused_failure_emits_no_event
  • Verified emitted topics and payload contents match the expected schema

Notes

  • No state transition logic was modified.
  • Existing event ordering and topic layout remain unchanged for compatibility with current indexers.

@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

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

@greatest0fallt1me greatest0fallt1me merged commit a639ffe into Streampay-Org:main Jun 29, 2026
0 of 2 checks passed
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 audit trail for admin actions emitted as contract events

2 participants