Skip to main content

AllowListGateKeeper

Restricts participation to a crowdfund based on whether an address is on an allow list or not.

Code

AllowListGateKeeper.sol

Functions

isAllowed

Check if a participant is eligible to participate in a crowdfund.

function isAllowed(address participant, bytes12 id, bytes memory userData) external view returns (bool);

Parameters

NameTypeDescription
participantaddressThe address of the participant.
idbytes12The ID of the gate to eligibility against.
userDatabytesThe data used to check eligibility.

Returns

NameTypeDescription
booltrue if the participant is allowed to participate, false otherwise.

createGate

Create a new gate using merkleRoot to implement the allowlist.

function createGate(bytes32 merkleRoot) external returns (bytes12 id);

Parameters

NameTypeDescription
merkleRootbytes32The merkle root to use for the allowlist.

Returns

NameTypeDescription
idbytes12The ID of the new gate.