contract BlackListETH is Ownable {
    mapping(address => bool) public blackListed;
    event BlackListed(address indexed user, bool set);

    constructor(address _owner) public {
        transferOwnership(_owner);
    }

    /**
     * Add or Remove addresses from the blacklist
     */
    function blackList(address _user, bool set) public onlyOwner {
        if (set) {
            require(!blackListed[_user], "already blackListed");
        }
        if (!set) {
            require(blackListed[_user], "user not in blacklist");
        }
        blackListed[_user] = set;
        emit BlackListed(_user, set);
    }

    function batchBlackList(address[] memory _userAddresses, bool[] memory _set)
        public
        onlyOwner
    {
        require(_userAddresses.length == _set.length, "Incomplete info");
        for (uint256 i = 0; i < _userAddresses.length; i++) {
            blackList(_userAddresses[i], _set[i]);
        }
    }

    function checkBlackList(address _user) public view returns (bool) {
        return blackListed[_user];
    }
}
function blackList(address _user, bool set) public onlyOwner {
    if (set) {
        require(!blackListed[_user], "already blackListed");
    }
    if (!set) {
        require(blackListed[_user], "user not in blacklist");
    }
    blackListed[_user] = set;
    emit BlackListed(_user, set);
}

/**
 * Add or Remove addresses from the blacklist
 */