@@ -17,7 +17,7 @@ import "../cryptography/ECDSA.sol";
1717 * valid addresses on-chain, simply sign a grant of the form
1818 * keccak256(abi.encodePacked(`:contractAddress` + `:granteeAddress`)) using a valid bouncer address.
1919 * Then restrict access to your crowdsale/whitelist/airdrop using the
20- * `onlyValidSignature` modifier (or implement your own using isValidSignature ).
20+ * `onlyValidSignature` modifier (or implement your own using _isValidSignature ).
2121 * In addition to `onlyValidSignature`, `onlyValidSignatureAndMethod` and
2222 * `onlyValidSignatureAndData` can be used to restrict access to only a given method
2323 * or a given method with given parameters respectively.
@@ -42,7 +42,7 @@ contract SignatureBouncer is Ownable, RBAC {
4242 */
4343 modifier onlyValidSignature (bytes _signature )
4444 {
45- require (isValidSignature (msg .sender , _signature));
45+ require (_isValidSignature (msg .sender , _signature));
4646 _;
4747 }
4848
@@ -51,7 +51,7 @@ contract SignatureBouncer is Ownable, RBAC {
5151 */
5252 modifier onlyValidSignatureAndMethod (bytes _signature )
5353 {
54- require (isValidSignatureAndMethod (msg .sender , _signature));
54+ require (_isValidSignatureAndMethod (msg .sender , _signature));
5555 _;
5656 }
5757
@@ -60,7 +60,7 @@ contract SignatureBouncer is Ownable, RBAC {
6060 */
6161 modifier onlyValidSignatureAndData (bytes _signature )
6262 {
63- require (isValidSignatureAndData (msg .sender , _signature));
63+ require (_isValidSignatureAndData (msg .sender , _signature));
6464 _;
6565 }
6666
@@ -72,7 +72,7 @@ contract SignatureBouncer is Ownable, RBAC {
7272 onlyOwner
7373 {
7474 require (_bouncer != address (0 ));
75- addRole (_bouncer, ROLE_BOUNCER);
75+ _addRole (_bouncer, ROLE_BOUNCER);
7676 }
7777
7878 /**
@@ -82,19 +82,19 @@ contract SignatureBouncer is Ownable, RBAC {
8282 public
8383 onlyOwner
8484 {
85- removeRole (_bouncer, ROLE_BOUNCER);
85+ _removeRole (_bouncer, ROLE_BOUNCER);
8686 }
8787
8888 /**
8989 * @dev is the signature of `this + sender` from a bouncer?
9090 * @return bool
9191 */
92- function isValidSignature (address _address , bytes _signature )
92+ function _isValidSignature (address _address , bytes _signature )
9393 internal
9494 view
9595 returns (bool )
9696 {
97- return isValidDataHash (
97+ return _isValidDataHash (
9898 keccak256 (abi.encodePacked (address (this ), _address)),
9999 _signature
100100 );
@@ -104,7 +104,7 @@ contract SignatureBouncer is Ownable, RBAC {
104104 * @dev is the signature of `this + sender + methodId` from a bouncer?
105105 * @return bool
106106 */
107- function isValidSignatureAndMethod (address _address , bytes _signature )
107+ function _isValidSignatureAndMethod (address _address , bytes _signature )
108108 internal
109109 view
110110 returns (bool )
@@ -113,7 +113,7 @@ contract SignatureBouncer is Ownable, RBAC {
113113 for (uint i = 0 ; i < data.length ; i++ ) {
114114 data[i] = msg .data [i];
115115 }
116- return isValidDataHash (
116+ return _isValidDataHash (
117117 keccak256 (abi.encodePacked (address (this ), _address, data)),
118118 _signature
119119 );
@@ -124,7 +124,7 @@ contract SignatureBouncer is Ownable, RBAC {
124124 * @notice the _signature parameter of the method being validated must be the "last" parameter
125125 * @return bool
126126 */
127- function isValidSignatureAndData (address _address , bytes _signature )
127+ function _isValidSignatureAndData (address _address , bytes _signature )
128128 internal
129129 view
130130 returns (bool )
@@ -134,7 +134,7 @@ contract SignatureBouncer is Ownable, RBAC {
134134 for (uint i = 0 ; i < data.length ; i++ ) {
135135 data[i] = msg .data [i];
136136 }
137- return isValidDataHash (
137+ return _isValidDataHash (
138138 keccak256 (abi.encodePacked (address (this ), _address, data)),
139139 _signature
140140 );
@@ -145,7 +145,7 @@ contract SignatureBouncer is Ownable, RBAC {
145145 * and then recover the signature and check it against the bouncer role
146146 * @return bool
147147 */
148- function isValidDataHash (bytes32 _hash , bytes _signature )
148+ function _isValidDataHash (bytes32 _hash , bytes _signature )
149149 internal
150150 view
151151 returns (bool )
0 commit comments