AddressWhitelist

onlyOwner() modifier

Throws if called by any account other than the owner.

addToWhitelist(address newElement) external

Adds an address to the whitelist.

removeFromWhitelist(address elementToRemove) external

Removes an address from the whitelist.

isOnWhitelist(address elementToCheck) → bool external

Checks whether an address is on the whitelist.

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

Initializes the contract setting the deployer as the initial owner.

owner() → address public

Returns the address of the current owner.

isOwner() → bool public

Returns true if the caller is 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.

_transferOwnership(address newOwner) internal

Transfers ownership of the contract to a new account (newOwner).

AddedToWhitelist(address addedAddress) event

RemovedFromWhitelist(address removedAddress) event

OwnershipTransferred(address previousOwner, address newOwner) event

© UMA Project 2018-2019