-
Notifications
You must be signed in to change notification settings - Fork 609
Expand file tree
/
Copy pathIPerpsV2ExchangeRate.sol
More file actions
27 lines (17 loc) · 983 Bytes
/
IPerpsV2ExchangeRate.sol
File metadata and controls
27 lines (17 loc) · 983 Bytes
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
pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;
import "./IPyth.sol";
// https://docs.synthetix.io/contracts/source/contracts/IPerpsV2ExchangeRate
interface IPerpsV2ExchangeRate {
function setOffchainOracle(IPyth _offchainOracle) external;
function setOffchainPriceFeedId(bytes32 assetId, bytes32 priceFeedId) external;
/* ========== VIEWS ========== */
function offchainOracle() external view returns (IPyth);
function offchainPriceFeedId(bytes32 assetId) external view returns (bytes32);
/* ---------- priceFeeds mutation ---------- */
function updatePythPrice(address sender, bytes[] calldata priceUpdateData) external payable;
// it is a view but it can revert
function resolveAndGetPrice(bytes32 assetId, uint maxAge) external view returns (uint price, uint publishTime);
// it is a view but it can revert
function resolveAndGetLatestPrice(bytes32 assetId) external view returns (uint price, uint publishTime);
}