IAllowlistV1
Alluvial Finance Inc.
Allowlist Interface (v1)
This interface exposes methods to handle the list of allowed recipients.
Methods
getAllower
Retrieves the allower address
Returns
_0
address
The address of the allower
getDenier
Retrieves the denier address
Returns
_0
address
The address of the denier
getPermissions
This method retrieves the raw permission value
Parameters
_account
address
Recipient to verify
Returns
_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
_account
address
Recipient to verify
_mask
uint256
Combination of permissions to verify
Returns
_0
bool
True if mask is respected
initAllowlistV1
Initializes the allowlist
Parameters
_admin
address
Address of the Allowlist administrator
_allower
address
Address of the allower
initAllowlistV1_1
Initializes the allowlist denier
Parameters
_denier
address
Address of the denier
isAllowed
This method returns true if the user has the expected permission and is not in the deny list
Parameters
_account
address
Recipient to verify
_mask
uint256
Combination of permissions to verify
Returns
_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
_account
address
Recipient to verify
Returns
_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
_account
address
Recipient to verify
_mask
uint256
Combination of permissions to verify
setAllowPermissions
Sets the allow permissions for one or more accounts
This function is for allocating or removing deposit, redeem or donate permissions. This function could be used to give any permissions that we come up with in the future. An address which was denied has to be undenied first before they could be given any permission(s).
Parameters
_accounts
address[]
Accounts to update
_permissions
uint256[]
New permission values
setAllower
Changes the allower address
Parameters
_newAllowerAddress
address
New address allowed to edit the allowlist
setDenier
Changes the denier address
Parameters
_newDenierAddress
address
New address allowed to edit the allowlist
setDenyPermissions
Sets the deny permissions for one or more accounts
This function is for allocating or removing deny permissions. An address which is undenied has to be given permissions again for them to be able to deposit, donate or redeem.
Parameters
_accounts
address[]
Accounts to update
_permissions
uint256[]
New permission values
Events
SetAllower
The stored allower address has been changed
Parameters
allower indexed
address
The new allower address
SetAllowlistPermissions
The permissions of several accounts have changed
Parameters
accounts
address[]
List of accounts
permissions
uint256[]
New permissions for each account at the same index
SetDenier
The stored denier address has been changed
Parameters
denier indexed
address
The new denier address
Errors
AttemptToRemoveDenyPermission
Allower can't remove deny permission
AttemptToSetDenyPermission
Allower can't set deny permission
Denied
The account is denied access
Parameters
_account
address
The denied account
InvalidCount
The provided accounts list is empty
MismatchedArrayLengths
The provided accounts and permissions list have different lengths
Last updated