Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
90058040
Unverified
Commit
90058040
authored
Mar 16, 2020
by
Nicolás Venturo
Committed by
GitHub
Mar 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make AccessControl GSN compatible (#2135)
parent
63c89c77
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
AccessControl.sol
contracts/access/AccessControl.sol
+2
-2
AccessControlMock.sol
contracts/mocks/AccessControlMock.sol
+1
-1
No files found.
contracts/access/AccessControl.sol
View file @
90058040
...
...
@@ -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()
);
}
}
...
...
contracts/mocks/AccessControlMock.sol
View file @
90058040
...
...
@@ -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 {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment