IAllowlistV1
Kiln
Allowlist Interface (v1)
This interface exposes methods to handle the list of allowed recipients.
Methods
allow
Sets the allowlisting status for one or more accounts
The permission value is overridden and not updated
Parameters
Name | Type | Description |
---|---|---|
_accounts | address[] | Accounts with statuses to edit |
_permissions | uint256[] | Allowlist permissions for each account, in the same order as _accounts |
getAllower
Retrieves the allower address
Returns
Name | Type | Description |
---|---|---|
_0 | address | The address of the allower |
getPermissions
This method retrieves the raw permission value
Parameters
Name | Type | Description |
---|---|---|
_account | address | Recipient to verify |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | The raw permissions value of the account |
hasPermission
This method returns true if the user has the expected permission ignoring any deny list membership
Parameters
Name | Type | Description |
---|---|---|
_account | address | Recipient to verify |
_mask | uint256 | Combination of permissions to verify |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | True if mask is respected |
initAllowlistV1
Initializes the allowlist
Parameters
Name | Type | Description |
---|---|---|
_admin | address | Address of the Allowlist administrator |
_allower | address | Address of the allower |
isAllowed
This method returns true if the user has the expected permission and is not in the deny list
Parameters
Name | Type | Description |
---|---|---|
_account | address | Recipient to verify |
_mask | uint256 | Combination of permissions to verify |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | True if mask is respected and user is allowed |
isDenied
This method returns true if the user is in the deny list
Parameters
Name | Type | Description |
---|---|---|
_account | address | Recipient to verify |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | True if user is denied access |
onlyAllowed
This method should be used as a modifier and is expected to revert if the user hasn't got the required permission or if the user is in the deny list.
Parameters
Name | Type | Description |
---|---|---|
_account | address | Recipient to verify |
_mask | uint256 | Combination of permissions to verify |
setAllower
Changes the allower address
Parameters
Name | Type | Description |
---|---|---|
_newAllowerAddress | address | New address allowed to edit the allowlist |
Events
SetAllower
The stored allower address has been changed
Parameters
Name | Type | Description |
---|---|---|
allower | address | The new allower address |
SetAllowlistPermissions
The permissions of several accounts have changed
Parameters
Name | Type | Description |
---|---|---|
accounts | address[] | List of accounts |
permissions | uint256[] | New permissions for each account at the same index |
Errors
Denied
The account is denied access
Parameters
Name | Type | Description |
---|---|---|
_account | address | The denied account |
InvalidAlloweeCount
The provided accounts list is empty
MismatchedAlloweeAndStatusCount
The provided accounts and permissions list have different lengths
Last updated