-
Notifications
You must be signed in to change notification settings - Fork 11.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove RBAC, SignatureBouncer refactor (#1289)
* Added CapperRole. * RefundEscrow is now Secondary. * FinalizableCrowdsale is no longer Ownable. * Removed Whitelist and WhitelistedCrowdsale, redesign needed. * Fixed linter errors, disabled lbrace due to it being buggy. * Moved SignatureBouncer tests. * Deleted RBAC and Superuser. * Deleted rbac directory. * Updated readme. * SignatureBouncer now uses SignerRole, renamed bouncer to signer.
- Loading branch information
Showing
37 changed files
with
327 additions
and
772 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
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
contracts/access/rbac/CapperRole.sol → contracts/access/roles/CapperRole.sol
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
pragma solidity ^0.4.24; | ||
|
||
import "./Roles.sol"; | ||
import "../Roles.sol"; | ||
|
||
|
||
contract CapperRole { | ||
|
2 changes: 1 addition & 1 deletion
2
contracts/access/rbac/MinterRole.sol → contracts/access/roles/MinterRole.sol
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
pragma solidity ^0.4.24; | ||
|
||
import "./Roles.sol"; | ||
import "../Roles.sol"; | ||
|
||
|
||
contract MinterRole { | ||
|
2 changes: 1 addition & 1 deletion
2
contracts/access/rbac/PauserRole.sol → contracts/access/roles/PauserRole.sol
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
pragma solidity ^0.4.24; | ||
|
||
import "./Roles.sol"; | ||
import "../Roles.sol"; | ||
|
||
|
||
contract PauserRole { | ||
|
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 SignerRole { | ||
using Roles for Roles.Role; | ||
|
||
Roles.Role private signers; | ||
|
||
constructor() public { | ||
signers.add(msg.sender); | ||
} | ||
|
||
modifier onlySigner() { | ||
require(isSigner(msg.sender)); | ||
_; | ||
} | ||
|
||
function isSigner(address _account) public view returns (bool) { | ||
return signers.has(_account); | ||
} | ||
|
||
function addSigner(address _account) public onlySigner { | ||
signers.add(_account); | ||
} | ||
|
||
function renounceSigner() public { | ||
signers.remove(msg.sender); | ||
} | ||
|
||
function _removeSigner(address _account) internal { | ||
signers.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
Oops, something went wrong.