feat: emit ScheduledNotificationCancelled event on notification cance…#147
Merged
Conversation
…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
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.
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:
Closes #85