# IPriceAggregator

_Contains the types for the GNSPriceAggregator facet_

## PriceAggregatorStorage

```solidity
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

```solidity
struct LiquidityPoolInfo {
  contract ILiquidityPool pool;
  bool isGnsToken0InLp;
  enum IPriceAggregator.PoolType poolType;
  uint80 __placeholder;
}
```

## Order

```solidity
struct Order {
  address user;
  uint32 index;
  enum ITradingStorage.PendingOrderType orderType;
  uint16 pairIndex;
  bool isLookback;
  uint32 __placeholder;
}
```

## OrderAnswer

```solidity
struct OrderAnswer {
  uint64 open;
  uint64 high;
  uint64 low;
  uint64 ts;
}
```

## LiquidityPoolInput

```solidity
struct LiquidityPoolInput {
  contract ILiquidityPool pool;
  enum IPriceAggregator.PoolType poolType;
}
```

## PoolType

```solidity
enum PoolType {
  UNISWAP_V3,
  ALGEBRA_v1_9
}
```
