add verifyProof overload that accepts a single array of snark proof params
This commit is contained in:
parent
f2e5bc56b3
commit
8415055588
|
@ -220,4 +220,11 @@ contract Verifier {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function verifyProof(uint[8] memory proof, uint[<%vk_input_length%>] memory inputs) public view returns (bool r) {
|
||||||
|
return verifyProof(
|
||||||
|
[proof[0], proof[1]],
|
||||||
|
[[proof[2], proof[3]], [proof[4], proof[5]]],
|
||||||
|
[proof[6], proof[7]],
|
||||||
|
inputs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -211,4 +211,11 @@ contract Verifier {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function verifyProof(uint[8] memory proof, uint[<%vk_input_length%>] memory inputs) public view returns (bool r) {
|
||||||
|
return verifyProof(
|
||||||
|
[proof[0], proof[1]],
|
||||||
|
[[proof[2], proof[3]], [proof[4], proof[5]]],
|
||||||
|
[proof[6], proof[7]],
|
||||||
|
inputs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,6 +238,18 @@ contract Verifier {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function verifyProof(uint[18] memory proof, uint[<%vk_input_length%>] memory inputs) public view returns (bool r) {
|
||||||
|
return verifyProof(
|
||||||
|
[proof[0], proof[1]],
|
||||||
|
[proof[2], proof[3]],
|
||||||
|
[[proof[4], proof[5]], [proof[6], proof[7]]],
|
||||||
|
[proof[8], proof[9]],
|
||||||
|
[proof[10], proof[11]],
|
||||||
|
[proof[12], proof[13]],
|
||||||
|
[proof[14], proof[15]],
|
||||||
|
[proof[16], proof[17]],
|
||||||
|
inputs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue