Skip to content

Commit

Permalink
Updated name in ZKTypeConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
KyrylR committed Nov 5, 2024
1 parent 8d90f38 commit f9bb576
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { ZKTypeConfig } from "./types";
export const defaultCircuitArtifactGeneratorConfig: ZKTypeConfig = {
basePath: "circuits",
projectRoot: process.cwd(),
circuitsArtifactsPaths: [],
circuitsArtifacts: [],
outputTypesDir: "generated-types/circuits",
};
2 changes: 1 addition & 1 deletion src/core/CircuitTypesGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ export class CircuitTypesGenerator extends ZkitTSGenerator {
private _fetchCircuitArtifacts(): CircuitArtifact[] {
const artifacts: CircuitArtifact[] = [];

for (const file of this._zktypeConfig.circuitsArtifactsPaths) {
for (const file of this._zktypeConfig.circuitsArtifacts) {
const filePath = file.artifactPath.toString();

if (!path.extname(filePath) || !path.extname(filePath).includes(".json")) {
Expand Down
2 changes: 1 addition & 1 deletion src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface ZKTypeConfig {
/**
* An array of object containing the path to the circuit artifact and the protocol type of the circuit.
*/
circuitsArtifactsPaths: CircuitArtifactData[];
circuitsArtifacts: CircuitArtifactData[];

/**
* The absolute path to the root directory of the project.
Expand Down
2 changes: 1 addition & 1 deletion test/CircuitProofGeneration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe("Circuit Proof Generation", function () {
const circuitTypesGenerator = new CircuitTypesGenerator({
basePath: "test/fixture",
projectRoot: findProjectRoot(process.cwd()),
circuitsArtifactsPaths: [
circuitsArtifacts: [
{
artifactPath: "test/fixture-cache/auth/EnhancedMultiplier_artifacts.json",
circuitProtocolType: ["groth16"],
Expand Down
2 changes: 1 addition & 1 deletion test/CircuitTypesGenerator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe("Circuit Types Generation", function () {
const circuitTypesGenerator = new CircuitTypesGenerator({
basePath: "circuits/fixture",
projectRoot: findProjectRoot(process.cwd()),
circuitsArtifactsPaths: [
circuitsArtifacts: [
{
artifactPath: "test/fixture-cache/auth/EnhancedMultiplier_artifacts.json",
circuitProtocolType: ["groth16"],
Expand Down
4 changes: 2 additions & 2 deletions test/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { findProjectRoot } from "../../src/utils";
const circuitTypesGenerator = new CircuitTypesGenerator({
basePath: "circuits/fixture",
projectRoot: findProjectRoot(process.cwd()),
circuitsArtifactsPaths: [
circuitsArtifacts: [
{
artifactPath: "test/fixture-cache/auth/EnhancedMultiplier_artifacts.json",
circuitProtocolType: ["groth16"],
Expand Down Expand Up @@ -32,4 +32,4 @@ const circuitTypesGenerator = new CircuitTypesGenerator({
],
});

circuitTypesGenerator.generateTypes().then(console.log).catch(console.error);
// circuitTypesGenerator.generateTypes().then(console.log).catch(console.error);

0 comments on commit f9bb576

Please sign in to comment.