A contract to track a whitelist of addresses.
Prevents a contract from calling itself, directly or indirectly.
nonReentrant function from another
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.
Designed to prevent a view-only method from being re-entered during a call to a
nonReentrant() state-changing method.
Adds an address to the whitelist.
newElement: the new address to add.
Removes an address from the whitelist.
elementToRemove: the existing address to remove.
Checks whether an address is on the whitelist.
elementToCheck: the address to check.
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.
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.
Transfers ownership of the contract to a new account (
Can only be called by the current owner.