From 805d2d6868722262e2814c0516d3a6f328592963 Mon Sep 17 00:00:00 2001 From: Yu Jiang Tham Date: Mon, 18 Mar 2024 14:41:22 -0400 Subject: [PATCH] Update tests --- .../integration/capacityDataQuery.test.ts | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/client/test/integration/capacityDataQuery.test.ts b/client/test/integration/capacityDataQuery.test.ts index 04c6e5d2..00c52af1 100644 --- a/client/test/integration/capacityDataQuery.test.ts +++ b/client/test/integration/capacityDataQuery.test.ts @@ -2,43 +2,43 @@ import { Axiom } from "../../src"; import { generateCircuit } from "./circuitTest"; describe("On-chain Data Query scenarios", () => { - // test("Send one of each DataQuery", async () => { - // const { circuit, compiledCircuit, inputs } = await generateCircuit("capacityDataQuery/oneOfEach"); + test("Send one of each DataQuery", async () => { + const { circuit, compiledCircuit, inputs } = await generateCircuit("capacityDataQuery/oneOfEach"); - // const axiom = new Axiom({ - // circuit, - // compiledCircuit, - // chainId: "11155111", // Sepolia - // provider: process.env.PROVIDER_URI_SEPOLIA as string, - // privateKey: process.env.PRIVATE_KEY_SEPOLIA as string, - // callback: { - // target: "0x4A4e2D8f3fBb3525aD61db7Fc843c9bf097c362e", - // }, - // }); - // await axiom.init(); - // await axiom.prove(inputs); - // const receipt = await axiom.sendQuery(); - // expect(receipt.status).toBe('success'); - // }, 90000); + const axiom = new Axiom({ + circuit, + compiledCircuit, + chainId: "11155111", // Sepolia + provider: process.env.PROVIDER_URI_SEPOLIA as string, + privateKey: process.env.PRIVATE_KEY_SEPOLIA as string, + callback: { + target: "0x4A4e2D8f3fBb3525aD61db7Fc843c9bf097c362e", + }, + }); + await axiom.init(); + await axiom.prove(inputs); + const receipt = await axiom.sendQuery(); + expect(receipt.status).toBe('success'); + }, 90000); - // test("Send a size-128 header DataQuery", async () => { - // const { circuit, compiledCircuit, inputs } = await generateCircuit("capacityDataQuery/size128Header"); + test("Send a size-128 header DataQuery", async () => { + const { circuit, compiledCircuit, inputs } = await generateCircuit("capacityDataQuery/size128Header"); - // const axiom = new Axiom({ - // circuit, - // compiledCircuit, - // chainId: "11155111", // Sepolia - // provider: process.env.PROVIDER_URI_SEPOLIA as string, - // privateKey: process.env.PRIVATE_KEY_SEPOLIA as string, - // callback: { - // target: "0x4A4e2D8f3fBb3525aD61db7Fc843c9bf097c362e", - // }, - // }); - // await axiom.init(); - // await axiom.prove(inputs); - // const receipt = await axiom.sendQuery(); - // expect(receipt.status).toBe('success'); - // }, 180000); + const axiom = new Axiom({ + circuit, + compiledCircuit, + chainId: "11155111", // Sepolia + provider: process.env.PROVIDER_URI_SEPOLIA as string, + privateKey: process.env.PRIVATE_KEY_SEPOLIA as string, + callback: { + target: "0x4A4e2D8f3fBb3525aD61db7Fc843c9bf097c362e", + }, + }); + await axiom.init(); + await axiom.prove(inputs); + const receipt = await axiom.sendQuery(); + expect(receipt.status).toBe('success'); + }, 180000); test("256-capacity query", async () => { const { circuit, compiledCircuit, inputs } = await generateCircuit("capacityDataQuery/size256Header");