Reorder AccessControl event to emit after assignment (#2738)

pull/2782/head^2
Francisco Giordano 4 years ago committed by GitHub
parent 1db3037808
commit eea376911b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      contracts/access/AccessControl.sol

@ -230,8 +230,9 @@ abstract contract AccessControl is Context, IAccessControl, ERC165 {
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
emit RoleAdminChanged(role, getRoleAdmin(role), adminRole);
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
function _grantRole(bytes32 role, address account) private {

Loading…
Cancel
Save