// File: contracts/PriceOraclesInvert.sol



// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

// extra simplified interface IUniswapV2Pair without any unused functions
interface IUniswapV2Pair {function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);}

contract PriceOraclesInvert {

// simplified version of ownable (to save gas)
    address private _owner;
    constructor() {_owner = msg.sender;}
    modifier onlyOwner() {require(_owner == msg.sender, "Ownable: caller is not the owner"); _;}

// UNISWAP PART
    IUniswapV2Pair public EQT_ETHpool;
    function setEQT_ETHpool(address _addr) external onlyOwner {EQT_ETHpool = IUniswapV2Pair(_addr);}
//calculation can be unchecked, Res0 originally comes as uint112, it can't overflow uint256 by adding 18 decimals
    function getEQT_ETHprice() external view returns(uint256) {(uint Res0, uint Res1,) = EQT_ETHpool.getReserves(); unchecked {return((Res0*10**18)/Res1);}}
}