@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,85 @@
|
|
|
1
|
+
# Pairing
|
|
2
|
+
|
|
3
|
+
A library implementing the alt_bn128 elliptic curve operations.
|
|
4
|
+
|
|
5
|
+
### PRIME_Q
|
|
6
|
+
|
|
7
|
+
```solidity
|
|
8
|
+
uint256 PRIME_Q
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### G1Point
|
|
12
|
+
|
|
13
|
+
```solidity
|
|
14
|
+
struct G1Point {
|
|
15
|
+
uint256 x;
|
|
16
|
+
uint256 y;
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### G2Point
|
|
21
|
+
|
|
22
|
+
```solidity
|
|
23
|
+
struct G2Point {
|
|
24
|
+
uint256[2] x;
|
|
25
|
+
uint256[2] y;
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### PairingAddFailed
|
|
30
|
+
|
|
31
|
+
```solidity
|
|
32
|
+
error PairingAddFailed()
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
custom errors
|
|
36
|
+
|
|
37
|
+
### PairingMulFailed
|
|
38
|
+
|
|
39
|
+
```solidity
|
|
40
|
+
error PairingMulFailed()
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### PairingOpcodeFailed
|
|
44
|
+
|
|
45
|
+
```solidity
|
|
46
|
+
error PairingOpcodeFailed()
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### negate
|
|
50
|
+
|
|
51
|
+
```solidity
|
|
52
|
+
function negate(struct Pairing.G1Point p) internal pure returns (struct Pairing.G1Point)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The negation of p, i.e. p.plus(p.negate()) should be zero.
|
|
56
|
+
|
|
57
|
+
### plus
|
|
58
|
+
|
|
59
|
+
```solidity
|
|
60
|
+
function plus(struct Pairing.G1Point p1, struct Pairing.G1Point p2) internal view returns (struct Pairing.G1Point r)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
r Returns the sum of two points of G1.
|
|
64
|
+
|
|
65
|
+
### scalarMul
|
|
66
|
+
|
|
67
|
+
```solidity
|
|
68
|
+
function scalarMul(struct Pairing.G1Point p, uint256 s) internal view returns (struct Pairing.G1Point r)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
r Return the product of a point on G1 and a scalar, i.e.
|
|
72
|
+
p == p.scalarMul(1) and p.plus(p) == p.scalarMul(2) for all
|
|
73
|
+
points p.
|
|
74
|
+
|
|
75
|
+
### pairing
|
|
76
|
+
|
|
77
|
+
```solidity
|
|
78
|
+
function pairing(struct Pairing.G1Point a1, struct Pairing.G2Point a2, struct Pairing.G1Point b1, struct Pairing.G2Point b2, struct Pairing.G1Point c1, struct Pairing.G2Point c2, struct Pairing.G1Point d1, struct Pairing.G2Point d2) internal view returns (bool isValid)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
#### Return Values
|
|
82
|
+
|
|
83
|
+
| Name | Type | Description |
|
|
84
|
+
| ------- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
85
|
+
| isValid | bool | The result of computing the pairing check e(p1[0], p2[0]) _ .... _ e(p1[n], p2[n]) == 1 For example, pairing([P1(), P1().negate()], [P2(), P2()]) should return true. |
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# SnarkCommon
|
|
2
|
+
|
|
3
|
+
a Contract which holds a struct
|
|
4
|
+
representing a Groth16 verifying key
|
|
5
|
+
|
|
6
|
+
### VerifyingKey
|
|
7
|
+
|
|
8
|
+
```solidity
|
|
9
|
+
struct VerifyingKey {
|
|
10
|
+
struct Pairing.G1Point alpha1;
|
|
11
|
+
struct Pairing.G2Point beta2;
|
|
12
|
+
struct Pairing.G2Point gamma2;
|
|
13
|
+
struct Pairing.G2Point delta2;
|
|
14
|
+
struct Pairing.G1Point[] ic;
|
|
15
|
+
}
|
|
16
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# SnarkConstants
|
|
2
|
+
|
|
3
|
+
This contract contains constants related to the SNARK
|
|
4
|
+
components of MACI.
|
|
5
|
+
|
|
6
|
+
### SNARK_SCALAR_FIELD
|
|
7
|
+
|
|
8
|
+
```solidity
|
|
9
|
+
uint256 SNARK_SCALAR_FIELD
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The scalar field
|
|
13
|
+
|
|
14
|
+
### PAD_PUBKEY_X
|
|
15
|
+
|
|
16
|
+
```solidity
|
|
17
|
+
uint256 PAD_PUBKEY_X
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The public key here is the first Pedersen base
|
|
21
|
+
point from iden3's circomlib implementation of the Pedersen hash.
|
|
22
|
+
Since it is generated using a hash-to-curve function, we are
|
|
23
|
+
confident that no-one knows the private key associated with this
|
|
24
|
+
public key. See:
|
|
25
|
+
https://github.com/iden3/circomlib/blob/d5ed1c3ce4ca137a6b3ca48bec4ac12c1b38957a/src/pedersen_printbases.js
|
|
26
|
+
Its hash should equal 6769006970205099520508948723718471724660867171122235270773600567925038008762.
|
|
27
|
+
|
|
28
|
+
### PAD_PUBKEY_Y
|
|
29
|
+
|
|
30
|
+
```solidity
|
|
31
|
+
uint256 PAD_PUBKEY_Y
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### NOTHING_UP_MY_SLEEVE
|
|
35
|
+
|
|
36
|
+
```solidity
|
|
37
|
+
uint256 NOTHING_UP_MY_SLEEVE
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The Keccack256 hash of 'Maci'
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Verifier
|
|
2
|
+
|
|
3
|
+
a Groth16 verifier contract
|
|
4
|
+
|
|
5
|
+
### Proof
|
|
6
|
+
|
|
7
|
+
```solidity
|
|
8
|
+
struct Proof {
|
|
9
|
+
struct Pairing.G1Point a;
|
|
10
|
+
struct Pairing.G2Point b;
|
|
11
|
+
struct Pairing.G1Point c;
|
|
12
|
+
}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### PRIME_Q
|
|
16
|
+
|
|
17
|
+
```solidity
|
|
18
|
+
uint256 PRIME_Q
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### InvalidProofQ
|
|
22
|
+
|
|
23
|
+
```solidity
|
|
24
|
+
error InvalidProofQ()
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
custom errors
|
|
28
|
+
|
|
29
|
+
### InvalidInputVal
|
|
30
|
+
|
|
31
|
+
```solidity
|
|
32
|
+
error InvalidInputVal()
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### verify
|
|
36
|
+
|
|
37
|
+
```solidity
|
|
38
|
+
function verify(uint256[8] _proof, struct SnarkCommon.VerifyingKey vk, uint256 input) public view returns (bool isValid)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Verify a zk-SNARK proof
|
|
42
|
+
|
|
43
|
+
#### Parameters
|
|
44
|
+
|
|
45
|
+
| Name | Type | Description |
|
|
46
|
+
| ------- | ------------------------------- | -------------------------------- |
|
|
47
|
+
| \_proof | uint256[8] | The proof |
|
|
48
|
+
| vk | struct SnarkCommon.VerifyingKey | The verifying key |
|
|
49
|
+
| input | uint256 | The public inputs to the circuit |
|
|
50
|
+
|
|
51
|
+
#### Return Values
|
|
52
|
+
|
|
53
|
+
| Name | Type | Description |
|
|
54
|
+
| ------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
55
|
+
| isValid | 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. |
|
|
56
|
+
|
|
57
|
+
### checkPoint
|
|
58
|
+
|
|
59
|
+
```solidity
|
|
60
|
+
function checkPoint(uint256 point) internal pure
|
|
61
|
+
```
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# EASGatekeeper
|
|
2
|
+
|
|
3
|
+
A gatekeeper contract which allows users to sign up to MACI
|
|
4
|
+
only if they've received an attestation of a specific schema from a trusted attester
|
|
5
|
+
|
|
6
|
+
### schema
|
|
7
|
+
|
|
8
|
+
```solidity
|
|
9
|
+
bytes32 schema
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
### attester
|
|
13
|
+
|
|
14
|
+
```solidity
|
|
15
|
+
address attester
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### maci
|
|
19
|
+
|
|
20
|
+
```solidity
|
|
21
|
+
address maci
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
the reference to the MACI contract
|
|
25
|
+
|
|
26
|
+
### registeredAttestations
|
|
27
|
+
|
|
28
|
+
```solidity
|
|
29
|
+
mapping(bytes32 => bool) registeredAttestations
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### AttestationRevoked
|
|
33
|
+
|
|
34
|
+
```solidity
|
|
35
|
+
error AttestationRevoked()
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
custom errors
|
|
39
|
+
|
|
40
|
+
### AlreadyRegistered
|
|
41
|
+
|
|
42
|
+
```solidity
|
|
43
|
+
error AlreadyRegistered()
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### AttesterNotTrusted
|
|
47
|
+
|
|
48
|
+
```solidity
|
|
49
|
+
error AttesterNotTrusted()
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### NotYourAttestation
|
|
53
|
+
|
|
54
|
+
```solidity
|
|
55
|
+
error NotYourAttestation()
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### InvalidSchema
|
|
59
|
+
|
|
60
|
+
```solidity
|
|
61
|
+
error InvalidSchema()
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### OnlyMACI
|
|
65
|
+
|
|
66
|
+
```solidity
|
|
67
|
+
error OnlyMACI()
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### ZeroAddress
|
|
71
|
+
|
|
72
|
+
```solidity
|
|
73
|
+
error ZeroAddress()
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### constructor
|
|
77
|
+
|
|
78
|
+
```solidity
|
|
79
|
+
constructor(address _eas, address _attester, bytes32 _schema) public payable
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Deploy an instance of EASGatekeeper
|
|
83
|
+
|
|
84
|
+
#### Parameters
|
|
85
|
+
|
|
86
|
+
| Name | Type | Description |
|
|
87
|
+
| ---------- | ------- | -------------------- |
|
|
88
|
+
| \_eas | address | The EAS contract |
|
|
89
|
+
| \_attester | address | The trusted attester |
|
|
90
|
+
| \_schema | bytes32 | The schema UID |
|
|
91
|
+
|
|
92
|
+
### setMaciInstance
|
|
93
|
+
|
|
94
|
+
```solidity
|
|
95
|
+
function setMaciInstance(address _maci) public
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Adds an uninitialised MACI instance to allow for token signups
|
|
99
|
+
|
|
100
|
+
#### Parameters
|
|
101
|
+
|
|
102
|
+
| Name | Type | Description |
|
|
103
|
+
| ------ | ------- | ---------------------------------------- |
|
|
104
|
+
| \_maci | address | The MACI contract interface to be stored |
|
|
105
|
+
|
|
106
|
+
### register
|
|
107
|
+
|
|
108
|
+
```solidity
|
|
109
|
+
function register(address _user, bytes _data) public
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Register an user based on their attestation
|
|
113
|
+
|
|
114
|
+
_Throw if the attestation is not valid or just complete silently_
|
|
115
|
+
|
|
116
|
+
#### Parameters
|
|
117
|
+
|
|
118
|
+
| Name | Type | Description |
|
|
119
|
+
| ------ | ------- | -------------------------------------- |
|
|
120
|
+
| \_user | address | The user's Ethereum address. |
|
|
121
|
+
| \_data | bytes | The ABI-encoded schemaId as a uint256. |
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# FreeForAllGatekeeper
|
|
2
|
+
|
|
3
|
+
A SignUpGatekeeper which allows anyone to sign up.
|
|
4
|
+
|
|
5
|
+
### constructor
|
|
6
|
+
|
|
7
|
+
```solidity
|
|
8
|
+
constructor() public payable
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Create a new instance of FreeForAllGatekeeper
|
|
12
|
+
|
|
13
|
+
### setMaciInstance
|
|
14
|
+
|
|
15
|
+
```solidity
|
|
16
|
+
function setMaciInstance(address _maci) public
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
setMaciInstance does nothing in this gatekeeper
|
|
20
|
+
|
|
21
|
+
#### Parameters
|
|
22
|
+
|
|
23
|
+
| Name | Type | Description |
|
|
24
|
+
| ------ | ------- | ----------------- |
|
|
25
|
+
| \_maci | address | The MACI contract |
|
|
26
|
+
|
|
27
|
+
### register
|
|
28
|
+
|
|
29
|
+
```solidity
|
|
30
|
+
function register(address _address, bytes _data) public
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Registers the user without any restrictions.
|
|
34
|
+
|
|
35
|
+
#### Parameters
|
|
36
|
+
|
|
37
|
+
| Name | Type | Description |
|
|
38
|
+
| --------- | ------- | ----------------------- |
|
|
39
|
+
| \_address | address | The address of the user |
|
|
40
|
+
| \_data | bytes | memory additional data |
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# SignUpGatekeeper
|
|
2
|
+
|
|
3
|
+
A gatekeeper contract which allows users to sign up for a poll.
|
|
4
|
+
|
|
5
|
+
### setMaciInstance
|
|
6
|
+
|
|
7
|
+
```solidity
|
|
8
|
+
function setMaciInstance(address _maci) public virtual
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Allows to set the MACI contract
|
|
12
|
+
|
|
13
|
+
### register
|
|
14
|
+
|
|
15
|
+
```solidity
|
|
16
|
+
function register(address _user, bytes _data) public virtual
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Registers the user
|
|
20
|
+
|
|
21
|
+
#### Parameters
|
|
22
|
+
|
|
23
|
+
| Name | Type | Description |
|
|
24
|
+
| ------ | ------- | ----------------------- |
|
|
25
|
+
| \_user | address | The address of the user |
|
|
26
|
+
| \_data | bytes | additional data |
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# SignUpTokenGatekeeper
|
|
2
|
+
|
|
3
|
+
This contract allows to gatekeep MACI signups
|
|
4
|
+
by requiring new voters to own a certain ERC721 token
|
|
5
|
+
|
|
6
|
+
### token
|
|
7
|
+
|
|
8
|
+
```solidity
|
|
9
|
+
contract SignUpToken token
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
the reference to the SignUpToken contract
|
|
13
|
+
|
|
14
|
+
### maci
|
|
15
|
+
|
|
16
|
+
```solidity
|
|
17
|
+
address maci
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
the reference to the MACI contract
|
|
21
|
+
|
|
22
|
+
### registeredTokenIds
|
|
23
|
+
|
|
24
|
+
```solidity
|
|
25
|
+
mapping(uint256 => bool) registeredTokenIds
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
a mapping of tokenIds to whether they have been used to sign up
|
|
29
|
+
|
|
30
|
+
### AlreadyRegistered
|
|
31
|
+
|
|
32
|
+
```solidity
|
|
33
|
+
error AlreadyRegistered()
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
custom errors
|
|
37
|
+
|
|
38
|
+
### NotTokenOwner
|
|
39
|
+
|
|
40
|
+
```solidity
|
|
41
|
+
error NotTokenOwner()
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### OnlyMACI
|
|
45
|
+
|
|
46
|
+
```solidity
|
|
47
|
+
error OnlyMACI()
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### constructor
|
|
51
|
+
|
|
52
|
+
```solidity
|
|
53
|
+
constructor(contract SignUpToken _token) public payable
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
creates a new SignUpTokenGatekeeper
|
|
57
|
+
|
|
58
|
+
#### Parameters
|
|
59
|
+
|
|
60
|
+
| Name | Type | Description |
|
|
61
|
+
| ------- | -------------------- | --------------------------------------- |
|
|
62
|
+
| \_token | contract SignUpToken | the address of the SignUpToken contract |
|
|
63
|
+
|
|
64
|
+
### setMaciInstance
|
|
65
|
+
|
|
66
|
+
```solidity
|
|
67
|
+
function setMaciInstance(address _maci) public
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Adds an uninitialised MACI instance to allow for token signups
|
|
71
|
+
|
|
72
|
+
#### Parameters
|
|
73
|
+
|
|
74
|
+
| Name | Type | Description |
|
|
75
|
+
| ------ | ------- | ---------------------------------------- |
|
|
76
|
+
| \_maci | address | The MACI contract interface to be stored |
|
|
77
|
+
|
|
78
|
+
### register
|
|
79
|
+
|
|
80
|
+
```solidity
|
|
81
|
+
function register(address _user, bytes _data) public
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Registers the user if they own the token with the token ID encoded in
|
|
85
|
+
\_data. Throws if the user does not own the token or if the token has
|
|
86
|
+
already been used to sign up.
|
|
87
|
+
|
|
88
|
+
#### Parameters
|
|
89
|
+
|
|
90
|
+
| Name | Type | Description |
|
|
91
|
+
| ------ | ------- | ------------------------------------- |
|
|
92
|
+
| \_user | address | The user's Ethereum address. |
|
|
93
|
+
| \_data | bytes | The ABI-encoded tokenId as a uint256. |
|
package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/hatsGatekeepers/HatsGatekeeperBase.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# HatsGatekeeperBase
|
|
2
|
+
|
|
3
|
+
Abstract contract containing the base elements of a Hats Gatekeeper contract
|
|
4
|
+
|
|
5
|
+
### OnlyMACI
|
|
6
|
+
|
|
7
|
+
```solidity
|
|
8
|
+
error OnlyMACI()
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### NotWearingCriterionHat
|
|
12
|
+
|
|
13
|
+
```solidity
|
|
14
|
+
error NotWearingCriterionHat()
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### AlreadyRegistered
|
|
18
|
+
|
|
19
|
+
```solidity
|
|
20
|
+
error AlreadyRegistered()
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### ZeroAddress
|
|
24
|
+
|
|
25
|
+
```solidity
|
|
26
|
+
error ZeroAddress()
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### hats
|
|
30
|
+
|
|
31
|
+
```solidity
|
|
32
|
+
contract IHats hats
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The Hats Protocol contract address
|
|
36
|
+
|
|
37
|
+
### maci
|
|
38
|
+
|
|
39
|
+
```solidity
|
|
40
|
+
address maci
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
the reference to the MACI contract
|
|
44
|
+
|
|
45
|
+
### registered
|
|
46
|
+
|
|
47
|
+
```solidity
|
|
48
|
+
mapping(address => bool) registered
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Tracks registered users
|
|
52
|
+
|
|
53
|
+
### constructor
|
|
54
|
+
|
|
55
|
+
```solidity
|
|
56
|
+
constructor(address _hats) internal payable
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Deploy an instance of HatsGatekeeper
|
|
60
|
+
|
|
61
|
+
#### Parameters
|
|
62
|
+
|
|
63
|
+
| Name | Type | Description |
|
|
64
|
+
| ------ | ------- | -------------------------- |
|
|
65
|
+
| \_hats | address | The Hats Protocol contract |
|
|
66
|
+
|
|
67
|
+
### setMaciInstance
|
|
68
|
+
|
|
69
|
+
```solidity
|
|
70
|
+
function setMaciInstance(address _maci) public
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Allows to set the MACI contract
|
|
74
|
+
|
|
75
|
+
#### Parameters
|
|
76
|
+
|
|
77
|
+
| Name | Type | Description |
|
|
78
|
+
| ------ | ------- | ---------------------------------------- |
|
|
79
|
+
| \_maci | address | The MACI contract interface to be stored |
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# HatsGatekeeperMultiple
|
|
2
|
+
|
|
3
|
+
A gatekeeper contract which allows users to sign up to MACI
|
|
4
|
+
only if they are wearing one of the specified hats
|
|
5
|
+
|
|
6
|
+
### NotCriterionHat
|
|
7
|
+
|
|
8
|
+
```solidity
|
|
9
|
+
error NotCriterionHat()
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
### criterionHat
|
|
13
|
+
|
|
14
|
+
```solidity
|
|
15
|
+
mapping(uint256 => bool) criterionHat
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Tracks hats that users must wear to be eligible to register
|
|
19
|
+
|
|
20
|
+
### constructor
|
|
21
|
+
|
|
22
|
+
```solidity
|
|
23
|
+
constructor(address _hats, uint256[] _criterionHats) public payable
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Deploy an instance of HatsGatekeeperMultiple
|
|
27
|
+
|
|
28
|
+
#### Parameters
|
|
29
|
+
|
|
30
|
+
| Name | Type | Description |
|
|
31
|
+
| --------------- | --------- | -------------------------------- |
|
|
32
|
+
| \_hats | address | The Hats Protocol contract |
|
|
33
|
+
| \_criterionHats | uint256[] | Array of accepted criterion hats |
|
|
34
|
+
|
|
35
|
+
### register
|
|
36
|
+
|
|
37
|
+
```solidity
|
|
38
|
+
function register(address _user, bytes _data) public
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Registers the user
|
|
42
|
+
|
|
43
|
+
#### Parameters
|
|
44
|
+
|
|
45
|
+
| Name | Type | Description |
|
|
46
|
+
| ------ | ------- | ----------------------- |
|
|
47
|
+
| \_user | address | The address of the user |
|
|
48
|
+
| \_data | bytes | additional data |
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# HatsGatekeeperSingle
|
|
2
|
+
|
|
3
|
+
A gatekeeper contract which allows users to sign up to MACI
|
|
4
|
+
only if they are wearing a specified hat
|
|
5
|
+
|
|
6
|
+
### criterionHat
|
|
7
|
+
|
|
8
|
+
```solidity
|
|
9
|
+
uint256 criterionHat
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The hat that users must wear to be eligible to register
|
|
13
|
+
|
|
14
|
+
### constructor
|
|
15
|
+
|
|
16
|
+
```solidity
|
|
17
|
+
constructor(address _hats, uint256 _criterionHat) public payable
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Deploy an instance of HatsGatekeeperSingle
|
|
21
|
+
|
|
22
|
+
#### Parameters
|
|
23
|
+
|
|
24
|
+
| Name | Type | Description |
|
|
25
|
+
| -------------- | ------- | -------------------------- |
|
|
26
|
+
| \_hats | address | The Hats Protocol contract |
|
|
27
|
+
| \_criterionHat | uint256 | The required hat |
|
|
28
|
+
|
|
29
|
+
### register
|
|
30
|
+
|
|
31
|
+
```solidity
|
|
32
|
+
function register(address _user, bytes) public
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Registers the user
|
|
36
|
+
|
|
37
|
+
#### Parameters
|
|
38
|
+
|
|
39
|
+
| Name | Type | Description |
|
|
40
|
+
| ------ | ------- | ----------------------- |
|
|
41
|
+
| \_user | address | The address of the user |
|
|
42
|
+
| | bytes | |
|