Make AccessControl GSN compatible (#2135)

pull/2136/head
Nicolás Venturo 5 years ago committed by GitHub
parent 63c89c772b
commit 90058040f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      contracts/access/AccessControl.sol
  2. 2
      contracts/mocks/AccessControlMock.sol

@ -164,7 +164,7 @@ abstract contract AccessControl is Context {
*/
function _grantRole(bytes32 role, address account) internal virtual {
if (_roles[role].members.add(account)) {
emit RoleGranted(role, account, msg.sender);
emit RoleGranted(role, account, _msgSender());
}
}
@ -175,7 +175,7 @@ abstract contract AccessControl is Context {
*/
function _revokeRole(bytes32 role, address account) internal virtual {
if (_roles[role].members.remove(account)) {
emit RoleRevoked(role, account, msg.sender);
emit RoleRevoked(role, account, _msgSender());
}
}

@ -4,7 +4,7 @@ import "../access/AccessControl.sol";
contract AccessControlMock is AccessControl {
constructor() public {
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
_grantRole(DEFAULT_ADMIN_ROLE, _msgSender());
}
function setRoleAdmin(bytes32 roleId, bytes32 adminRoleId) public {

Loading…
Cancel
Save