Skip to content

Commit

Permalink
feat(SystemRole): Override renounceOwnership to prevent renouncing ow…
Browse files Browse the repository at this point in the history
…nership
  • Loading branch information
KristenPire committed May 16, 2024
1 parent a18aff8 commit 22c3694
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/SystemRoleUpgradeable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ abstract contract SystemRoleUpgradeable is
_;
}

/**
* @dev modifier to restrict access to admin account.
*/
/**
* @dev modifier to restrict access to admin account.
*/
modifier onlyAdminAccount(address account) {
require(
hasRole(ADMIN_ROLE, account),
Expand Down Expand Up @@ -139,4 +139,9 @@ abstract contract SystemRoleUpgradeable is
revokeRole(ADMIN_ROLE, account);
emit AdminAccountRemoved(account);
}

// Override renounceOwnership to prevent renouncing ownership
function renounceOwnership() public override onlyOwner {
revert("Ownership cannot be renounced");
}
}
1 change: 1 addition & 0 deletions src/Token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ contract Token is
);
}


}

contract EURe is Token {
Expand Down

0 comments on commit 22c3694

Please sign in to comment.