diff --git a/packages/contracts/tasks/deploy/maci/08-maci.ts b/packages/contracts/tasks/deploy/maci/08-maci.ts index 2b6faa867..81d687775 100644 --- a/packages/contracts/tasks/deploy/maci/08-maci.ts +++ b/packages/contracts/tasks/deploy/maci/08-maci.ts @@ -1,11 +1,4 @@ -import type { - EASGatekeeper, - GitcoinPassportGatekeeper, - ZupassGatekeeper, - MACI, - SemaphoreGatekeeper, - HatsGatekeeperBase, -} from "../../../typechain-types"; +import type { SignUpGatekeeper, MACI } from "../../../typechain-types"; import { genEmptyBallotRoots } from "../../../ts/genEmptyBallotRoots"; import { EDeploySteps } from "../../helpers/constants"; @@ -80,43 +73,11 @@ deployment.deployTask(EDeploySteps.Maci, "Deploy MACI contract").then((task) => emptyBallotRoots, ); - if (gatekeeper === EContracts.EASGatekeeper) { - const gatekeeperContract = await deployment.getContract({ - name: EContracts.EASGatekeeper, + if (gatekeeper !== EContracts.FreeForAllGatekeeper) { + const gatekeeperContract = await deployment.getContract({ + name: EContracts.SignUpGatekeeper, address: gatekeeperContractAddress, }); - const maciInstanceAddress = await maciContract.getAddress(); - - await gatekeeperContract.setMaciInstance(maciInstanceAddress).then((tx) => tx.wait()); - } else if (gatekeeper === EContracts.GitcoinPassportGatekeeper) { - const gatekeeperContract = await deployment.getContract({ - name: EContracts.GitcoinPassportGatekeeper, - address: gatekeeperContractAddress, - }); - const maciInstanceAddress = await maciContract.getAddress(); - - await gatekeeperContract.setMaciInstance(maciInstanceAddress).then((tx) => tx.wait()); - } else if (gatekeeper === EContracts.ZupassGatekeeper) { - const gatekeeperContract = await deployment.getContract({ - name: EContracts.ZupassGatekeeper, - address: gatekeeperContractAddress, - }); - const maciInstanceAddress = await maciContract.getAddress(); - await gatekeeperContract.setMaciInstance(maciInstanceAddress).then((tx) => tx.wait()); - } else if (gatekeeper === EContracts.SemaphoreGatekeeper) { - const gatekeeperContract = await deployment.getContract({ - name: EContracts.SemaphoreGatekeeper, - address: gatekeeperContractAddress, - }); - - const maciInstanceAddress = await maciContract.getAddress(); - await gatekeeperContract.setMaciInstance(maciInstanceAddress).then((tx) => tx.wait()); - } else if (gatekeeper === EContracts.HatsGatekeeper) { - const gatekeeperContract = await deployment.getContract({ - name: EContracts.HatsGatekeeper, - address: gatekeeperContractAddress, - }); - const maciInstanceAddress = await maciContract.getAddress(); await gatekeeperContract.setMaciInstance(maciInstanceAddress).then((tx) => tx.wait()); } diff --git a/packages/contracts/tasks/helpers/types.ts b/packages/contracts/tasks/helpers/types.ts index 9808243f8..6aba45d5d 100644 --- a/packages/contracts/tasks/helpers/types.ts +++ b/packages/contracts/tasks/helpers/types.ts @@ -548,6 +548,7 @@ export enum EGatekeepers { Zupass = "ZupassGatekeeper", Semaphore = "SemaphoreGatekeeper", MerkleProof = "MerkleProofGatekeeper", + SignUp = "SignUpGatekeeper", } /** @@ -572,6 +573,7 @@ export enum EContracts { ZupassGroth16Verifier = "ZupassGroth16Verifier", SemaphoreGatekeeper = "SemaphoreGatekeeper", MerkleProofGatekeeper = "MerkleProofGatekeeper", + SignUpGatekeeper = "SignUpGatekeeper", Verifier = "Verifier", MACI = "MACI", StateAq = "StateAq",