contract CustomWhitelist is CustomPausable {
  mapping(address => bool) public whitelist;

  event WhitelistAdded(address indexed _account);
  event WhitelistRemoved(address indexed _account);

  ///@notice Verifies if the account is whitelisted.
  modifier ifWhitelisted(address _account) {
    require(_account != address(0));
    require(whitelist[_account]);

    _;
  }

  ///@notice Adds an account to the whitelist.
  ///@param _account The wallet address to add to the whitelist.
  function addWhitelist(address _account) external whenNotPaused onlyAdmin {
    require(_account!=address(0));

    if(!whitelist[_account]) {
      whitelist[_account] = true;

      emit WhitelistAdded(_account);
    }
  }

  ///@notice Adds multiple accounts to the whitelist.
  ///@param _accounts The wallet addresses to add to the whitelist.
  function addManyWhitelist(address[] _accounts) external whenNotPaused onlyAdmin {
    for(uint8 i=0;i<_accounts.length;i++) {
      if(_accounts[i] != address(0) && !whitelist[_accounts[i]]) {
        whitelist[_accounts[i]] = true;

        emit WhitelistAdded(_accounts[i]);
      }
    }
  }

  ///@notice Removes an account from the whitelist.
  ///@param _account The wallet address to remove from the whitelist.
  function removeWhitelist(address _account) external whenNotPaused onlyAdmin {
    require(_account != address(0));
    if(whitelist[_account]) {
      whitelist[_account] = false;

      emit WhitelistRemoved(_account);
    }
  }

  ///@notice Removes multiple accounts from the whitelist.
  ///@param _accounts The wallet addresses to remove from the whitelist.
  function removeManyWhitelist(address[] _accounts) external whenNotPaused onlyAdmin {
    for(uint8 i=0;i<_accounts.length;i++) {
      if(_accounts[i] != address(0) && whitelist[_accounts[i]]) {
        whitelist[_accounts[i]] = false;
        
        emit WhitelistRemoved(_accounts[i]);
      }
    }
  }
}
///@title This contract enables to maintain a list of whitelisted wallets.
function removeWhitelist(address _account) external whenNotPaused onlyAdmin {
  require(_account != address(0));
  if(whitelist[_account]) {
    whitelist[_account] = false;

    emit WhitelistRemoved(_account);
  }
}

///@notice Removes an account from the whitelist.
///@param _account The wallet address to remove from the whitelist.