feat: implement admin module and update contract test snapshots#611
Open
Oluwasuyi-Timilehin wants to merge 7 commits into
Open
feat: implement admin module and update contract test snapshots#611Oluwasuyi-Timilehin wants to merge 7 commits into
Oluwasuyi-Timilehin wants to merge 7 commits into
Conversation
|
@Oluwasuyi-Timilehin 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! 🚀 |
Contributor
|
@Oluwasuyi-Timilehin fix workflow |
Author
|
Okay will do |
…ow management functionality
Author
|
@Cedarich I already fixed it |
Contributor
Author
|
@Cedarich sorry, it has been fiixed now |
Contributor
Author
|
@Cedarich it has been fixed |
Cedarich
requested changes
Jun 28, 2026
Cedarich
left a comment
Contributor
There was a problem hiding this comment.
Hello 👋 please review this PR the changes made are too much 3000+
Author
|
@Cedarich the ci was failing cause of the formatting, and after formatting those were the files changed |
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.
#closes #569
Pull Request: Diagnostic Pause Reason Codes & Structured Events
This PR improves the debuggability and auditability of the QuickEx contract when operations are paused. It introduces explicit reason codes for global and feature-specific pauses, exposes read-only getters for backends/clients, and emits structured events whenever pause states transition or block an operation.
Key Changes
1. Stable Reason Codes & Storage Mapping
PauseReasonenum in types.rs containing stable discriminant values for common pause contexts (SystemMaintenance = 1,SecurityEmergency = 2,FeatureUpgrade = 3,RegulatoryCompliance = 4,OperatorIntervention = 5).GlobalPauseReason) and granular feature-specific pause reasons (FeaturePauseReasons) in storage.rs.2. Structured Transition & Enforcement Events
Registered three new event schemas in the canonical catalog
EVENT_SCHEMASin events.rs:PauseEnabled: Emitted when a pause state is enabled globally or locally on a feature, recording the admin authorizer, whether it is global, the target feature flag, and the reason code.PauseDisabled: Emitted when a pause state is lifted.PauseEnforced: Emitted inline right before a blocked operation returns a pause error, containing the caller address, blocked action symbol, and the reason code.3. Administrative Interface & Entrypoint Updates
set_paused,pause_features, andunpause_featuresin admin.rs to accept the newreason: u32code argument, persist it, and publish the transition events.get_global_pause_reason(env)andget_feature_pause_reason(env, flag)in lib.rs for clients and backends.PauseEnforcedevents containing the exact active reason code.4. Tests Modification
test_pause_reason_codes_and_eventsto verify the new get/set flow.test_event_snapshot_contract_paused_schemato search specifically for theContractPausedtopic, preventing mismatch failures from the co-emittedPauseEnabledevent.#closes