This commit is contained in:
Evgeny Marchenko
2019-06-23 14:59:32 +03:00
parent 18f2db8e91
commit c4da270b1d
2 changed files with 40 additions and 4 deletions

View File

@ -15,9 +15,10 @@ contract VerifierProxy is IVerifier {
// Truffle gives `UnimplementedFeatureError: Encoding struct from calldata is not yet supported.`
// that's why function is public and uses memory location modifier
function isValid(Data memory data, Proof memory proof) public returns (bool) {
bytes memory payload = abi.encodeWithSelector(verifier.verifyTx.selector, proof, data);
(bool success, bytes memory r) = address(verifier).call(payload);
require(success);
return abi.decode(r, (bool));
// bytes memory payload = abi.encodeWithSelector(verifier.verifyTx.selector, proof, data);
// (bool success, bytes memory r) = address(verifier).call(payload);
// require(success);
// return abi.decode(r, (bool));
return verifier.verifyTx(proof.a, proof.b, proof.c, data.input);
}
}