ECRecovery library added with test and docs

This commit is contained in:
Augusto
2017-06-14 15:57:35 -03:00
committed by Francisco Giordano
parent b05fb9c200
commit 4201d50dcf
4 changed files with 153 additions and 0 deletions

View File

@ -0,0 +1,20 @@
pragma solidity ^0.4.11;
import '../../contracts/ECRecovery.sol';
contract ECRecoveryMock {
bool public result;
address public signer;
function safeRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) {
(result, signer) = ECRecovery.safeRecover(hash, v, r, s);
}
function recover(bytes32 hash, bytes sig) {
signer = ECRecovery.recover(hash, sig);
}
}