-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'rbac-migration' of github.com:OpenZeppelin/openzeppelin…
…-solidity into feat/mintable-erc721
- Loading branch information
Showing
78 changed files
with
893 additions
and
1,071 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
pragma solidity ^0.4.24; | ||
|
||
import "./Roles.sol"; | ||
|
||
|
||
contract PauserRole { | ||
using Roles for Roles.Role; | ||
|
||
Roles.Role private pausers; | ||
|
||
constructor() public { | ||
pausers.add(msg.sender); | ||
} | ||
|
||
modifier onlyPauser() { | ||
require(isPauser(msg.sender)); | ||
_; | ||
} | ||
|
||
function isPauser(address _account) public view returns (bool) { | ||
return pausers.has(_account); | ||
} | ||
|
||
function addPauser(address _account) public onlyPauser { | ||
pausers.add(_account); | ||
} | ||
|
||
function renouncePauser() public { | ||
pausers.remove(msg.sender); | ||
} | ||
|
||
function _removePauser(address _account) internal { | ||
pausers.remove(_account); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.