Skip to content

Commit

Permalink
docs: add link to abstract SignUpGatekeeper
Browse files Browse the repository at this point in the history
  • Loading branch information
samajammin committed May 8, 2024
1 parent aa681a6 commit bb3a387
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,17 @@ sidebar_label: Gatekeepers

MACI is composed of multiple smart contracts, which together with the zk-SNARK circuits, can be used to carry out on-chain voting. Start with an [overview of our smart contracts here](/docs/contracts).

MACI uses a "gatekeeper" contract, which is used to configure and enforce the eligibility criteria of voters who can participate in MACI polls. Operators of MACI can use the gatekeeper contract to configure signup eligibility and to protect agaisnt sybil attacks in their polls.
MACI uses a "gatekeeper" contract, which is used to configure and enforce the eligibility criteria of voters who can participate in MACI polls. In other words, it is a way to whitelist signups to the system. Operators of MACI can use the gatekeeper contract to configure signup eligibility and to protect agaisnt sybil attacks in their polls.

The MACI repository comes with several out-of-the-box options:

- `FreeForAllSignUpGatekeeper` - This allows anyone to sign up.
- `SignUpTokenGatekeeper` - This restricts signups only to holders of a specific ERC721 token.
- `EASGatekeeper` - This restricts signups only to users who have received an attestation of a specific schema from a trusted attester.
- `SignUpTokenGatekeeper` - This restricts signups only to addresses that own a certain ERC-721 token.
- `EASGatekeeper` - This restricts signups only to addresses who have received an attestation of a specific schema from a trusted attester.

You can find all of our latest gatekeeper contracts here:
https://github.com/privacy-scaling-explorations/maci/tree/dev/contracts/contracts/gatekeepers
[Find all of our latest gatekeeper contracts here](https://github.com/privacy-scaling-explorations/maci/tree/dev/contracts/contracts/gatekeepers).

Developers are also welcome to implement a custom gatekeeper contracts as long as it conforms to the `SignUpGatekeeper` - an abstract contract to inherit from with two function signatures:
Developers are also welcome to implement a custom gatekeeper contract as long as it conforms to the [`SignUpGatekeeper`](https://github.com/privacy-scaling-explorations/maci/blob/dev/contracts/contracts/gatekeepers/SignUpGatekeeper.sol) - an abstract contract to inherit from with two function signatures:

```ts
abstract contract SignUpGatekeeper {
Expand All @@ -30,4 +29,4 @@ abstract contract SignUpGatekeeper {

Whenever a user signs, up (via the `MACI.signUp` function), this triggers the MACI contract to call the `SignUpGatekeeper.register` function.

If you'd like to create a gatekeeper contract for your project, or if there's specific gatekeeper functionality you'd like to see MACI support, we'd be happy to help! Please [create a GitHub issue](https://github.com/privacy-scaling-explorations/maci/issues/new/choose).
If you'd like to create a gatekeeper contract for your project, or if there's specific gatekeeper functionality you'd like to see MACI support, we'd be happy to help - please [create a GitHub issue](https://github.com/privacy-scaling-explorations/maci/issues/new/choose)!

0 comments on commit bb3a387

Please sign in to comment.