SignatureBouncer
contract SignatureBouncer
See the tests Bouncer.test.js for specific usage examples.
Source: access/SignatureBouncer.sol
Reference
Modifiers
onlyValidSignature
modifier onlyValidSignature(bytes _sig)
Requires that a valid signature of a bouncer was provided.
- Parameters:
_sig
- bytes
Functions
addBouncer
function addBouncer(address _bouncer) public
Allows the owner to add additional bouncer addresses.
- Modifiers:
- onlyOwner
- Parameters:
_bouncer
- address
isValidDataHash
function isValidDataHash(bytes32 hash, bytes _sig) internal view returns (bool)
And then recover the signature and check it against the bouncer role.
- Parameters:
hash
- bytes32_sig
- bytes- Returns:
- bool
isValidSignature
function isValidSignature(address _address, bytes _sig) internal view returns (bool)
Is the signature of `this + sender` from a bouncer?.
- Parameters:
_address
- address_sig
- bytes- Returns:
- bool
removeBouncer
function removeBouncer(address _bouncer) public
Allows the owner to remove bouncer addresses.
- Modifiers:
- onlyOwner
- Parameters:
_bouncer
- address