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
bb6a24e6
Unverified
Commit
bb6a24e6
authored
Nov 20, 2018
by
Nicolás Venturo
Committed by
GitHub
Nov 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed roles private variables to adhere to code style. (#1507)
parent
83bc045a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
16 deletions
+16
-16
CapperRole.sol
contracts/access/roles/CapperRole.sol
+4
-4
MinterRole.sol
contracts/access/roles/MinterRole.sol
+4
-4
PauserRole.sol
contracts/access/roles/PauserRole.sol
+4
-4
SignerRole.sol
contracts/access/roles/SignerRole.sol
+4
-4
No files found.
contracts/access/roles/CapperRole.sol
View file @
bb6a24e6
...
@@ -8,7 +8,7 @@ contract CapperRole {
...
@@ -8,7 +8,7 @@ contract CapperRole {
event CapperAdded(address indexed account);
event CapperAdded(address indexed account);
event CapperRemoved(address indexed account);
event CapperRemoved(address indexed account);
Roles.Role private cappers;
Roles.Role private
_
cappers;
constructor() internal {
constructor() internal {
_addCapper(msg.sender);
_addCapper(msg.sender);
...
@@ -20,7 +20,7 @@ contract CapperRole {
...
@@ -20,7 +20,7 @@ contract CapperRole {
}
}
function isCapper(address account) public view returns (bool) {
function isCapper(address account) public view returns (bool) {
return cappers.has(account);
return
_
cappers.has(account);
}
}
function addCapper(address account) public onlyCapper {
function addCapper(address account) public onlyCapper {
...
@@ -32,12 +32,12 @@ contract CapperRole {
...
@@ -32,12 +32,12 @@ contract CapperRole {
}
}
function _addCapper(address account) internal {
function _addCapper(address account) internal {
cappers.add(account);
_
cappers.add(account);
emit CapperAdded(account);
emit CapperAdded(account);
}
}
function _removeCapper(address account) internal {
function _removeCapper(address account) internal {
cappers.remove(account);
_
cappers.remove(account);
emit CapperRemoved(account);
emit CapperRemoved(account);
}
}
}
}
contracts/access/roles/MinterRole.sol
View file @
bb6a24e6
...
@@ -8,7 +8,7 @@ contract MinterRole {
...
@@ -8,7 +8,7 @@ contract MinterRole {
event MinterAdded(address indexed account);
event MinterAdded(address indexed account);
event MinterRemoved(address indexed account);
event MinterRemoved(address indexed account);
Roles.Role private minters;
Roles.Role private
_
minters;
constructor() internal {
constructor() internal {
_addMinter(msg.sender);
_addMinter(msg.sender);
...
@@ -20,7 +20,7 @@ contract MinterRole {
...
@@ -20,7 +20,7 @@ contract MinterRole {
}
}
function isMinter(address account) public view returns (bool) {
function isMinter(address account) public view returns (bool) {
return minters.has(account);
return
_
minters.has(account);
}
}
function addMinter(address account) public onlyMinter {
function addMinter(address account) public onlyMinter {
...
@@ -32,12 +32,12 @@ contract MinterRole {
...
@@ -32,12 +32,12 @@ contract MinterRole {
}
}
function _addMinter(address account) internal {
function _addMinter(address account) internal {
minters.add(account);
_
minters.add(account);
emit MinterAdded(account);
emit MinterAdded(account);
}
}
function _removeMinter(address account) internal {
function _removeMinter(address account) internal {
minters.remove(account);
_
minters.remove(account);
emit MinterRemoved(account);
emit MinterRemoved(account);
}
}
}
}
contracts/access/roles/PauserRole.sol
View file @
bb6a24e6
...
@@ -8,7 +8,7 @@ contract PauserRole {
...
@@ -8,7 +8,7 @@ contract PauserRole {
event PauserAdded(address indexed account);
event PauserAdded(address indexed account);
event PauserRemoved(address indexed account);
event PauserRemoved(address indexed account);
Roles.Role private pausers;
Roles.Role private
_
pausers;
constructor() internal {
constructor() internal {
_addPauser(msg.sender);
_addPauser(msg.sender);
...
@@ -20,7 +20,7 @@ contract PauserRole {
...
@@ -20,7 +20,7 @@ contract PauserRole {
}
}
function isPauser(address account) public view returns (bool) {
function isPauser(address account) public view returns (bool) {
return pausers.has(account);
return
_
pausers.has(account);
}
}
function addPauser(address account) public onlyPauser {
function addPauser(address account) public onlyPauser {
...
@@ -32,12 +32,12 @@ contract PauserRole {
...
@@ -32,12 +32,12 @@ contract PauserRole {
}
}
function _addPauser(address account) internal {
function _addPauser(address account) internal {
pausers.add(account);
_
pausers.add(account);
emit PauserAdded(account);
emit PauserAdded(account);
}
}
function _removePauser(address account) internal {
function _removePauser(address account) internal {
pausers.remove(account);
_
pausers.remove(account);
emit PauserRemoved(account);
emit PauserRemoved(account);
}
}
}
}
contracts/access/roles/SignerRole.sol
View file @
bb6a24e6
...
@@ -8,7 +8,7 @@ contract SignerRole {
...
@@ -8,7 +8,7 @@ contract SignerRole {
event SignerAdded(address indexed account);
event SignerAdded(address indexed account);
event SignerRemoved(address indexed account);
event SignerRemoved(address indexed account);
Roles.Role private signers;
Roles.Role private
_
signers;
constructor() internal {
constructor() internal {
_addSigner(msg.sender);
_addSigner(msg.sender);
...
@@ -20,7 +20,7 @@ contract SignerRole {
...
@@ -20,7 +20,7 @@ contract SignerRole {
}
}
function isSigner(address account) public view returns (bool) {
function isSigner(address account) public view returns (bool) {
return signers.has(account);
return
_
signers.has(account);
}
}
function addSigner(address account) public onlySigner {
function addSigner(address account) public onlySigner {
...
@@ -32,12 +32,12 @@ contract SignerRole {
...
@@ -32,12 +32,12 @@ contract SignerRole {
}
}
function _addSigner(address account) internal {
function _addSigner(address account) internal {
signers.add(account);
_
signers.add(account);
emit SignerAdded(account);
emit SignerAdded(account);
}
}
function _removeSigner(address account) internal {
function _removeSigner(address account) internal {
signers.remove(account);
_
signers.remove(account);
emit SignerRemoved(account);
emit SignerRemoved(account);
}
}
}
}
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