Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions core/contracts/common/implementation/AddressWhitelist.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ contract AddressWhitelist is Ownable {

/**
* @notice Adds an address to the whitelist.
* @param newElement the new address to add.
*/
function addToWhitelist(address newElement) external onlyOwner {
// Ignore if address is already included
Expand All @@ -36,6 +37,7 @@ contract AddressWhitelist is Ownable {

/**
* @notice Removes an address from the whitelist.
* @param elementToRemove the existing address to remove.
*/
function removeFromWhitelist(address elementToRemove) external onlyOwner {
if (whitelist[elementToRemove] != Status.Out) {
Expand All @@ -46,6 +48,8 @@ contract AddressWhitelist is Ownable {

/**
* @notice Checks whether an address is on the whitelist.
* @param elementToCheck the address to check.
* @return True if `elementToCheck` is on the whitelist, or False.
*/
function isOnWhitelist(address elementToCheck) external view returns (bool) {
return whitelist[elementToCheck] == Status.In;
Expand All @@ -57,6 +61,7 @@ contract AddressWhitelist is Ownable {
* 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.
* @return activeWhitelist the list of addresses on the whitelist.
*/
function getWhitelist() external view returns (address[] memory activeWhitelist) {
// Determine size of whitelist first
Expand Down
4 changes: 4 additions & 0 deletions core/contracts/common/implementation/ExpandedERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ contract ExpandedERC20 is ExpandedIERC20, ERC20, MultiRole {

/**
* @dev Mints `value` tokens to `recipient`, returning true on success.
* @param recipient address to mint to.
* @param value amount of tokens to mint.
* @return True if the mint succeeded, or False.
*/

// TODO(#969) Remove once prettier-plugin-solidity can handle the "override" keyword
Expand All @@ -48,6 +51,7 @@ contract ExpandedERC20 is ExpandedIERC20, ERC20, MultiRole {

/**
* @dev Burns `value` tokens owned by `msg.sender`.
* @param value amount of tokens to burn.
*/

// TODO(#969) Remove once prettier-plugin-solidity can handle the "override" keyword
Expand Down
Loading