-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathValidator_Test.sol
44 lines (36 loc) · 960 Bytes
/
Validator_Test.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
pragma solidity ^0.4.24;
import "./Validator.sol";
/*
* Used to proxy function calls to the Validator for testing
*/
contract Validator_Test {
using Validator for bytes32;
function checkMembership(bytes32 leaf, uint256 index, bytes32 rootHash, bytes proof, uint256 total)
public
pure
returns (bool)
{
return leaf.checkMembership(index, rootHash, proof, total);
}
function checkSigs(bytes32 txHash, bytes32 confirmationHash, bool input1, bytes sig0, bytes sig1, bytes confirmSignatures)
public
pure
returns (bool)
{
return txHash.checkSigs(confirmationHash, input1, sig0, sig1, confirmSignatures);
}
function recover(bytes32 hash, bytes sig)
public
pure
returns (address)
{
return hash.recover(sig);
}
function slice(bytes _bytes, uint start, uint len)
public
pure
returns (bytes)
{
return Validator.slice(_bytes, start, len);
}
}