WhitelistAccessControl
WhitelistAccessControl
Implementation of IOrionAccessControl with whitelist-based access
whitelist
mapping(address => bool) whitelist
Mapping of addresses allowed to deposit
AddressWhitelisted
event AddressWhitelisted(address account)
Emitted when an address is added to the whitelist
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address that was added to the whitelist |
AddressRemovedFromWhitelist
event AddressRemovedFromWhitelist(address account)
Emitted when an address is removed from the whitelist
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address that was removed from the whitelist |
constructor
constructor(address initialOwner_) public
Constructor
Parameters
| Name | Type | Description |
|---|---|---|
| initialOwner_ | address | The address of the initial owner |
canRequestDeposit
function canRequestDeposit(address sender) external view returns (bool)
Check if an address is allowed to request deposits to the vault
Parameters
| Name | Type | Description |
|---|---|---|
| sender | address | Address attempting to deposit |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | bool | True if sender is allowed to deposit, false otherwise |
addToWhitelist
function addToWhitelist(address[] accounts) external
Add addresses to the whitelist
Only callable by owner
Parameters
| Name | Type | Description |
|---|---|---|
| accounts | address[] | Array of addresses to whitelist |
removeFromWhitelist
function removeFromWhitelist(address[] accounts) external
Remove addresses from the whitelist
Only callable by owner
Parameters
| Name | Type | Description |
|---|---|---|
| accounts | address[] | Array of addresses to remove from the whitelist |