Skip to content

refactor(admin): extract shared check helper - #321

Merged
mikewheeleer merged 1 commit into
StableRoute-Org:mainfrom
JuanVP2:refactor/admin-01-helper
Jul 27, 2026
Merged

refactor(admin): extract shared check helper#321
mikewheeleer merged 1 commit into
StableRoute-Org:mainfrom
JuanVP2:refactor/admin-01-helper

Conversation

@JuanVP2

@JuanVP2 JuanVP2 commented Jul 26, 2026

Copy link
Copy Markdown

Closes #289

Summary

Audited and refactored all 23 admin-gated entrypoints in src/lib.rs to consistently call Self::require_admin(&env); at the top of their execution path.

  • Covered all entrypoints across governance, pair lifecycle, fee configuration, parameter setters, and role management.
  • Preserved exact behavior, rejection conditions, and typed error codes (RouterError::NotInitialized, ContractPaused, etc.).
  • Zero ABI breaking changes.

Verification Results

  • cargo test: 247/247 unit and integration tests passed in green.
  • cargo clippy --all-targets -- -D warnings: 0 warnings.
  • cargo fmt --all -- --check: Formatting checked cleanly.

@mikewheeleer
mikewheeleer merged commit b9fab11 into StableRoute-Org:main Jul 27, 2026
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.

Extract the repeated admin check into a shared helper

2 participants