Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ytham committed Mar 18, 2024
1 parent 58bae01 commit 805d2d6
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions client/test/integration/capacityDataQuery.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 805d2d6

Please sign in to comment.