IPairsStorage

Contains the types for the GNSPairsStorage facet

PairsStorage

struct PairsStorage {
  mapping(uint256 => struct IPairsStorage.Pair) pairs;
  mapping(uint256 => struct IPairsStorage.Group) groups;
  mapping(uint256 => struct IPairsStorage.Fee) fees;
  mapping(string => mapping(string => bool)) isPairListed;
  mapping(uint256 => uint256) pairCustomMaxLeverage;
  uint256 currentOrderId;
  uint256 pairsCount;
  uint256 groupsCount;
  uint256 feesCount;
  mapping(uint256 => struct IPairsStorage.GroupLiquidationParams) groupLiquidationParams;
  uint256[40] __gap;
}

FeedCalculation

enum FeedCalculation {
  DEFAULT,
  INVERT,
  COMBINE
}

Feed

@custom:deprecated

struct Feed {
  address feed1;
  address feed2;
  enum IPairsStorage.FeedCalculation feedCalculation;
  uint256 maxDeviationP;
}

Pair

@custom:deprecated

struct Pair {
  string from;
  string to;
  struct IPairsStorage.Feed feed;
  uint256 spreadP;
  uint256 groupIndex;
  uint256 feeIndex;
}

Group

struct Group {
  string name;
  bytes32 job;
  uint256 minLeverage;
  uint256 maxLeverage;
}

Fee

struct Fee {
  string name;
  uint256 openFeeP;
  uint256 closeFeeP;
  uint256 oracleFeeP;
  uint256 triggerOrderFeeP;
  uint256 minPositionSizeUsd;
}

GroupLiquidationParams

struct GroupLiquidationParams {
  uint40 maxLiqSpreadP;
  uint40 startLiqThresholdP;
  uint40 endLiqThresholdP;
  uint24 startLeverage;
  uint24 endLeverage;
}