Skip to content

feat: emit ScheduledNotificationCancelled event on notification cance…#147

Merged
Abd-Standard merged 2 commits into
Core-Foundry:mainfrom
dotmantissa:main
Jun 22, 2026
Merged

feat: emit ScheduledNotificationCancelled event on notification cance…#147
Abd-Standard merged 2 commits into
Core-Foundry:mainfrom
dotmantissa:main

Conversation

@dotmantissa

Copy link
Copy Markdown
Contributor

Added a dedicated on-chain event that fires every time a scheduled notification is cancelled. Off-chain consumers can now subscribe to the new Notification category (discriminant 3) and receive the exact notification identifier in the event payload without needing to poll or cross-reference any secondary data source.

Changes:

  • NotificationCategory gets a new Notification = 3 variant for all scheduled notification operations
  • ScheduledNotificationCancelled event struct defined in events.rs with caller address and notification_id (BytesN<32>) in topics and data
  • cancel_notification function added to autoshare_logic.rs; requires caller auth and respects the contract paused flag
  • cancel_notification exposed as a public contract method in lib.rs
  • Six new tests in notification_test.rs covering event emission, correct category, complete event data, topic shape, pause guard, and sequential cancellations with distinct identifiers
  • contract/README.md updated with full ABI documentation for the new event and function including topic layout, data fields, and error codes

Closes #85

dotmantissa and others added 2 commits June 21, 2026 15:32
…llation

Added a dedicated on-chain event that fires every time a scheduled
notification is cancelled. Off-chain consumers can now subscribe to
the new Notification category (discriminant 3) and receive the exact
notification identifier in the event payload without needing to poll
or cross-reference any secondary data source.

Changes:
- NotificationCategory gets a new Notification = 3 variant for all
  scheduled notification operations
- ScheduledNotificationCancelled event struct defined in events.rs with
  caller address and notification_id (BytesN<32>) in topics and data
- cancel_notification function added to autoshare_logic.rs; requires
  caller auth and respects the contract paused flag
- cancel_notification exposed as a public contract method in lib.rs
- Six new tests in notification_test.rs covering event emission,
  correct category, complete event data, topic shape, pause guard,
  and sequential cancellations with distinct identifiers
- contract/README.md updated with full ABI documentation for the new
  event and function including topic layout, data fields, and error codes
@Abd-Standard Abd-Standard merged commit 39278f6 into Core-Foundry:main Jun 22, 2026
1 of 3 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.

[Contracts] Add Event for Notification Cancellation

2 participants