Skip to main content

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

NameTypeDescription
accountaddressThe address that was added to the whitelist

AddressRemovedFromWhitelist

event AddressRemovedFromWhitelist(address account)

Emitted when an address is removed from the whitelist

Parameters

NameTypeDescription
accountaddressThe address that was removed from the whitelist

constructor

constructor(address initialOwner_) public

Constructor

Parameters

NameTypeDescription
initialOwner_addressThe 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

NameTypeDescription
senderaddressAddress attempting to deposit

Return Values

NameTypeDescription
[0]boolTrue if sender is allowed to deposit, false otherwise

addToWhitelist

function addToWhitelist(address[] accounts) external

Add addresses to the whitelist

Only callable by owner

Parameters

NameTypeDescription
accountsaddress[]Array of addresses to whitelist

removeFromWhitelist

function removeFromWhitelist(address[] accounts) external

Remove addresses from the whitelist

Only callable by owner

Parameters

NameTypeDescription
accountsaddress[]Array of addresses to remove from the whitelist