IOracle.sol 1.17 KB
Newer Older
XFT's avatar
.  
XFT committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface for Oracle.sol contract
 */
interface IOracle {
    function getCost(
        uint256 _amount,
        address _chainlinkFeed,
        address _xftPool
    ) external view returns (uint256);

    function getCostSimpleShift(
        uint256 _amount,
        address _chainlinkFeed,
        address _xftPool,
        address _tokenPool
    ) external view returns (uint256);

    function getTokensForAmount(
        address _pool,
        uint32 _interval,
        address _chainlinkFeed,
        uint256 _amount,
        bool _ethLeftSide,
        address _weth9
    ) external view returns (uint256);

    function ethLeftSide(address _chainlinkFeed) external view returns (bool);

    function getTokensRaw(
        address _xftPool,
        address _tokenPool,
        uint32 _interval,
        uint256 _amount,
        address _weth9
    ) external view returns (uint256);

    function isTokenBelowThreshold(
        uint256 _threshold,
        address _pool,
        uint32 _interval,
        address _chainlinkFeed,
        bool _ethLeftSide,
        address _weth9
    ) external view returns (bool);
}