فهرست منبع

Remove outdated comments in AccessControl.sol (#4475)

Co-authored-by: Ernesto García <ernestognw@gmail.com>
Prince Allwin 2 سال پیش
والد
کامیت
19293f3ecd
1فایلهای تغییر یافته به همراه3 افزوده شده و 12 حذف شده
  1. 3 12
      contracts/access/AccessControl.sol

+ 3 - 12
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)) {