Skip to content

Commit

Permalink
Merge pull request #5 from yetanotherco/enable-multiple-whitelist
Browse files Browse the repository at this point in the history
feat: add_multiple and remove_multiple on whitelist.sol
  • Loading branch information
MauroToscano authored Nov 26, 2024
2 parents a1801f0 + 507afb4 commit c0863c3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Whitelist.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,25 @@ contract Whitelist is OwnableUpgradeable {
emit AddedToWhiteList(_address);
}

function add_multiple(address[] memory _addresses) public onlyOwner {
for (uint256 i = 0; i < _addresses.length; i++) {
whitelist[_addresses[i]] = true;
emit AddedToWhiteList(_addresses[i]);
}
}

function remove(address _address) public onlyOwner {
whitelist[_address] = false;
emit RemovedFromWhiteList(_address);
}

function remove_multiple(address[] memory _addresses) public onlyOwner {
for (uint256 i = 0; i < _addresses.length; i++) {
whitelist[_addresses[i]] = false;
emit RemovedFromWhiteList(_addresses[i]);
}
}

function isWhitelisted(address _address) public view returns (bool) {
return whitelist[_address];
}
Expand Down

0 comments on commit c0863c3

Please sign in to comment.