Skip to content

Commit

Permalink
Rename to Groth16VerifierType
Browse files Browse the repository at this point in the history
  • Loading branch information
Kolezhniuk committed Nov 5, 2024
1 parent b5ee3a2 commit 589a040
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions helpers/DeployHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { MCPaymentProxyModule } from "../ignition/modules/mcPayment";

const SMT_MAX_DEPTH = 64;

export type VerifierType = "mtpV2" | "sigV2" | "v3" | "authV2";
export type Groth16VerifierType = "mtpV2" | "sigV2" | "v3" | "authV2";
export type ValidatorType = "mtpV2" | "sigV2" | "v3" | "authV2";

export class DeployHelper {
Expand Down Expand Up @@ -555,7 +555,7 @@ export class DeployHelper {
return g16Verifier;
}

getGroth16VerifierWrapperName(verifierType: VerifierType): string {
getGroth16VerifierWrapperName(verifierType: Groth16VerifierType): string {
let g16VerifierContractWrapperName;
switch (verifierType) {
case "mtpV2":
Expand All @@ -574,7 +574,7 @@ export class DeployHelper {
return g16VerifierContractWrapperName;
}

getGroth16VerifierWrapperVerification(verifierType: VerifierType): {
getGroth16VerifierWrapperVerification(verifierType: Groth16VerifierType): {
contract: string;
constructorArgsImplementation: any[];
constructorArgsProxy?: any[];
Expand Down Expand Up @@ -622,7 +622,7 @@ export class DeployHelper {
return verification;
}

async deployGroth16VerifierWrapper(verifierType: VerifierType): Promise<Contract> {
async deployGroth16VerifierWrapper(verifierType: Groth16VerifierType): Promise<Contract> {
const g16VerifierContractWrapperName = this.getGroth16VerifierWrapperName(verifierType);

const groth16VerifierWrapper = await ethers.deployContract(g16VerifierContractWrapperName);
Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy/deployValidators.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from "fs";
import path from "path";
import { DeployHelper, VerifierType } from "../../helpers/DeployHelper";
import { DeployHelper, ValidatorType } from "../../helpers/DeployHelper";
import hre from "hardhat";
import { getConfig, getStateContractAddress, verifyContract } from "../../helpers/helperUtils";

Expand All @@ -9,7 +9,7 @@ async function main() {
const chainId = hre.network.config.chainId;

const stateContractAddress = getStateContractAddress();
const validators: VerifierType[] = ["mtpV2", "sigV2", "v3", "authV2"];
const validators: ValidatorType[] = ["mtpV2", "sigV2", "v3", "authV2"];

const deployStrategy: "basic" | "create2" =
config.deployStrategy == "create2" ? "create2" : "basic";
Expand Down
4 changes: 2 additions & 2 deletions scripts/upgrade/verifiers/helpers/testVerifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import {
} from "@0xpolygonid/js-sdk";
import { ProofData } from "@iden3/js-jwz";
import { packCrossChainProofs, packZKProof } from "../../../../test/utils/packData";
import { VerifierType } from "../../../../helpers/DeployHelper";
import { Groth16VerifierType } from "../../../../helpers/DeployHelper";

const rhsUrl = "https://rhs-staging.polygonid.me";

Expand Down Expand Up @@ -488,7 +488,7 @@ export async function setZKPRequest_KYCAgeCredential(
requestId: number,
verifier: Contract,
validatorAddress: string,
verifierType: VerifierType,
verifierType: Groth16VerifierType,
provider?: JsonRpcProvider,
) {
console.log(
Expand Down

0 comments on commit 589a040

Please sign in to comment.