-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathIPythFactory.sol
28 lines (23 loc) · 1.03 KB
/
IPythFactory.sol
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
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.13;
import "@equilibria/root/token/types/Token18.sol";
import "@equilibria/root/attribute/interfaces/IFactory.sol";
import "@equilibria/perennial-v2/contracts/interfaces/IOracleProviderFactory.sol";
import "./IPythOracle.sol";
import "./IOracleFactory.sol";
interface IPythFactory is IOracleProviderFactory, IFactory {
struct Granularity {
uint64 latestGranularity;
uint64 currentGranularity;
uint128 effectiveAfter;
}
event GranularityUpdated(uint256 newGranularity, uint256 effectiveAfter);
error PythFactoryNotInstanceError();
error PythFactoryInvalidGranularityError();
function initialize(IOracleFactory oracleFactory) external;
function create(bytes32 id) external returns (IPythOracle oracle);
function claim(UFixed6 amount) external;
function current() external view returns (uint256);
function granularity() external view returns (Granularity memory);
function updateGranularity(uint256 newGranularity) external;
}