Skip to main content




addToWhitelist(address newElement) (external)

Adds an address to the whitelist.


  • newElement: the new address to add.
removeFromWhitelist(address elementToRemove) (external)

Removes an address from the whitelist.


  • elementToRemove: the existing address to remove.
isOnWhitelist(address elementToCheck) โ†’ bool (external)

Checks whether an address is on the whitelist.


  • 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.

_preEntranceCheck() (internal)
_preEntranceSet() (internal)
_postEntranceReset() (internal)
_startReentrantGuardDisabled() (internal)
_endReentrantGuardDisabled() (internal)
constructor() (internal)

Initializes the contract setting the deployer as the initial owner.

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.

_transferOwnership(address newOwner) (internal)

Transfers ownership of the contract to a new account (newOwner). Internal function without access restriction.

_msgSender() โ†’ address (internal)
_msgData() โ†’ bytes (internal)


AddedToWhitelist(address addedAddress)
RemovedFromWhitelist(address removedAddress)
OwnershipTransferred(address previousOwner, address newOwner)



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 making it call a private function that does the actual state modification.


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


Throws if called by any account other than the owner.