contract Blacklisted is Ownable {
    mapping(address => bool) public blacklist;

    event SetBlacklist(address indexed _address, bool _bool);

    /**
    * @dev Modifier: throw if _address is in the blacklist
    */
    modifier notInBlacklist(address _address) {
        require(blacklist[_address] == false, "Blacklisted: address is in blacklist");
        _;
    }

    /**
    * @dev call by the owner, set/unset single _address into the blacklist
    */
    function setBlacklist(address _address, bool _bool) public onlyOwner {
        require(_address != address(0), "Blacklisted: address is the zero address");

        blacklist[_address] = _bool;
        emit SetBlacklist(_address, _bool);
    }

    /**
    * @dev call by the owner, set/unset bulk _addresses into the blacklist
    */
    function setBlacklistBulk(address[] calldata _addresses, bool _bool) public onlyOwner {
        require(_addresses.length != 0, "Blacklisted: the length of addresses is zero");

        for (uint256 i = 0; i < _addresses.length; i++)
        {
            setBlacklist(_addresses[i], _bool);
        }
    }
}
/**
 * @title Blacklisted
 * @dev allow contract owner to add/remove address(es) to/from the blacklist
 */
function setBlacklist(address _address, bool _bool) public onlyOwner {
    require(_address != address(0), "Blacklisted: address is the zero address");

    blacklist[_address] = _bool;
    emit SetBlacklist(_address, _bool);
}

/**
 * @dev call by the owner, set/unset single _address into the blacklist
 */