mirror of
https://github.com/fluencelabs/lazy-snark
synced 2025-06-12 22:41:26 +00:00
Merge branch 'master' of https://github.com/smartkek/lazy-snark into fusking-truffle
This commit is contained in:
@ -36,7 +36,7 @@ contract Lazy is Structs {
|
||||
function submit(Data calldata data, Proof calldata proof) external payable {
|
||||
require(msg.value == stake);
|
||||
|
||||
Task memory task = Task(data, proof, msg.sender, uint96(now), Status.UNCHECKED);
|
||||
Task memory task = Task(data, proof, msg.sender, now, Status.UNCHECKED);
|
||||
uint index = tasks.push(task);
|
||||
|
||||
emit Submitted(msg.sender, index, task);
|
||||
|
@ -15,9 +15,9 @@ 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);
|
||||
bytes memory payload = abi.encodeWithSelector(verifier.verifyTx.selector, proof.a, proof.b, proof.c, data.input);
|
||||
(bool success, bytes memory r) = address(verifier).call(payload);
|
||||
require(success);
|
||||
return abi.decode(r, (bool));
|
||||
return success && abi.decode(r, (bool));
|
||||
// return verifier.verifyTx(proof.a, proof.b, proof.c, data.input);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user