@maci-protocol/website 0.0.0-ci.1e276ed
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +157 -0
- package/CHANGELOG.md +566 -0
- package/LICENSE +22 -0
- package/README.md +58 -0
- package/babel.config.js +3 -0
- package/blog/2021-10-12-maci-v1.md +100 -0
- package/blog/2022-09-22-maci-v1-technical-introduction.md +180 -0
- package/blog/2023-01-18-maci-v1.1.1.md +121 -0
- package/blog/2024-01-18-roadmap.md +106 -0
- package/blog/2024-02-28-maci-v1.2.0.md +121 -0
- package/blog/2024-04-10-roadmap-q2.md +96 -0
- package/blog/2024-05-08-ethdam.md +169 -0
- package/blog/2024-05-22-the-origins-of-maci.md +38 -0
- package/blog/2024-05-28-upcoming-grants.md +85 -0
- package/blog/2024-06-17-understanding-maci.md +63 -0
- package/blog/2024-06-21-deciphering-maci.md +48 -0
- package/blog/2024-06-28-revolusioning-public-goods-funding.md +32 -0
- package/blog/2024-07-23-q2-review.md +72 -0
- package/blog/2024-07-30-roadmap-q3.md +61 -0
- package/blog/2024-08-10-maci-v2.md +102 -0
- package/blog/2024-08-29-anonymous-poll-joining.md +47 -0
- package/blog/2024-10-29-q3-review.md +63 -0
- package/blog/2024-11-20-maci-platform.md +93 -0
- package/blog/2024-12-01-maci-getting-started.md +294 -0
- package/blog/2025-03-21-roadmap-2025.md +112 -0
- package/blog/assets/MACI_Bob_SignUp_1.png +0 -0
- package/blog/assets/MACI_Bob_SignUp_2.png +0 -0
- package/blog/assets/MACI_Complex_Message.png +0 -0
- package/blog/assets/MACI_Contracts.png +0 -0
- package/blog/assets/MACI_Sign_Up.png +0 -0
- package/blog/assets/MACI_Simple_Message.png +0 -0
- package/blog/assets/MACI_Verifier_1.png +0 -0
- package/blog/authors.yml +5 -0
- package/docusaurus.config.ts +213 -0
- package/package.json +65 -0
- package/src/components/ActionCard/index.tsx +30 -0
- package/src/components/ActionCard/styles.module.css +96 -0
- package/src/components/HomepageFeatures/index.tsx +91 -0
- package/src/components/HomepageFeatures/styles.module.css +17 -0
- package/src/components/ProjectCard/index.tsx +74 -0
- package/src/components/ProjectCard/styles.module.css +77 -0
- package/src/components/ProjectList/index.tsx +218 -0
- package/src/components/ProjectList/styles.module.css +180 -0
- package/src/content/projects.json +294 -0
- package/src/css/card.module.css +130 -0
- package/src/css/custom.css +91 -0
- package/src/icons/IconDiscord.tsx +16 -0
- package/src/icons/IconGithub.tsx +16 -0
- package/src/icons/IconWebsite.tsx +16 -0
- package/src/pages/blogs.tsx +58 -0
- package/src/pages/index.module.css +152 -0
- package/src/pages/index.tsx +66 -0
- package/src/pages/projects.tsx +44 -0
- package/src/pages/roadmap.md +150 -0
- package/src/pages/typedoc.tsx +11 -0
- package/src/plugins/blog-plugin/index.ts +86 -0
- package/src/react-app-env.d.ts +1 -0
- package/src/scripts/setupSolidityDocs.ts +67 -0
- package/src/scripts/setupTypedoc.ts +112 -0
- package/src/scripts/utils.ts +115 -0
- package/src/utils/getProjectsByFilter.ts +40 -0
- package/static/.nojekyll +0 -0
- package/static/audit_reports/20210922_Hashcloak_audit_report.pdf +0 -0
- package/static/audit_reports/202220930_Hashcloak_audit_report.pdf +0 -0
- package/static/audit_reports/20240223_PSE_Audit_audit_report.pdf +0 -0
- package/static/audit_reports/20240731_PSE_Audit_audit_report.pdf +0 -0
- package/static/fonts/DM_Sans.woff2 +0 -0
- package/static/fonts/Share_Tech_Mono.woff2 +0 -0
- package/static/img/box.png +0 -0
- package/static/img/box_dark.png +0 -0
- package/static/img/chain.png +0 -0
- package/static/img/chain_dark.png +0 -0
- package/static/img/chart.png +0 -0
- package/static/img/chart_dark.png +0 -0
- package/static/img/circuits/MACI-Circuits.excalidraw +39652 -0
- package/static/img/circuits/calculateTotal.svg +21 -0
- package/static/img/circuits/ecdh.svg +21 -0
- package/static/img/circuits/messageToCommand.svg +21 -0
- package/static/img/circuits/messageValidator.svg +21 -0
- package/static/img/circuits/poseidonHasher13.svg +21 -0
- package/static/img/circuits/privToPubkey.svg +21 -0
- package/static/img/circuits/processMessages.svg +21 -0
- package/static/img/circuits/processMessagesInputHasher.svg +21 -0
- package/static/img/circuits/processMessages_2_0.svg +21 -0
- package/static/img/circuits/processOne.svg +21 -0
- package/static/img/circuits/processTopup.svg +21 -0
- package/static/img/circuits/processingAfterPollEnds.svg +21 -0
- package/static/img/circuits/quinBatchLeavesExists.svg +21 -0
- package/static/img/circuits/quinCheckRoot.svg +21 -0
- package/static/img/circuits/quinGeneratePathIndices.svg +21 -0
- package/static/img/circuits/quinSelector.svg +21 -0
- package/static/img/circuits/resultsCommitmentVerifier.svg +21 -0
- package/static/img/circuits/splicer.svg +21 -0
- package/static/img/circuits/tallyInputHasher.svg +21 -0
- package/static/img/circuits/tallyVotes.svg +21 -0
- package/static/img/circuits/unpackElement.svg +21 -0
- package/static/img/circuits/verifySignature.svg +21 -0
- package/static/img/completingAPoll.svg +4 -0
- package/static/img/contracts.svg +16 -0
- package/static/img/coordinatorComponents.svg +21 -0
- package/static/img/favicon.ico +0 -0
- package/static/img/generateProofs.svg +4 -0
- package/static/img/hero.svg +9 -0
- package/static/img/maci-card.png +0 -0
- package/static/img/maci-rpgf-design.jpg +0 -0
- package/static/img/messageProcessingLocal.svg +21 -0
- package/static/img/offlineProcessing.svg +21 -0
- package/static/img/pse-logo-round.png +0 -0
- package/static/img/relayer-diagram.png +0 -0
- package/static/img/tallyCommitments.svg +4 -0
- package/static/img/voteTallyingLocal.svg +21 -0
- package/tsconfig.json +34 -0
- package/versioned_docs/version-v0.x/circuits.md +22 -0
- package/versioned_docs/version-v0.x/contract.md +186 -0
- package/versioned_docs/version-v0.x/faq.md +67 -0
- package/versioned_docs/version-v0.x/introduction.md +119 -0
- package/versioned_docs/version-v0.x/quadratic-vote-tallying-circuit.md +138 -0
- package/versioned_docs/version-v0.x/state-root-transition-circuit.md +230 -0
- package/versioned_docs/version-v1.2/audit.md +160 -0
- package/versioned_docs/version-v1.2/ci-pipeline.md +38 -0
- package/versioned_docs/version-v1.2/circuits.md +508 -0
- package/versioned_docs/version-v1.2/cli.md +689 -0
- package/versioned_docs/version-v1.2/contracts.md +445 -0
- package/versioned_docs/version-v1.2/contributing/code-of-conduct.md +91 -0
- package/versioned_docs/version-v1.2/contributing/contributing.md +129 -0
- package/versioned_docs/version-v1.2/coordinator-processing.md +46 -0
- package/versioned_docs/version-v1.2/deployment.md +122 -0
- package/versioned_docs/version-v1.2/installation.md +175 -0
- package/versioned_docs/version-v1.2/integrating.md +200 -0
- package/versioned_docs/version-v1.2/introduction.md +94 -0
- package/versioned_docs/version-v1.2/key-change.md +182 -0
- package/versioned_docs/version-v1.2/overview.md +47 -0
- package/versioned_docs/version-v1.2/poll-types.md +68 -0
- package/versioned_docs/version-v1.2/primitives.md +216 -0
- package/versioned_docs/version-v1.2/project-ideas.md +14 -0
- package/versioned_docs/version-v1.2/purpose.md +62 -0
- package/versioned_docs/version-v1.2/solidity-docs/MACI.md +345 -0
- package/versioned_docs/version-v1.2/solidity-docs/MessageProcessor.md +266 -0
- package/versioned_docs/version-v1.2/solidity-docs/MessageProcessorFactory.md +26 -0
- package/versioned_docs/version-v1.2/solidity-docs/Poll.md +381 -0
- package/versioned_docs/version-v1.2/solidity-docs/PollFactory.md +50 -0
- package/versioned_docs/version-v1.2/solidity-docs/SignUpToken.md +27 -0
- package/versioned_docs/version-v1.2/solidity-docs/Subsidy.md +218 -0
- package/versioned_docs/version-v1.2/solidity-docs/SubsidyFactory.md +27 -0
- package/versioned_docs/version-v1.2/solidity-docs/Tally.md +311 -0
- package/versioned_docs/version-v1.2/solidity-docs/TallyFactory.md +27 -0
- package/versioned_docs/version-v1.2/solidity-docs/TallyNonQv.md +296 -0
- package/versioned_docs/version-v1.2/solidity-docs/TallyNonQvFactory.md +27 -0
- package/versioned_docs/version-v1.2/solidity-docs/TopupCredit.md +61 -0
- package/versioned_docs/version-v1.2/solidity-docs/VkRegistry.md +457 -0
- package/versioned_docs/version-v1.2/solidity-docs/benchmarks/HasherBenchmarks.md +44 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/Hasher.md +125 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/IVerifier.md +11 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/MockVerifier.md +17 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/Pairing.md +85 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT3.md +9 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT4.md +9 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT5.md +9 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT6.md +9 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/SnarkCommon.md +16 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/SnarkConstants.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/Verifier.md +61 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/EASGatekeeper.md +121 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/FreeForAllSignUpGatekeeper.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/SignUpGatekeeper.md +26 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/SignUpTokenGatekeeper.md +93 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/hatsGatekeepers/HatsGatekeeperBase.md +79 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/hatsGatekeepers/HatsGatekeeperMultiple.md +48 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/hatsGatekeepers/HatsGatekeeperSingle.md +42 -0
- package/versioned_docs/version-v1.2/solidity-docs/index.md +4 -0
- package/versioned_docs/version-v1.2/solidity-docs/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxy.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/initialVoiceCreditProxy/InitialVoiceCreditProxy.md +26 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IEAS.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IHats.md +103 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IMPFactory.md +26 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IMessageProcessor.md +31 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IPoll.md +217 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IPollFactory.md +29 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/ITallyFactory.md +28 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/ITallySubsidyFactory.md +27 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IVerifier.md +25 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IVkRegistry.md +70 -0
- package/versioned_docs/version-v1.2/solidity-docs/mocks/MockHatsProtocol.md +133 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueue.md +464 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueBinary.md +60 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueBinary0.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueBinaryMaci.md +34 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinary.md +75 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinary0.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinaryBlankSl.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinaryMaci.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/EmptyBallotRoots.md +13 -0
- package/versioned_docs/version-v1.2/solidity-docs/utilities/CommonUtilities.md +25 -0
- package/versioned_docs/version-v1.2/solidity-docs/utilities/DomainObjs.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/utilities/Params.md +36 -0
- package/versioned_docs/version-v1.2/solidity-docs/utilities/Utilities.md +79 -0
- package/versioned_docs/version-v1.2/spec.md +944 -0
- package/versioned_docs/version-v1.2/testing-in-detail.md +209 -0
- package/versioned_docs/version-v1.2/testing.md +472 -0
- package/versioned_docs/version-v1.2/topup.md +43 -0
- package/versioned_docs/version-v1.2/troubleshooting.md +51 -0
- package/versioned_docs/version-v1.2/trusted-setup.md +76 -0
- package/versioned_docs/version-v1.2/typedoc/cli/.nojekyll +1 -0
- package/versioned_docs/version-v1.2/typedoc/cli/index.md +15 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/AirdropArgs.md +89 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/DeployArgs.md +154 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/DeployPollArgs.md +154 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/DeployedContracts.md +130 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/GenLocalStateArgs.md +168 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/GenProofsArgs.md +388 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/IGenKeypairArgs.md +37 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/IRegisteredUserArgs.md +63 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/MergeMessagesArgs.md +76 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/MergeSignupsArgs.md +76 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/PollContracts.md +53 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/ProveOnChainArgs.md +128 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/PublishArgs.md +154 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/SignupArgs.md +89 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/SubsidyData.md +73 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/TallyData.md +166 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/TopupArgs.md +89 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/VerifyArgs.md +128 -0
- package/versioned_docs/version-v1.2/typedoc/cli/modules.md +556 -0
- package/versioned_docs/version-v1.2/typedoc/core/.nojekyll +1 -0
- package/versioned_docs/version-v1.2/typedoc/core/classes/MaciState.md +295 -0
- package/versioned_docs/version-v1.2/typedoc/core/classes/Poll.md +1098 -0
- package/versioned_docs/version-v1.2/typedoc/core/index.md +110 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/BatchSizes.md +50 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/IJsonMaciState.md +77 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/IProcessMessagesCircuitInputs.md +242 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/ISubsidyCircuitInputs.md +198 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/ITallyCircuitInputs.md +231 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/MaxValues.md +37 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/TreeDepths.md +63 -0
- package/versioned_docs/version-v1.2/typedoc/core/modules.md +289 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/.nojekyll +1 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/classes/AccQueue.md +770 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/classes/G1Point.md +115 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/classes/G2Point.md +140 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/classes/IncrementalQuinTree.md +470 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/index.md +44 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/Keypair.md +33 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/PoseidonFuncs.md +115 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/Queue.md +33 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/Signature.md +37 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/modules.md +913 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/.nojekyll +1 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/Ballot.md +274 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/Keypair.md +181 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/Message.md +244 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/PCommand.md +409 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/PrivKey.md +206 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/PubKey.md +289 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/StateLeaf.md +340 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/TCommand.md +200 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/VerifyingKey.md +240 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/index.md +81 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/ICommand.md +104 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IG1ContractParams.md +31 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IG2ContractParams.md +31 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonBallot.md +42 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonCommand.md +32 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonKeyPair.md +31 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonPCommand.md +111 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonStateLeaf.md +42 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonTCommand.md +67 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IMessageContractParams.md +31 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IStateLeaf.md +39 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IStateLeafContractParams.md +42 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IVkContractParams.md +64 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IVkObjectParams.md +108 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/Proof.md +46 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/VoteOptionTreeLeaf.md +24 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/modules.md +110 -0
- package/versioned_docs/version-v1.2/typedoc/index.md +4 -0
- package/versioned_docs/version-v1.2/versioning.md +94 -0
- package/versioned_docs/version-v1.2/workflow.md +142 -0
- package/versioned_docs/version-v2.x/case-studies.md +35 -0
- package/versioned_docs/version-v2.x/contributing/_category_.json +4 -0
- package/versioned_docs/version-v2.x/contributing/code-of-conduct.md +92 -0
- package/versioned_docs/version-v2.x/contributing/contributing.md +149 -0
- package/versioned_docs/version-v2.x/contributing/project-ideas.md +78 -0
- package/versioned_docs/version-v2.x/core-concepts/_category_.json +4 -0
- package/versioned_docs/version-v2.x/core-concepts/ballot.md +19 -0
- package/versioned_docs/version-v2.x/core-concepts/coordinator-processing.md +46 -0
- package/versioned_docs/version-v2.x/core-concepts/hashing-and-encryption.md +45 -0
- package/versioned_docs/version-v2.x/core-concepts/key-change.md +179 -0
- package/versioned_docs/version-v2.x/core-concepts/maci-keys.md +84 -0
- package/versioned_docs/version-v2.x/core-concepts/maci-messages.md +44 -0
- package/versioned_docs/version-v2.x/core-concepts/merkle-trees.md +23 -0
- package/versioned_docs/version-v2.x/core-concepts/poll-types.md +106 -0
- package/versioned_docs/version-v2.x/core-concepts/spec.md +883 -0
- package/versioned_docs/version-v2.x/core-concepts/state-leaf.md +42 -0
- package/versioned_docs/version-v2.x/core-concepts/workflow.md +142 -0
- package/versioned_docs/version-v2.x/getting-started.md +313 -0
- package/versioned_docs/version-v2.x/guides/_category_.json +4 -0
- package/versioned_docs/version-v2.x/guides/compile-circuits.md +163 -0
- package/versioned_docs/version-v2.x/guides/frontend.md +99 -0
- package/versioned_docs/version-v2.x/guides/integrating.md +73 -0
- package/versioned_docs/version-v2.x/guides/maciWrapper.md +173 -0
- package/versioned_docs/version-v2.x/guides/subgraph.md +79 -0
- package/versioned_docs/version-v2.x/guides/testing/_category_.json +4 -0
- package/versioned_docs/version-v2.x/guides/testing/testing-in-detail.md +203 -0
- package/versioned_docs/version-v2.x/guides/testing/testing.md +163 -0
- package/versioned_docs/version-v2.x/guides/troubleshooting.md +161 -0
- package/versioned_docs/version-v2.x/introduction.md +146 -0
- package/versioned_docs/version-v2.x/processes/_category_.json +4 -0
- package/versioned_docs/version-v2.x/processes/ci-pipeline.md +38 -0
- package/versioned_docs/version-v2.x/processes/versioning.md +94 -0
- package/versioned_docs/version-v2.x/resources.md +33 -0
- package/versioned_docs/version-v2.x/security/_category_.json +4 -0
- package/versioned_docs/version-v2.x/security/audit.md +167 -0
- package/versioned_docs/version-v2.x/security/trusted-setup.md +166 -0
- package/versioned_docs/version-v2.x/supported-networks/_category_.json +4 -0
- package/versioned_docs/version-v2.x/supported-networks/deployed-contracts.md +1108 -0
- package/versioned_docs/version-v2.x/supported-networks/supported-networks.md +47 -0
- package/versioned_docs/version-v2.x/technical-references/_category_.json +4 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/AccQueue.md +21 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/Gatekeepers.md +40 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/MACI.md +152 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/MessageProcessor.md +13 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/Params.md +32 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/Poll.md +104 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/PollFactory.md +43 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/Tally.md +45 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/VkRegistry.md +57 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/VoiceCreditProxy.md +18 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/_category_.json +8 -0
- package/versioned_docs/version-v2.x/technical-references/technical-references.md +47 -0
- package/versioned_docs/version-v2.x/technical-references/typescript-code/_category_.json +4 -0
- package/versioned_docs/version-v2.x/technical-references/typescript-code/cli.md +699 -0
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/_category_.json +4 -0
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/processMessages.md +107 -0
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/setup.md +101 -0
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/tallyVotes.md +79 -0
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/utilities.md +131 -0
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/zk-snark-circuits.md +37 -0
- package/versioned_docs/version-v2.x/use-cases/_category_.json +4 -0
- package/versioned_docs/version-v2.x/use-cases/governance.md +18 -0
- package/versioned_docs/version-v2.x/use-cases/polling.md +10 -0
- package/versioned_docs/version-v2.x/use-cases/public-goods.md +65 -0
- package/versioned_docs/version-v3.x/case-studies.md +35 -0
- package/versioned_docs/version-v3.x/contributing/_category_.json +4 -0
- package/versioned_docs/version-v3.x/contributing/code-of-conduct.md +92 -0
- package/versioned_docs/version-v3.x/contributing/contributing.md +149 -0
- package/versioned_docs/version-v3.x/contributing/project-ideas.md +78 -0
- package/versioned_docs/version-v3.x/core-concepts/_category_.json +4 -0
- package/versioned_docs/version-v3.x/core-concepts/ballot.md +19 -0
- package/versioned_docs/version-v3.x/core-concepts/coordinator-processing.md +46 -0
- package/versioned_docs/version-v3.x/core-concepts/coordinator-service.md +16 -0
- package/versioned_docs/version-v3.x/core-concepts/hashing-and-encryption.md +45 -0
- package/versioned_docs/version-v3.x/core-concepts/key-change.md +179 -0
- package/versioned_docs/version-v3.x/core-concepts/maci-keys.md +84 -0
- package/versioned_docs/version-v3.x/core-concepts/maci-messages.md +44 -0
- package/versioned_docs/version-v3.x/core-concepts/merkle-trees.md +16 -0
- package/versioned_docs/version-v3.x/core-concepts/offchain-voting.md +14 -0
- package/versioned_docs/version-v3.x/core-concepts/poll-types.md +58 -0
- package/versioned_docs/version-v3.x/core-concepts/polls.md +81 -0
- package/versioned_docs/version-v3.x/core-concepts/spec.md +883 -0
- package/versioned_docs/version-v3.x/core-concepts/state-leaf.md +42 -0
- package/versioned_docs/version-v3.x/core-concepts/workflow.md +149 -0
- package/versioned_docs/version-v3.x/guides/_category_.json +4 -0
- package/versioned_docs/version-v3.x/guides/compile-circuits.md +175 -0
- package/versioned_docs/version-v3.x/guides/integrating.md +137 -0
- package/versioned_docs/version-v3.x/guides/subgraph.md +79 -0
- package/versioned_docs/version-v3.x/guides/testing/_category_.json +4 -0
- package/versioned_docs/version-v3.x/guides/testing/testing-in-detail.md +191 -0
- package/versioned_docs/version-v3.x/guides/testing/testing-introduction.md +158 -0
- package/versioned_docs/version-v3.x/guides/troubleshooting.md +161 -0
- package/versioned_docs/version-v3.x/introduction.md +153 -0
- package/versioned_docs/version-v3.x/processes/_category_.json +4 -0
- package/versioned_docs/version-v3.x/processes/ci-pipeline.md +38 -0
- package/versioned_docs/version-v3.x/processes/versioning.md +94 -0
- package/versioned_docs/version-v3.x/quick-start.md +318 -0
- package/versioned_docs/version-v3.x/resources.md +33 -0
- package/versioned_docs/version-v3.x/security/_category_.json +4 -0
- package/versioned_docs/version-v3.x/security/audit.md +167 -0
- package/versioned_docs/version-v3.x/security/trusted-setup.md +172 -0
- package/versioned_docs/version-v3.x/supported-networks/_category_.json +4 -0
- package/versioned_docs/version-v3.x/supported-networks/deployed-contracts.md +112 -0
- package/versioned_docs/version-v3.x/supported-networks/supported-networks.md +53 -0
- package/versioned_docs/version-v3.x/technical-references/_category_.json +4 -0
- package/versioned_docs/version-v3.x/technical-references/coordinator-service/_category_.json +8 -0
- package/versioned_docs/version-v3.x/technical-references/coordinator-service/index.md +10 -0
- package/versioned_docs/version-v3.x/technical-references/coordinator-service/installation.md +43 -0
- package/versioned_docs/version-v3.x/technical-references/offchain-relayer/_category_.json +8 -0
- package/versioned_docs/version-v3.x/technical-references/offchain-relayer/index.md +51 -0
- package/versioned_docs/version-v3.x/technical-references/offchain-relayer/installation.md +109 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/MACI.md +160 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/MessageProcessor.md +13 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/Params.md +33 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/Policies.md +39 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/Poll.md +170 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/PollFactory.md +33 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/Tally.md +43 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/VkRegistry.md +62 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/VoiceCreditProxy.md +18 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/_category_.json +8 -0
- package/versioned_docs/version-v3.x/technical-references/technical-references.md +48 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/_category_.json +4 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/joinPoll.md +53 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/processMessages.md +106 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/setup.md +96 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/tallyVotes.md +79 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/utilities.md +131 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/zk-snark-circuits.md +42 -0
- package/versioned_docs/version-v3.x/use-cases/_category_.json +4 -0
- package/versioned_docs/version-v3.x/use-cases/governance.md +18 -0
- package/versioned_docs/version-v3.x/use-cases/polling.md +10 -0
- package/versioned_docs/version-v3.x/use-cases/public-goods.md +65 -0
- package/versioned_sidebars/version-v0.x-sidebars.json +8 -0
- package/versioned_sidebars/version-v1.2-sidebars.json +8 -0
- package/versioned_sidebars/version-v2.x-sidebars.json +8 -0
- package/versioned_sidebars/version-v3.x-sidebars.json +8 -0
- package/versions.json +1 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# ConstantInitialVoiceCreditProxy
|
|
2
|
+
|
|
3
|
+
This contract allows to set a constant initial voice credit balance
|
|
4
|
+
for MACI's voters.
|
|
5
|
+
|
|
6
|
+
### balance
|
|
7
|
+
|
|
8
|
+
```solidity
|
|
9
|
+
uint256 balance
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
the balance to be returned by getVoiceCredits
|
|
13
|
+
|
|
14
|
+
### constructor
|
|
15
|
+
|
|
16
|
+
```solidity
|
|
17
|
+
constructor(uint256 _balance) public payable
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
creates a new ConstantInitialVoiceCreditProxy
|
|
21
|
+
|
|
22
|
+
#### Parameters
|
|
23
|
+
|
|
24
|
+
| Name | Type | Description |
|
|
25
|
+
| --------- | ------- | --------------------------------------------- |
|
|
26
|
+
| \_balance | uint256 | the balance to be returned by getVoiceCredits |
|
|
27
|
+
|
|
28
|
+
### getVoiceCredits
|
|
29
|
+
|
|
30
|
+
```solidity
|
|
31
|
+
function getVoiceCredits(address, bytes) public view returns (uint256)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Returns the constant balance for any new MACI's voter
|
|
35
|
+
|
|
36
|
+
#### Return Values
|
|
37
|
+
|
|
38
|
+
| Name | Type | Description |
|
|
39
|
+
| ---- | ------- | ----------- |
|
|
40
|
+
| [0] | uint256 | balance |
|
package/versioned_docs/version-v1.2/solidity-docs/initialVoiceCreditProxy/InitialVoiceCreditProxy.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# InitialVoiceCreditProxy
|
|
2
|
+
|
|
3
|
+
This contract is the base contract for
|
|
4
|
+
InitialVoiceCreditProxy contracts. It allows to set a custom initial voice
|
|
5
|
+
credit balance for MACI's voters.
|
|
6
|
+
|
|
7
|
+
### getVoiceCredits
|
|
8
|
+
|
|
9
|
+
```solidity
|
|
10
|
+
function getVoiceCredits(address _user, bytes _data) public view virtual returns (uint256)
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Returns the initial voice credit balance for a new MACI's voter
|
|
14
|
+
|
|
15
|
+
#### Parameters
|
|
16
|
+
|
|
17
|
+
| Name | Type | Description |
|
|
18
|
+
| ------ | ------- | ------------------------ |
|
|
19
|
+
| \_user | address | the address of the voter |
|
|
20
|
+
| \_data | bytes | additional data |
|
|
21
|
+
|
|
22
|
+
#### Return Values
|
|
23
|
+
|
|
24
|
+
| Name | Type | Description |
|
|
25
|
+
| ---- | ------- | ----------- |
|
|
26
|
+
| [0] | uint256 | the balance |
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# IEAS
|
|
2
|
+
|
|
3
|
+
An interface to the EAS contract.
|
|
4
|
+
|
|
5
|
+
### Attestation
|
|
6
|
+
|
|
7
|
+
```solidity
|
|
8
|
+
struct Attestation {
|
|
9
|
+
bytes32 uid;
|
|
10
|
+
bytes32 schema;
|
|
11
|
+
uint64 time;
|
|
12
|
+
uint64 expirationTime;
|
|
13
|
+
uint64 revocationTime;
|
|
14
|
+
bytes32 refUID;
|
|
15
|
+
address recipient;
|
|
16
|
+
address attester;
|
|
17
|
+
bool revocable;
|
|
18
|
+
bytes data;
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### getAttestation
|
|
23
|
+
|
|
24
|
+
```solidity
|
|
25
|
+
function getAttestation(bytes32 uid) external view returns (struct IEAS.Attestation)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Get an attestation by its unique identifier.
|
|
29
|
+
|
|
30
|
+
#### Parameters
|
|
31
|
+
|
|
32
|
+
| Name | Type | Description |
|
|
33
|
+
| ---- | ------- | ----------------------------------------- |
|
|
34
|
+
| uid | bytes32 | The unique identifier of the attestation. |
|
|
35
|
+
|
|
36
|
+
#### Return Values
|
|
37
|
+
|
|
38
|
+
| Name | Type | Description |
|
|
39
|
+
| ---- | ----------------------- | ---------------------------- |
|
|
40
|
+
| [0] | struct IEAS.Attestation | attestation The attestation. |
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# IHats
|
|
2
|
+
|
|
3
|
+
Minimal interface for the Hats Protocol contract
|
|
4
|
+
|
|
5
|
+
_Includes only the functions required for the HatsGatekeepers and associated tests_
|
|
6
|
+
|
|
7
|
+
### mintTopHat
|
|
8
|
+
|
|
9
|
+
```solidity
|
|
10
|
+
function mintTopHat(address _target, string _details, string _imageURI) external returns (uint256)
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Creates and mints a Hat that is its own admin, i.e. a "topHat"
|
|
14
|
+
|
|
15
|
+
_A topHat has no eligibility and no toggle_
|
|
16
|
+
|
|
17
|
+
#### Parameters
|
|
18
|
+
|
|
19
|
+
| Name | Type | Description |
|
|
20
|
+
| ---------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| \_target | address | The address to which the newly created topHat is minted |
|
|
22
|
+
| \_details | string | A description of the Hat [optional]. Should not be larger than 7000 bytes (enforced in changeHatDetails) |
|
|
23
|
+
| \_imageURI | string | The image uri for this top hat and the fallback for its downstream hats [optional]. Should not be larger than 7000 bytes (enforced in changeHatImageURI) |
|
|
24
|
+
|
|
25
|
+
#### Return Values
|
|
26
|
+
|
|
27
|
+
| Name | Type | Description |
|
|
28
|
+
| ---- | ------- | ------------------------------------------- |
|
|
29
|
+
| [0] | uint256 | topHatId The id of the newly created topHat |
|
|
30
|
+
|
|
31
|
+
### createHat
|
|
32
|
+
|
|
33
|
+
```solidity
|
|
34
|
+
function createHat(uint256 _admin, string _details, uint32 _maxSupply, address _eligibility, address _toggle, bool _mutable, string _imageURI) external returns (uint256)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Creates a new hat. The msg.sender must wear the `_admin` hat.
|
|
38
|
+
|
|
39
|
+
_Initializes a new Hat struct, but does not mint any tokens._
|
|
40
|
+
|
|
41
|
+
#### Parameters
|
|
42
|
+
|
|
43
|
+
| Name | Type | Description |
|
|
44
|
+
| ------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
45
|
+
| \_admin | uint256 | The id of the Hat that will control who wears the newly created hat |
|
|
46
|
+
| \_details | string | A description of the Hat. Should not be larger than 7000 bytes (enforced in changeHatDetails) |
|
|
47
|
+
| \_maxSupply | uint32 | The total instances of the Hat that can be worn at once |
|
|
48
|
+
| \_eligibility | address | The address that can report on the Hat wearer's status |
|
|
49
|
+
| \_toggle | address | The address that can deactivate the Hat |
|
|
50
|
+
| \_mutable | bool | Whether the hat's properties are changeable after creation |
|
|
51
|
+
| \_imageURI | string | The image uri for this hat and the fallback for its downstream hats [optional]. Should not be larger than 7000 bytes (enforced in changeHatImageURI) |
|
|
52
|
+
|
|
53
|
+
#### Return Values
|
|
54
|
+
|
|
55
|
+
| Name | Type | Description |
|
|
56
|
+
| ---- | ------- | ---------------------------------------- |
|
|
57
|
+
| [0] | uint256 | newHatId The id of the newly created Hat |
|
|
58
|
+
|
|
59
|
+
### mintHat
|
|
60
|
+
|
|
61
|
+
```solidity
|
|
62
|
+
function mintHat(uint256 _hatId, address _wearer) external returns (bool success)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Mints an ERC1155-similar token of the Hat to an eligible recipient, who then "wears" the hat
|
|
66
|
+
|
|
67
|
+
_The msg.sender must wear an admin Hat of `_hatId`, and the recipient must be eligible to wear `_hatId`_
|
|
68
|
+
|
|
69
|
+
#### Parameters
|
|
70
|
+
|
|
71
|
+
| Name | Type | Description |
|
|
72
|
+
| -------- | ------- | -------------------------------------- |
|
|
73
|
+
| \_hatId | uint256 | The id of the Hat to mint |
|
|
74
|
+
| \_wearer | address | The address to which the Hat is minted |
|
|
75
|
+
|
|
76
|
+
#### Return Values
|
|
77
|
+
|
|
78
|
+
| Name | Type | Description |
|
|
79
|
+
| ------- | ---- | -------------------------- |
|
|
80
|
+
| success | bool | Whether the mint succeeded |
|
|
81
|
+
|
|
82
|
+
### isWearerOfHat
|
|
83
|
+
|
|
84
|
+
```solidity
|
|
85
|
+
function isWearerOfHat(address account, uint256 hat) external view returns (bool)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Checks whether a given address wears a given Hat
|
|
89
|
+
|
|
90
|
+
_Convenience function that wraps `balanceOf`_
|
|
91
|
+
|
|
92
|
+
#### Parameters
|
|
93
|
+
|
|
94
|
+
| Name | Type | Description |
|
|
95
|
+
| ------- | ------- | --------------------------------------------- |
|
|
96
|
+
| account | address | The address in question |
|
|
97
|
+
| hat | uint256 | The id of the Hat that the `_user` might wear |
|
|
98
|
+
|
|
99
|
+
#### Return Values
|
|
100
|
+
|
|
101
|
+
| Name | Type | Description |
|
|
102
|
+
| ---- | ---- | ------------------------------------------- |
|
|
103
|
+
| [0] | bool | isWearer Whether the `_user` wears the Hat. |
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# IMessageProcessorFactory
|
|
2
|
+
|
|
3
|
+
MessageProcessorFactory interface
|
|
4
|
+
|
|
5
|
+
### deploy
|
|
6
|
+
|
|
7
|
+
```solidity
|
|
8
|
+
function deploy(address _verifier, address _vkRegistry, address _poll, address _owner) external returns (address)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Deploy a new MessageProcessor contract and return the address.
|
|
12
|
+
|
|
13
|
+
#### Parameters
|
|
14
|
+
|
|
15
|
+
| Name | Type | Description |
|
|
16
|
+
| ------------ | ------- | -------------------------------------- |
|
|
17
|
+
| \_verifier | address | Verifier contract |
|
|
18
|
+
| \_vkRegistry | address | VkRegistry contract |
|
|
19
|
+
| \_poll | address | Poll contract |
|
|
20
|
+
| \_owner | address | Owner of the MessageProcessor contract |
|
|
21
|
+
|
|
22
|
+
#### Return Values
|
|
23
|
+
|
|
24
|
+
| Name | Type | Description |
|
|
25
|
+
| ---- | ------- | -------------------------------------- |
|
|
26
|
+
| [0] | address | The deployed MessageProcessor contract |
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# IMessageProcessor
|
|
2
|
+
|
|
3
|
+
MessageProcessor interface
|
|
4
|
+
|
|
5
|
+
### processingComplete
|
|
6
|
+
|
|
7
|
+
```solidity
|
|
8
|
+
function processingComplete() external view returns (bool)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Get the result of whether there are unprocessed messages left
|
|
12
|
+
|
|
13
|
+
#### Return Values
|
|
14
|
+
|
|
15
|
+
| Name | Type | Description |
|
|
16
|
+
| ---- | ---- | ------------------------------------------- |
|
|
17
|
+
| [0] | bool | Whether there are unprocessed messages left |
|
|
18
|
+
|
|
19
|
+
### sbCommitment
|
|
20
|
+
|
|
21
|
+
```solidity
|
|
22
|
+
function sbCommitment() external view returns (uint256)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Get the commitment to the state and ballot roots
|
|
26
|
+
|
|
27
|
+
#### Return Values
|
|
28
|
+
|
|
29
|
+
| Name | Type | Description |
|
|
30
|
+
| ---- | ------- | -------------------------------------------- |
|
|
31
|
+
| [0] | uint256 | The commitment to the state and ballot roots |
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# IPoll
|
|
2
|
+
|
|
3
|
+
Poll interface
|
|
4
|
+
|
|
5
|
+
### numSignUpsAndMessages
|
|
6
|
+
|
|
7
|
+
```solidity
|
|
8
|
+
function numSignUpsAndMessages() external view returns (uint256 numSignups, uint256 numMsgs)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The number of messages which have been processed and the number of signups
|
|
12
|
+
|
|
13
|
+
#### Return Values
|
|
14
|
+
|
|
15
|
+
| Name | Type | Description |
|
|
16
|
+
| ---------- | ------- | ------------------------------------- |
|
|
17
|
+
| numSignups | uint256 | The number of signups |
|
|
18
|
+
| numMsgs | uint256 | The number of messages sent by voters |
|
|
19
|
+
|
|
20
|
+
### topup
|
|
21
|
+
|
|
22
|
+
```solidity
|
|
23
|
+
function topup(uint256 stateIndex, uint256 amount) external
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Allows to publish a Topup message
|
|
27
|
+
|
|
28
|
+
#### Parameters
|
|
29
|
+
|
|
30
|
+
| Name | Type | Description |
|
|
31
|
+
| ---------- | ------- | ------------------------------------ |
|
|
32
|
+
| stateIndex | uint256 | The index of user in the state queue |
|
|
33
|
+
| amount | uint256 | The amount of credits to topup |
|
|
34
|
+
|
|
35
|
+
### publishMessage
|
|
36
|
+
|
|
37
|
+
```solidity
|
|
38
|
+
function publishMessage(struct DomainObjs.Message _message, struct DomainObjs.PubKey _encPubKey) external
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Allows anyone to publish a message (an encrypted command and signature).
|
|
42
|
+
This function also enqueues the message.
|
|
43
|
+
|
|
44
|
+
#### Parameters
|
|
45
|
+
|
|
46
|
+
| Name | Type | Description |
|
|
47
|
+
| ----------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
48
|
+
| \_message | struct DomainObjs.Message | The message to publish |
|
|
49
|
+
| \_encPubKey | struct DomainObjs.PubKey | An ephemeral public key which can be combined with the coordinator's private key to generate an ECDH shared key with which to encrypt the message. |
|
|
50
|
+
|
|
51
|
+
### mergeMaciStateAqSubRoots
|
|
52
|
+
|
|
53
|
+
```solidity
|
|
54
|
+
function mergeMaciStateAqSubRoots(uint256 _numSrQueueOps, uint256 _pollId) external
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The first step of merging the MACI state AccQueue. This allows the
|
|
58
|
+
ProcessMessages circuit to access the latest state tree and ballots via
|
|
59
|
+
currentSbCommitment.
|
|
60
|
+
|
|
61
|
+
#### Parameters
|
|
62
|
+
|
|
63
|
+
| Name | Type | Description |
|
|
64
|
+
| --------------- | ------- | ------------------------- |
|
|
65
|
+
| \_numSrQueueOps | uint256 | Number of operations |
|
|
66
|
+
| \_pollId | uint256 | The ID of the active Poll |
|
|
67
|
+
|
|
68
|
+
### mergeMaciStateAq
|
|
69
|
+
|
|
70
|
+
```solidity
|
|
71
|
+
function mergeMaciStateAq(uint256 _pollId) external
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The second step of merging the MACI state AccQueue. This allows the
|
|
75
|
+
ProcessMessages circuit to access the latest state tree and ballots via
|
|
76
|
+
currentSbCommitment.
|
|
77
|
+
|
|
78
|
+
#### Parameters
|
|
79
|
+
|
|
80
|
+
| Name | Type | Description |
|
|
81
|
+
| -------- | ------- | ------------------------- |
|
|
82
|
+
| \_pollId | uint256 | The ID of the active Poll |
|
|
83
|
+
|
|
84
|
+
### mergeMessageAqSubRoots
|
|
85
|
+
|
|
86
|
+
```solidity
|
|
87
|
+
function mergeMessageAqSubRoots(uint256 _numSrQueueOps) external
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The first step in merging the message AccQueue so that the
|
|
91
|
+
ProcessMessages circuit can access the message root.
|
|
92
|
+
|
|
93
|
+
#### Parameters
|
|
94
|
+
|
|
95
|
+
| Name | Type | Description |
|
|
96
|
+
| --------------- | ------- | ------------------------------------------------- |
|
|
97
|
+
| \_numSrQueueOps | uint256 | The number of subroot queue operations to perform |
|
|
98
|
+
|
|
99
|
+
### mergeMessageAq
|
|
100
|
+
|
|
101
|
+
```solidity
|
|
102
|
+
function mergeMessageAq() external
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The second step in merging the message AccQueue so that the
|
|
106
|
+
ProcessMessages circuit can access the message root.
|
|
107
|
+
|
|
108
|
+
### getDeployTimeAndDuration
|
|
109
|
+
|
|
110
|
+
```solidity
|
|
111
|
+
function getDeployTimeAndDuration() external view returns (uint256 _deployTime, uint256 _duration)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Returns the Poll's deploy time and duration
|
|
115
|
+
|
|
116
|
+
#### Return Values
|
|
117
|
+
|
|
118
|
+
| Name | Type | Description |
|
|
119
|
+
| ------------ | ------- | ------------------------ |
|
|
120
|
+
| \_deployTime | uint256 | The deployment timestamp |
|
|
121
|
+
| \_duration | uint256 | The duration of the poll |
|
|
122
|
+
|
|
123
|
+
### stateAqMerged
|
|
124
|
+
|
|
125
|
+
```solidity
|
|
126
|
+
function stateAqMerged() external view returns (bool)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Get the result of whether the MACI contract's stateAq has been merged by this contract
|
|
130
|
+
|
|
131
|
+
#### Return Values
|
|
132
|
+
|
|
133
|
+
| Name | Type | Description |
|
|
134
|
+
| ---- | ---- | -------------------------------------------------------------------- |
|
|
135
|
+
| [0] | bool | Whether the MACI contract's stateAq has been merged by this contract |
|
|
136
|
+
|
|
137
|
+
### treeDepths
|
|
138
|
+
|
|
139
|
+
```solidity
|
|
140
|
+
function treeDepths() external view returns (uint8 intStateTreeDepth, uint8 messageTreeSubDepth, uint8 messageTreeDepth, uint8 voteOptionTreeDepth)
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Get the depths of the merkle trees
|
|
144
|
+
|
|
145
|
+
#### Return Values
|
|
146
|
+
|
|
147
|
+
| Name | Type | Description |
|
|
148
|
+
| ------------------- | ----- | ------------------------------------ |
|
|
149
|
+
| intStateTreeDepth | uint8 | The depth of the state tree |
|
|
150
|
+
| messageTreeSubDepth | uint8 | The subdepth of the message tree |
|
|
151
|
+
| messageTreeDepth | uint8 | The depth of the message tree |
|
|
152
|
+
| voteOptionTreeDepth | uint8 | The subdepth of the vote option tree |
|
|
153
|
+
|
|
154
|
+
### maxValues
|
|
155
|
+
|
|
156
|
+
```solidity
|
|
157
|
+
function maxValues() external view returns (uint256 maxMessages, uint256 maxVoteOptions)
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Get the max values for the poll
|
|
161
|
+
|
|
162
|
+
#### Return Values
|
|
163
|
+
|
|
164
|
+
| Name | Type | Description |
|
|
165
|
+
| -------------- | ------- | ---------------------------------- |
|
|
166
|
+
| maxMessages | uint256 | The maximum number of messages |
|
|
167
|
+
| maxVoteOptions | uint256 | The maximum number of vote options |
|
|
168
|
+
|
|
169
|
+
### extContracts
|
|
170
|
+
|
|
171
|
+
```solidity
|
|
172
|
+
function extContracts() external view returns (contract IMACI maci, contract AccQueue messageAq, contract TopupCredit topupCredit)
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Get the external contracts
|
|
176
|
+
|
|
177
|
+
#### Return Values
|
|
178
|
+
|
|
179
|
+
| Name | Type | Description |
|
|
180
|
+
| ----------- | -------------------- | ------------------------ |
|
|
181
|
+
| maci | contract IMACI | The IMACI contract |
|
|
182
|
+
| messageAq | contract AccQueue | The AccQueue contract |
|
|
183
|
+
| topupCredit | contract TopupCredit | The TopupCredit contract |
|
|
184
|
+
|
|
185
|
+
### coordinatorPubKeyHash
|
|
186
|
+
|
|
187
|
+
```solidity
|
|
188
|
+
function coordinatorPubKeyHash() external view returns (uint256 _coordinatorPubKeyHash)
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Get the hash of coordinator's public key
|
|
192
|
+
|
|
193
|
+
#### Return Values
|
|
194
|
+
|
|
195
|
+
| Name | Type | Description |
|
|
196
|
+
| ----------------------- | ------- | ------------------------------------ |
|
|
197
|
+
| \_coordinatorPubKeyHash | uint256 | the hash of coordinator's public key |
|
|
198
|
+
|
|
199
|
+
### currentSbCommitment
|
|
200
|
+
|
|
201
|
+
```solidity
|
|
202
|
+
function currentSbCommitment() external view returns (uint256)
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Get the commitment to the state leaves and the ballots. This is
|
|
206
|
+
hash3(stateRoot, ballotRoot, salt).
|
|
207
|
+
Its initial value should be
|
|
208
|
+
hash(maciStateRootSnapshot, emptyBallotRoot, 0)
|
|
209
|
+
Each successful invocation of processMessages() should use a different
|
|
210
|
+
salt to update this value, so that an external observer cannot tell in
|
|
211
|
+
the case that none of the messages are valid.
|
|
212
|
+
|
|
213
|
+
#### Return Values
|
|
214
|
+
|
|
215
|
+
| Name | Type | Description |
|
|
216
|
+
| ---- | ------- | -------------------------------------------------- |
|
|
217
|
+
| [0] | uint256 | The commitment to the state leaves and the ballots |
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# IPollFactory
|
|
2
|
+
|
|
3
|
+
PollFactory interface
|
|
4
|
+
|
|
5
|
+
### deploy
|
|
6
|
+
|
|
7
|
+
```solidity
|
|
8
|
+
function deploy(uint256 _duration, struct Params.MaxValues _maxValues, struct Params.TreeDepths _treeDepths, struct DomainObjs.PubKey _coordinatorPubKey, address _maci, contract TopupCredit _topupCredit, address _pollOwner) external returns (address)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Deploy a new Poll contract and AccQueue contract for messages.
|
|
12
|
+
|
|
13
|
+
#### Parameters
|
|
14
|
+
|
|
15
|
+
| Name | Type | Description |
|
|
16
|
+
| ------------------- | ------------------------ | ------------------------------------- |
|
|
17
|
+
| \_duration | uint256 | The duration of the poll |
|
|
18
|
+
| \_maxValues | struct Params.MaxValues | The max values for the poll |
|
|
19
|
+
| \_treeDepths | struct Params.TreeDepths | The depths of the merkle trees |
|
|
20
|
+
| \_coordinatorPubKey | struct DomainObjs.PubKey | The coordinator's public key |
|
|
21
|
+
| \_maci | address | The MACI contract interface reference |
|
|
22
|
+
| \_topupCredit | contract TopupCredit | The TopupCredit contract |
|
|
23
|
+
| \_pollOwner | address | The owner of the poll |
|
|
24
|
+
|
|
25
|
+
#### Return Values
|
|
26
|
+
|
|
27
|
+
| Name | Type | Description |
|
|
28
|
+
| ---- | ------- | -------------------------- |
|
|
29
|
+
| [0] | address | The deployed Poll contract |
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# ITallyFactory
|
|
2
|
+
|
|
3
|
+
TallyFactory interface
|
|
4
|
+
|
|
5
|
+
### deploy
|
|
6
|
+
|
|
7
|
+
```solidity
|
|
8
|
+
function deploy(address _verifier, address _vkRegistry, address _poll, address _messageProcessor, address _owner, bool _isQv) external returns (address)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Deploy a new Tally contract and return the address.
|
|
12
|
+
|
|
13
|
+
#### Parameters
|
|
14
|
+
|
|
15
|
+
| Name | Type | Description |
|
|
16
|
+
| ------------------ | ------- | ---------------------------- |
|
|
17
|
+
| \_verifier | address | Verifier contract |
|
|
18
|
+
| \_vkRegistry | address | VkRegistry contract |
|
|
19
|
+
| \_poll | address | Poll contract |
|
|
20
|
+
| \_messageProcessor | address | MessageProcessor contract |
|
|
21
|
+
| \_owner | address | Owner of the contract |
|
|
22
|
+
| \_isQv | bool | Whether to support QV or not |
|
|
23
|
+
|
|
24
|
+
#### Return Values
|
|
25
|
+
|
|
26
|
+
| Name | Type | Description |
|
|
27
|
+
| ---- | ------- | --------------------- |
|
|
28
|
+
| [0] | address | The deployed contract |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# ITallySubsidyFactory
|
|
2
|
+
|
|
3
|
+
TallySubsidyFactory interface
|
|
4
|
+
|
|
5
|
+
### deploy
|
|
6
|
+
|
|
7
|
+
```solidity
|
|
8
|
+
function deploy(address _verifier, address _vkRegistry, address _poll, address _messageProcessor, address _owner) external returns (address)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Deploy a new Tally or Subsidy contract and return the address.
|
|
12
|
+
|
|
13
|
+
#### Parameters
|
|
14
|
+
|
|
15
|
+
| Name | Type | Description |
|
|
16
|
+
| ------------------ | ------- | ------------------------- |
|
|
17
|
+
| \_verifier | address | Verifier contract |
|
|
18
|
+
| \_vkRegistry | address | VkRegistry contract |
|
|
19
|
+
| \_poll | address | Poll contract |
|
|
20
|
+
| \_messageProcessor | address | MessageProcessor contract |
|
|
21
|
+
| \_owner | address | Owner of the contract |
|
|
22
|
+
|
|
23
|
+
#### Return Values
|
|
24
|
+
|
|
25
|
+
| Name | Type | Description |
|
|
26
|
+
| ---- | ------- | --------------------- |
|
|
27
|
+
| [0] | address | The deployed contract |
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# IVerifier
|
|
2
|
+
|
|
3
|
+
an interface for a Groth16 verifier contract
|
|
4
|
+
|
|
5
|
+
### verify
|
|
6
|
+
|
|
7
|
+
```solidity
|
|
8
|
+
function verify(uint256[8] _proof, struct SnarkCommon.VerifyingKey vk, uint256 input) external view returns (bool)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Verify a zk-SNARK proof
|
|
12
|
+
|
|
13
|
+
#### Parameters
|
|
14
|
+
|
|
15
|
+
| Name | Type | Description |
|
|
16
|
+
| ------- | ------------------------------- | -------------------------------- |
|
|
17
|
+
| \_proof | uint256[8] | The proof |
|
|
18
|
+
| vk | struct SnarkCommon.VerifyingKey | The verifying key |
|
|
19
|
+
| input | uint256 | The public inputs to the circuit |
|
|
20
|
+
|
|
21
|
+
#### Return Values
|
|
22
|
+
|
|
23
|
+
| Name | Type | Description |
|
|
24
|
+
| ---- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
25
|
+
| [0] | bool | Whether the proof is valid given the verifying key and public input. Note that this function only supports one public input. Refer to the Semaphore source code for a verifier that supports multiple public inputs. |
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# IVkRegistry
|
|
2
|
+
|
|
3
|
+
VkRegistry interface
|
|
4
|
+
|
|
5
|
+
### getTallyVk
|
|
6
|
+
|
|
7
|
+
```solidity
|
|
8
|
+
function getTallyVk(uint256 _stateTreeDepth, uint256 _intStateTreeDepth, uint256 _voteOptionTreeDepth) external view returns (struct SnarkCommon.VerifyingKey)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Get the tally verifying key
|
|
12
|
+
|
|
13
|
+
#### Parameters
|
|
14
|
+
|
|
15
|
+
| Name | Type | Description |
|
|
16
|
+
| --------------------- | ------- | --------------------------------- |
|
|
17
|
+
| \_stateTreeDepth | uint256 | The state tree depth |
|
|
18
|
+
| \_intStateTreeDepth | uint256 | The intermediate state tree depth |
|
|
19
|
+
| \_voteOptionTreeDepth | uint256 | The vote option tree depth |
|
|
20
|
+
|
|
21
|
+
#### Return Values
|
|
22
|
+
|
|
23
|
+
| Name | Type | Description |
|
|
24
|
+
| ---- | ------------------------------- | ----------------- |
|
|
25
|
+
| [0] | struct SnarkCommon.VerifyingKey | The verifying key |
|
|
26
|
+
|
|
27
|
+
### getProcessVk
|
|
28
|
+
|
|
29
|
+
```solidity
|
|
30
|
+
function getProcessVk(uint256 _stateTreeDepth, uint256 _messageTreeDepth, uint256 _voteOptionTreeDepth, uint256 _messageBatchSize) external view returns (struct SnarkCommon.VerifyingKey)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Get the process verifying key
|
|
34
|
+
|
|
35
|
+
#### Parameters
|
|
36
|
+
|
|
37
|
+
| Name | Type | Description |
|
|
38
|
+
| --------------------- | ------- | -------------------------- |
|
|
39
|
+
| \_stateTreeDepth | uint256 | The state tree depth |
|
|
40
|
+
| \_messageTreeDepth | uint256 | The message tree depth |
|
|
41
|
+
| \_voteOptionTreeDepth | uint256 | The vote option tree depth |
|
|
42
|
+
| \_messageBatchSize | uint256 | The message batch size |
|
|
43
|
+
|
|
44
|
+
#### Return Values
|
|
45
|
+
|
|
46
|
+
| Name | Type | Description |
|
|
47
|
+
| ---- | ------------------------------- | ----------------- |
|
|
48
|
+
| [0] | struct SnarkCommon.VerifyingKey | The verifying key |
|
|
49
|
+
|
|
50
|
+
### getSubsidyVk
|
|
51
|
+
|
|
52
|
+
```solidity
|
|
53
|
+
function getSubsidyVk(uint256 _stateTreeDepth, uint256 _intStateTreeDepth, uint256 _voteOptionTreeDepth) external view returns (struct SnarkCommon.VerifyingKey)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Get the subsidy verifying key
|
|
57
|
+
|
|
58
|
+
#### Parameters
|
|
59
|
+
|
|
60
|
+
| Name | Type | Description |
|
|
61
|
+
| --------------------- | ------- | --------------------------------- |
|
|
62
|
+
| \_stateTreeDepth | uint256 | The state tree depth |
|
|
63
|
+
| \_intStateTreeDepth | uint256 | The intermediate state tree depth |
|
|
64
|
+
| \_voteOptionTreeDepth | uint256 | The vote option tree depth |
|
|
65
|
+
|
|
66
|
+
#### Return Values
|
|
67
|
+
|
|
68
|
+
| Name | Type | Description |
|
|
69
|
+
| ---- | ------------------------------- | ----------------- |
|
|
70
|
+
| [0] | struct SnarkCommon.VerifyingKey | The verifying key |
|