IPriceAggregator
Contains the types for the GNSPriceAggregator facet
PriceAggregatorStorage
struct PriceAggregatorStorage {
contract IChainlinkFeed linkUsdPriceFeed;
uint24 twapInterval;
uint8 minAnswers;
bytes32[2] jobIds;
address[] oracles;
mapping(uint8 => struct IPriceAggregator.LiquidityPoolInfo) collateralGnsLiquidityPools;
mapping(uint8 => contract IChainlinkFeed) collateralUsdPriceFeed;
mapping(bytes32 => struct IPriceAggregator.Order) orders;
mapping(address => mapping(uint32 => struct IPriceAggregator.OrderAnswer[])) orderAnswers;
contract LinkTokenInterface linkErc677;
uint96 __placeholder;
uint256 requestCount;
mapping(bytes32 => address) pendingRequests;
uint256[39] __gap;
}
LiquidityPoolInfo
struct LiquidityPoolInfo {
contract ILiquidityPool pool;
bool isGnsToken0InLp;
enum IPriceAggregator.PoolType poolType;
uint80 __placeholder;
}
Order
struct Order {
address user;
uint32 index;
enum ITradingStorage.PendingOrderType orderType;
uint16 pairIndex;
bool isLookback;
uint32 __placeholder;
}
OrderAnswer
struct OrderAnswer {
uint64 open;
uint64 high;
uint64 low;
uint64 ts;
}
LiquidityPoolInput
struct LiquidityPoolInput {
contract ILiquidityPool pool;
enum IPriceAggregator.PoolType poolType;
}
PoolType
enum PoolType {
UNISWAP_V3,
ALGEBRA_v1_9
}