Bouncer contract implementation (#883)

* feat: implement bouncer contracts

* fix: rename Bouncer to SignatureBouncer
This commit is contained in:
Matt Condon
2018-04-17 11:36:24 -03:00
committed by GitHub
parent 0926729c8f
commit 6a7114fdb4
8 changed files with 322 additions and 29 deletions

View File

@ -7,10 +7,19 @@ import "../ECRecovery.sol";
contract ECRecoveryMock {
using ECRecovery for bytes32;
address public addrRecovered;
function recover(bytes32 hash, bytes sig) public returns (address) {
addrRecovered = hash.recover(sig);
function recover(bytes32 hash, bytes sig)
public
pure
returns (address)
{
return hash.recover(sig);
}
function toEthSignedMessageHash(bytes32 hash)
public
pure
returns (bytes32)
{
return hash.toEthSignedMessageHash();
}
}