Remove outdated comments in AccessControl.sol (#4475)

Co-authored-by: Ernesto García <ernestognw@gmail.com>
pull/4478/head
Prince Allwin 2 years ago committed by GitHub
parent f347b410cf
commit 19293f3ecd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      contracts/access/AccessControl.sol

@ -58,11 +58,8 @@ abstract contract AccessControl is Context, IAccessControl, ERC165 {
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
* with a custom error including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/
modifier onlyRole(bytes32 role) {
_checkRole(role);
@ -84,21 +81,15 @@ abstract contract AccessControl is Context, IAccessControl, ERC165 {
}
/**
* @dev Revert with a standard message if `_msgSender()` is missing `role`.
* @dev Revert with a custom error if `_msgSender()` is missing `role`.
* Overriding this function changes the behavior of the {onlyRole} modifier.
*
* Format of the revert message is described in {_checkRole}.
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
* @dev Revert with a custom error if `account` is missing `role`.
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {

Loading…
Cancel
Save