|
1 | 1 | // tslint:disable-next-line no-implicit-dependencies |
2 | | -import { UltraPlonkBackend } from "@aztec/bb.js"; |
3 | 2 | import { assert, expect } from "chai"; |
4 | 3 | import fs from "fs"; |
5 | 4 | import { TASK_CLEAN, TASK_COMPILE } from "hardhat/builtin-tasks/task-names"; |
@@ -78,40 +77,6 @@ describe("Integration tests examples", function () { |
78 | 77 | ); |
79 | 78 | expect(resultJs).to.eq(true); |
80 | 79 | }); |
81 | | - |
82 | | - it("proves and verifies on-chain ultra_plonk", async function () { |
83 | | - await this.hre.run("compile"); |
84 | | - |
85 | | - // Deploy a verifier contract |
86 | | - const contractFactory = |
87 | | - await this.hre.ethers.getContractFactory("UltraVerifier"); |
88 | | - const contract = await contractFactory.deploy(); |
89 | | - await contract.waitForDeployment(); |
90 | | - |
91 | | - // Generate a proof |
92 | | - const { noir, backend } = await this.hre.noir.getCircuit( |
93 | | - "my_circuit", |
94 | | - UltraPlonkBackend, |
95 | | - ); |
96 | | - const input = { x: 1, y: 2 }; |
97 | | - const { witness } = await noir.execute(input); |
98 | | - const { proof, publicInputs } = await backend.generateProof(witness); |
99 | | - // it matches because we marked y as `pub` in `main.nr` |
100 | | - expect(BigInt(publicInputs[0])).to.eq(BigInt(input.y)); |
101 | | - |
102 | | - // Verify the proof on-chain |
103 | | - const result = await contract.verify(proof, [ |
104 | | - this.hre.ethers.toBeHex(input.y, 32), |
105 | | - ]); |
106 | | - expect(result).to.eq(true); |
107 | | - |
108 | | - // You can also verify in JavaScript. |
109 | | - const resultJs = await backend.verifyProof({ |
110 | | - proof, |
111 | | - publicInputs: [String(input.y)], |
112 | | - }); |
113 | | - expect(resultJs).to.eq(true); |
114 | | - }); |
115 | 80 | }); |
116 | 81 |
|
117 | 82 | describe("HardhatConfig extension", function () { |
|
0 commit comments