Skip to main content

VaultWhitelist

Git Source ↗

Inherits: Initializable ↗, VaultAdmin, IVaultWhitelist

Defines the whitelisting functionality for the Vault

State Variables​

whitelister​

Whitelister address

address public override whitelister

whitelistedAccounts​

mapping(address => bool) public override whitelistedAccounts

__gap​

This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain. See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps

uint256[50] private __gap

Functions​

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

_checkWhitelist​

Internal function for checking whether account is in the whitelist

function _checkWhitelist(address account) internal view;

Parameters

NameTypeDescription
accountaddressThe address of the account to check

_setWhitelister​

Internal function for updating the whitelister externally or from the initializer

function _setWhitelister(address _whitelister) private;

Parameters

NameTypeDescription
_whitelisteraddressThe address of the new whitelister

__VaultWhitelist_init​

Initializes the VaultWhitelist contract

function __VaultWhitelist_init(address _whitelister) internal onlyInitializing;

Parameters

NameTypeDescription
_whitelisteraddressThe address of the whitelister