Skip to content

Commit

Permalink
feat(BlacklistValidator): Remove Double entrypoint on role Granting.
Browse files Browse the repository at this point in the history
  • Loading branch information
KristenPire committed Jun 7, 2024
1 parent 5a62067 commit 1b64e79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions script/configureToken.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
4 changes: 2 additions & 2 deletions src/BlacklistValidatorUpgradeable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down

0 comments on commit 1b64e79

Please sign in to comment.