Skip to main content
Version: v1.2

HatsGatekeeperBase

Abstract contract containing the base elements of a Hats Gatekeeper contract

OnlyMACI

error OnlyMACI()

NotWearingCriterionHat

error NotWearingCriterionHat()

AlreadyRegistered

error AlreadyRegistered()

ZeroAddress

error ZeroAddress()

hats

contract IHats hats

The Hats Protocol contract address

maci

address maci

the reference to the MACI contract

registered

mapping(address => bool) registered

Tracks registered users

constructor

constructor(address _hats) internal payable

Deploy an instance of HatsGatekeeper

Parameters

NameTypeDescription
_hatsaddressThe Hats Protocol contract

setMaciInstance

function setMaciInstance(address _maci) public

Allows to set the MACI contract

Parameters

NameTypeDescription
_maciaddressThe MACI contract interface to be stored