AddressWhitelist

nonReentrant() modifier

Prevents a contract from calling itself, directly or indirectly. Calling a nonReentrant function from another nonReentrant function is not supported. It is possible to prevent this from happening by making the nonReentrant function external, and make it call a private function that does the actual work.

nonReentrantView() modifier

Designed to prevent a view-only method from being re-entered during a call to a nonReentrant() state-changing method.

onlyOwner() modifier

Throws if called by any account other than the owner.

addToWhitelist(address newElement) external

Adds an address to the whitelist.

Parameters:

  • newElement: the new address to add.

removeFromWhitelist(address elementToRemove) external

Removes an address from the whitelist.

Parameters:

  • elementToRemove: the existing address to remove.

isOnWhitelist(address elementToCheck) → bool external

Checks whether an address is on the whitelist.

Parameters:

  • elementToCheck: the address to check.

getWhitelist() → address[] activeWhitelist external

Gets all addresses that are currently included in the whitelist.

Note: This method skips over, but still iterates through addresses. It is possible for this call to run out of gas if a large number of addresses have been removed. To reduce the likelihood of this unlikely scenario, we can modify the implementation so that when addresses are removed, the last addresses in the array is moved to the empty index.

constructor() internal

_preEntranceCheck() internal

_preEntranceSet() internal

_postEntranceReset() internal

owner() → address public

Returns the address of the current owner.

renounceOwnership() public

Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

transferOwnership(address newOwner) public

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

_msgSender() → address payable internal

_msgData() → bytes internal

AddedToWhitelist(address addedAddress) event

RemovedFromWhitelist(address removedAddress) event

OwnershipTransferred(address previousOwner, address newOwner) event

© UMA Project 2018-2019