From 19293f3ecdb20a7f44d54279b5c1ddbb84de4a2e Mon Sep 17 00:00:00 2001 From: Prince Allwin Date: Tue, 25 Jul 2023 07:30:30 +0530 Subject: [PATCH] Remove outdated comments in AccessControl.sol (#4475) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ernesto GarcĂ­a --- contracts/access/AccessControl.sol | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/contracts/access/AccessControl.sol b/contracts/access/AccessControl.sol index d934eddaf..99099dd1f 100644 --- a/contracts/access/AccessControl.sol +++ b/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)) {