contract Ownable is IOwnable {
    address public override owner;
    address public newOwner;
    Proxiable public proxiable;

    event OwnerUpdate(address indexed _prevOwner, address indexed _newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() public {
        owner = msg.sender;
    }

    modifier onlyOwner {
        _onlyOwner();
        _;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    function _onlyOwner() internal view {
        require(msg.sender == owner || msg.sender == proxiable.proxy(), "ERR_ACCESS_DENIED");
    }

    function setProxiable(Proxiable _newProxiable) public virtual onlyOwner {
        proxiable = _newProxiable;
    }

    function renounceOwnership() public virtual onlyOwner {
        emit OwnerUpdate(owner, address(0));
        owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address _newOwner) public override onlyOwner {
        require(_newOwner != owner, "ERR_SAME_OWNER");
        newOwner = _newOwner;
    }

    /**
     * @dev Force transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function forceTransferOwnership(address _newOwner) public override onlyOwner {
        emit OwnerUpdate(owner, _newOwner);
        owner = _newOwner;
    }

    /**
     * @dev Accept ownership.
     * Can only be called by the current owner.
     */
    function acceptOwnership() override public {
        require(msg.sender == newOwner, "ERR_ACCESS_DENIED");
        emit OwnerUpdate(owner, newOwner);
        owner = newOwner;
        newOwner = address(0);
    }
}
function transferOwnership(address _newOwner) public override onlyOwner {
    require(_newOwner != owner, "ERR_SAME_OWNER");
    newOwner = _newOwner;
}

/**
 * @dev Transfers ownership of the contract to a new account (`newOwner`).
 * Can only be called by the current owner.
 */