contract Pausable is Context, PauserRole {
    /**
     * @dev Emitted when the pause is triggered by a pauser (`account`).
     */
    event Paused(address account, address target);

    /**
     * @dev Emitted when the pause is lifted by a pauser (`account`).
     */
    event Unpaused(address account, address target);

    // bool private _paused;

    mapping (address => bool) private _frozenAccount;


    /**
     * @dev Initializes the contract in unpaused state. Assigns the Pauser role
     * to the deployer.
     */
    constructor () internal {
        // _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused(address target) public view returns (bool) {
        return _frozenAccount[target];
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     */
    modifier whenNotPaused(address target) {
        require(!_frozenAccount[target], "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     */
    modifier whenPaused(address target) {
        require(_frozenAccount[target], "Pausable: not paused");
        _;
    }

    /**
     * @dev Called by a pauser to pause, triggers stopped state.
     */
    function pause(address target) public onlyPauser whenNotPaused(target) {
        // _paused = true;
        _frozenAccount[target] = true;

        emit Paused(_msgSender(), target);
    }

    /**
     * @dev Called by a pauser to unpause, returns to normal state.
     */
    function unpause(address target) public onlyPauser whenPaused(target) {
        // _paused = false;
        _frozenAccount[target] = false;
        emit Unpaused(_msgSender(), target);
    }
}
/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
function unpause(address target) public onlyPauser whenPaused(target) {
    // _paused = false;
    _frozenAccount[target] = false;
    emit Unpaused(_msgSender(), target);
}

/**
 * @dev Called by a pauser to unpause, returns to normal state.
 */