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.UniV3PoolInfo) collateralGnsUniV3Pools;
  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[41] __gap;
}

UniV3PoolInfo

struct UniV3PoolInfo {
  contract IUniswapV3Pool pool;
  bool isGnsToken0InLp;
  uint88 __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;
}