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;
  mapping(uint256 => struct IPairsStorage.FeeGroup) feeGroups;
  struct IPairsStorage.GlobalTradeFeeParams globalTradeFeeParams;
  uint256[38] __gap;
}

Pair

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;
}

GlobalTradeFeeParams

struct GlobalTradeFeeParams {
  uint24 referralFeeP;
  uint24 govFeeP;
  uint24 triggerOrderFeeP;
  uint24 gnsOtcFeeP;
  uint24 gTokenFeeP;
  uint136 __placeholder;
}

FeeGroup

struct FeeGroup {
  uint40 totalPositionSizeFeeP;
  uint40 totalLiqCollateralFeeP;
  uint40 oraclePositionSizeFeeP;
  uint32 minPositionSizeUsd;
  uint104 __placeholder;
}

TradeFees

struct TradeFees {
  uint256 totalFeeCollateral;
  uint256 referralFeeCollateral;
  uint256 govFeeCollateral;
  uint256 triggerOrderFeeCollateral;
  uint256 gnsOtcFeeCollateral;
  uint256 gTokenFeeCollateral;
}

GroupLiquidationParams

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

FeedCalculation

enum FeedCalculation {
  DEFAULT,
  INVERT,
  COMBINE
}

Feed

@custom:deprecated

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

Fee

@custom:deprecated

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