generated from scaffold-eth/scaffold-eth-2
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added the finalization scripts also in the maci-wrapper
- Loading branch information
1 parent
fa5437a
commit 1434aae
Showing
8 changed files
with
819 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,13 +79,9 @@ yarn start | |
|
||
7. **Compute Results** | ||
|
||
- In a fourth terminal, clone the maci repo - `git clone [email protected]:privacy-scaling-explorations/maci.git` | ||
- Copy the zkeys generated from the maci wrapper repo to the cli directory of the maci repo using `cp -r maci-wrapper/packages/hardhat/zkeys maci/packages/cli`. | ||
- Install the dependencies using `pnpm i` and build the maci project using `pnpm run build` | ||
- Copy the new contract addresses from the maci wrapper repo to the maci repo using `cp -r maci-wrapper/packages/hardhat/contractAddresses.json maci/packages/cli/build/contractAddresses.json`. You can also copy the `deployed-contracts.json`file from the maci wrapper repo to the maci repo `cp maci-wrapper/packages/hardhat/deployed-contracts.json maci/packages/contracts/deployed-contracts.json`. | ||
- Inside the MACI repo folder, run `cp packages/contracts/deploy-config-example.json packages/contracts/deploy-config.json` | ||
- After this you should be able to run the commands written in the [maci documentation](https://maci.pse.dev/docs/quick-start/poll-finalization). | ||
- First merge signups, then merge messages, and then generate proof, and upload the tally.json file which is generated in the process to the admin panel after the poll is over. | ||
- Update `packages/hardhat/deploy-config.json` file, select the network, and in the `Poll` object, update `coordinatorPubkey` to the coordinator public key in the `packages/hardhat/coordinatorKeyPair.json`, and update `useQuadraticVoting` if you want to compute results for a non quadratic vote. | ||
- Merge the poll, using `yarn hardhat merge --poll {poll id}` | ||
- Generate proof, using `yarn hardhat prove --poll {poll id} --output-dir {proof ouput dir} --coordinator-private-key {coordinator private key} --tally-file {tally output file}` | ||
|
||
Navigate to `http://localhost:3000` to interact with your dApp. Modify your app configuration in `packages/nextjs/scaffold.config.ts` and `packages/hardhat/constants.ts` as necessary. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,8 @@ | |
"precommit": "lint-staged", | ||
"vercel": "yarn workspace @se-2/nextjs vercel", | ||
"vercel:yolo": "yarn workspace @se-2/nextjs vercel:yolo", | ||
"download-zkeys": "yarn workspace @se-2/hardhat download-zkeys" | ||
"download-zkeys": "yarn workspace @se-2/hardhat download-zkeys", | ||
"hardhat": "yarn workspace @se-2/hardhat hardhat" | ||
}, | ||
"packageManager": "[email protected]", | ||
"devDependencies": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.