From 1b64e794d96d68b191d762323415cb907f927834 Mon Sep 17 00:00:00 2001 From: Kristen Pire Date: Fri, 7 Jun 2024 13:54:20 +0200 Subject: [PATCH] feat(BlacklistValidator): Remove Double entrypoint on role Granting. --- script/configureToken.s.sol | 1 + src/BlacklistValidatorUpgradeable.sol | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/script/configureToken.s.sol b/script/configureToken.s.sol index 0331d8b..b5561ae 100644 --- a/script/configureToken.s.sol +++ b/script/configureToken.s.sol @@ -36,6 +36,7 @@ contract All is Script { token.addAdminAccount(devKey); token.setMintAllowance(system, allowance); + console.log("mint allowance set successfully."); token.removeAdminAccount(devKey); vm.stopBroadcast(); } diff --git a/src/BlacklistValidatorUpgradeable.sol b/src/BlacklistValidatorUpgradeable.sol index 72ae5e6..8ddcd0b 100644 --- a/src/BlacklistValidatorUpgradeable.sol +++ b/src/BlacklistValidatorUpgradeable.sol @@ -165,7 +165,7 @@ contract BlacklistValidatorUpgradeable is * @param account The address of the account. */ function addAdminAccount(address account) public virtual onlyOwner { - grantRole(ADMIN_ROLE, account); + _grantRole(ADMIN_ROLE, account); emit AdminAccountAdded(account); } @@ -174,7 +174,7 @@ contract BlacklistValidatorUpgradeable is * @param account The address of the account. */ function removeAdminAccount(address account) public virtual onlyOwner { - revokeRole(ADMIN_ROLE, account); + _revokeRole(ADMIN_ROLE, account); emit AdminAccountRemoved(account); }