// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IOracle { /** * @notice Doesn't refresh the price, but returns the latest value available without doing any transactional operations * @param base The asset in which the `amount` to be converted is represented * @param quote The asset in which the converted `value` will be represented * @param amount The amount to be converted from `base` to `quote` * @return value The converted value of `amount` from `base` to `quote` * @return updateTime The timestamp when the conversion price was taken */ function peek( bytes32 base, bytes32 quote, uint256 amount ) external view returns (uint256 value, uint256 updateTime); /** * @notice Does whatever work or queries will yield the most up-to-date price, and returns it. * @param base The asset in which the `amount` to be converted is represented * @param quote The asset in which the converted `value` will be represented * @param amount The amount to be converted from `base` to `quote` * @return value The converted value of `amount` from `base` to `quote` * @return updateTime The timestamp when the conversion price was taken */ function get( bytes32 base, bytes32 quote, uint256 amount ) external returns (uint256 value, uint256 updateTime); }