Skip to content

fix: wire config freeze gating into set_config#63

Merged
Icahbod merged 3 commits into
ApexChainx:mainfrom
aliyuHabibu:fix/config-freeze-gating
Jun 23, 2026
Merged

fix: wire config freeze gating into set_config#63
Icahbod merged 3 commits into
ApexChainx:mainfrom
aliyuHabibu:fix/config-freeze-gating

Conversation

@aliyuHabibu

Copy link
Copy Markdown
Contributor
  • Add ConfigFrozen=16 error variant (InvalidInput renumbered to 17)
  • Add require_not_frozen() check in set_config()
  • Expose freeze_config/unfreeze_config as admin-gated methods
  • Expose is_config_frozen() public query
  • Add cfg_frz/cfg_unfrz events with event_schema docs
  • Update get_failure_schema with ConfigFrozen and InvalidInput
  • Add freeze feature to contract metadata
  • Rewrite config_freeze.rs tests (was dead code)
  • Add freeze integration tests (lifecycle, auth, events)
  • Fix test_pause_rejects_long_reason expected error code

Description

Brief description of the changes in this PR.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Related Issues

Fixes #(issue number) or relates to #(issue number)

Changes Made

Testing

Describe the testing performed to validate these changes:

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented complex logic
  • I have updated relevant documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • My changes do not introduce new warnings

Screenshots (if applicable)

Add screenshots or logs if applicable.

Closes #3

- Add ConfigFrozen=16 error variant (InvalidInput renumbered to 17)
- Add require_not_frozen() check in set_config()
- Expose freeze_config/unfreeze_config as admin-gated methods
- Expose is_config_frozen() public query
- Add cfg_frz/cfg_unfrz events with event_schema docs
- Update get_failure_schema with ConfigFrozen and InvalidInput
- Add freeze feature to contract metadata
- Rewrite config_freeze.rs tests (was dead code)
- Add freeze integration tests (lifecycle, auth, events)
- Fix test_pause_rejects_long_reason expected error code

@Icahbod Icahbod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Icahbod Icahbod merged commit 1f2c9e1 into ApexChainx:main Jun 23, 2026
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.

fix: wire config_freeze.rs into set_config() authorization path

2 participants