Skip to content

Commit

Permalink
fix(contracts): ensure we call setMaci when deploying semaphoreGateke…
Browse files Browse the repository at this point in the history
…eper (#1647)
  • Loading branch information
ctrlc03 authored Jul 15, 2024
1 parent a48a53f commit 45ed819
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion contracts/tasks/deploy/maci/08-maci.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import type { EASGatekeeper, GitcoinPassportGatekeeper, ZupassGatekeeper, MACI } from "../../../typechain-types";
import type {
EASGatekeeper,
GitcoinPassportGatekeeper,
ZupassGatekeeper,
MACI,
SemaphoreGatekeeper,
} from "../../../typechain-types";

import { ContractStorage } from "../../helpers/ContractStorage";
import { Deployment } from "../../helpers/Deployment";
Expand Down Expand Up @@ -87,6 +93,14 @@ deployment.deployTask("full:deploy-maci", "Deploy MACI contract").then((task) =>
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<SemaphoreGatekeeper>({
name: EContracts.SemaphoreGatekeeper,
address: gatekeeperContractAddress,
});

const maciInstanceAddress = await maciContract.getAddress();
await gatekeeperContract.setMaciInstance(maciInstanceAddress).then((tx) => tx.wait());
}
Expand Down

0 comments on commit 45ed819

Please sign in to comment.