Skip to content

Commit 45931b8

Browse files
committed
fix solidity proof verification
1 parent dee0cfb commit 45931b8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ it("proves and verifies on-chain", async () => {
117117
expect(BigInt(publicInputs[0])).to.eq(BigInt(input.y));
118118

119119
// Verify the proof on-chain
120-
const result = await contract.verify(proof, input.y);
120+
// slice the proof to remove length information
121+
const result = await contract.verify(proof.slice(4), input.y);
121122
expect(result).to.eq(true);
122123

123124
// You can also verify in JavaScript.

test/noir.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ describe("Integration tests examples", function () {
6565
expect(BigInt(publicInputs[0])).to.eq(BigInt(input.y));
6666

6767
// Verify the proof on-chain
68-
const result = await contract.verify(proof, [
68+
const result = await contract.verify(proof.slice(4), [
6969
this.hre.ethers.toBeHex(input.y, 32),
7070
]);
7171
expect(result).to.eq(true);

0 commit comments

Comments
 (0)