AllowListGateKeeper
Restricts participation to a crowdfund based on whether an address is on an allow list or not.
Code
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
Name | Type | Description |
---|---|---|
participant | address | The address of the participant. |
id | bytes12 | The ID of the gate to eligibility against. |
userData | bytes | The data used to check eligibility. |
Returns
Name | Type | Description |
---|---|---|
bool | true 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
Name | Type | Description |
---|---|---|
merkleRoot | bytes32 | The merkle root to use for the allowlist. |
Returns
Name | Type | Description |
---|---|---|
id | bytes12 | The ID of the new gate. |