Skip to content

feat: add script to manage super admin - #16

Closed
fredo wants to merge 2 commits into
mainfrom
script/add-super-admin
Closed

feat: add script to manage super admin#16
fredo wants to merge 2 commits into
mainfrom
script/add-super-admin

Conversation

@fredo

@fredo fredo commented Dec 1, 2025

Copy link
Copy Markdown
Contributor

Resolves ENG-4674

Comment thread script/DeployCore.s.sol Outdated
deployOwnerVerifier = vm.envOr("DEPLOY_ADMIN_VERIFIER_OWNER", false);
deployWhitelistVerifier = vm.envOr("DEPLOY_ADMIN_VERIFIER_WHITELIST", false);
whitelistAdmin = vm.envOr("ADMIN_VERIFIER_WHITELIST_ADMIN_ADDRESS", address(0));
deploySuperAdminVerifier = vm.envOr("DEPLOY_ADMIN_VERIFIER_SUPER_ADMIN", false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The new flag is never included in the count or either deployment branch, so enabling it has no effect on run and the proxy is initialized without this verifier. Can we add the super admin verifier to the array construction and cover the enabled path?

/// ```bash
/// STATE_ORACLE_ADDRESS=0xOracle \
/// ADMIN_VERIFIER_TO_ADD=0xVerifier \
/// forge script script/ManageAdminVerifiers.s.sol --broadcast --rpc-url $RPC_URL

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The documented command invokes Foundry's default run entrypoint, but this contract has no run function and never reads the listed environment variables. As written, the example cannot add or remove anything. Can we add a configured entrypoint or document the explicit function signature and arguments instead?

Comment thread script/DeployCore.s.sol Outdated
_deployWhitelistAdminVerifier();
}

function deploySuperAdminAdminVerifier() public broadcast {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This adds a universal verifier to the normal production script with no testing guard. Anyone holding superAdmin is accepted as the admin for every adopter, so one configuration mistake creates a protocol wide bypass. Please keep this verifier in a test only deployment script instead of the production path.

@fredo
fredo force-pushed the script/add-super-admin branch from b88b7fb to 619e6bb Compare August 12, 2026 11:06
@fredo
fredo marked this pull request as ready for review August 12, 2026 11:14
@linear-code

linear-code Bot commented Aug 18, 2026

Copy link
Copy Markdown

ENG-4674

@fredo fredo closed this Aug 19, 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.

2 participants