Skip to main content

VaultWhitelist

Git Source ↗

Inherits: Initializable ↗, VaultAdmin →, IVaultWhitelist

Defines the whitelisting functionality for the Vault.

Events​

WhitelistUpdated​

Event emitted on whitelist update

event WhitelistUpdated(address indexed caller, address indexed account, bool approved);

Parameters

NameTypeDescription
calleraddressThe address of the function caller
accountaddressThe address of the account updated
approvedboolWhether account is approved or not

WhitelisterUpdated​

Event emitted when whitelister address is updated

event WhitelisterUpdated(address indexed caller, address indexed whitelister);

Parameters

NameTypeDescription
calleraddressThe address of the function caller
whitelisteraddressThe address of the new whitelister

Functions​

whitelister​

Whitelister address

function whitelister() external view returns (address);

Returns

NameTypeDescription
<none>addressThe address of the whitelister

whitelistedAccounts​

Checks whether account is whitelisted or not

function whitelistedAccounts(address account) external view returns (bool);

Parameters

NameTypeDescription
accountaddressThe account to check

Returns

NameTypeDescription
<none>booltrue for the whitelisted account, false otherwise

updateWhitelist​

Add or remove account from the whitelist. Can only be called by the whitelister.

function updateWhitelist(address account, bool approved) external override;

Parameters

NameTypeDescription
accountaddressThe account to add or remove from the whitelist
approvedboolWhether account should be whitelisted or not

setWhitelister​

Used to update the whitelister. Can only be called by the Vault admin.

function setWhitelister(address _whitelister) external override;

Parameters

NameTypeDescription
_whitelisteraddressThe address of the new whitelister