@gainsnetwork/sdk 0.0.41 → 0.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/README.md +11 -11
  2. package/lib/constants.d.ts +217 -174
  3. package/lib/constants.js +231 -186
  4. package/lib/contracts/addresses.d.ts +2 -2
  5. package/lib/contracts/addresses.js +15 -15
  6. package/lib/contracts/addresses.json +35 -35
  7. package/lib/contracts/index.d.ts +6 -6
  8. package/lib/contracts/index.js +35 -35
  9. package/lib/contracts/types/generated/GFarmTradingStorageV5.d.ts +1911 -1911
  10. package/lib/contracts/types/generated/GFarmTradingStorageV5.js +2 -2
  11. package/lib/contracts/types/generated/GNSBorrowingFees.d.ts +1341 -1341
  12. package/lib/contracts/types/generated/GNSBorrowingFees.js +2 -2
  13. package/lib/contracts/types/generated/GNSBorrowingFeesV6_4.d.ts +1058 -1058
  14. package/lib/contracts/types/generated/GNSBorrowingFeesV6_4.js +2 -2
  15. package/lib/contracts/types/generated/GNSNftRewardsV6.d.ts +533 -533
  16. package/lib/contracts/types/generated/GNSNftRewardsV6.js +2 -2
  17. package/lib/contracts/types/generated/GNSNftRewardsV6_3_1.d.ts +613 -613
  18. package/lib/contracts/types/generated/GNSNftRewardsV6_3_1.js +2 -2
  19. package/lib/contracts/types/generated/GNSPairInfosV6_1.d.ts +911 -911
  20. package/lib/contracts/types/generated/GNSPairInfosV6_1.js +2 -2
  21. package/lib/contracts/types/generated/GNSPairsStorageV6.d.ts +660 -660
  22. package/lib/contracts/types/generated/GNSPairsStorageV6.js +2 -2
  23. package/lib/contracts/types/generated/GNSTradingCallbacksV6_4.d.ts +821 -821
  24. package/lib/contracts/types/generated/GNSTradingCallbacksV6_4.js +2 -2
  25. package/lib/contracts/types/generated/GTokenOpenPnlFeed.d.ts +557 -557
  26. package/lib/contracts/types/generated/GTokenOpenPnlFeed.js +2 -2
  27. package/lib/contracts/types/generated/GTokenV6_3_2.d.ts +1838 -1838
  28. package/lib/contracts/types/generated/GTokenV6_3_2.js +2 -2
  29. package/lib/contracts/types/generated/common.d.ts +22 -22
  30. package/lib/contracts/types/generated/common.js +2 -2
  31. package/lib/contracts/types/generated/factories/GFarmTradingStorageV5__factory.d.ts +83 -83
  32. package/lib/contracts/types/generated/factories/GFarmTradingStorageV5__factory.js +2691 -2691
  33. package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_4__factory.d.ts +113 -113
  34. package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_4__factory.js +1742 -1742
  35. package/lib/contracts/types/generated/factories/GNSBorrowingFees__factory.d.ts +128 -128
  36. package/lib/contracts/types/generated/factories/GNSBorrowingFees__factory.js +2206 -2206
  37. package/lib/contracts/types/generated/factories/GNSNftRewardsV6_3_1__factory.d.ts +100 -100
  38. package/lib/contracts/types/generated/factories/GNSNftRewardsV6_3_1__factory.js +1116 -1116
  39. package/lib/contracts/types/generated/factories/GNSNftRewardsV6__factory.d.ts +100 -100
  40. package/lib/contracts/types/generated/factories/GNSNftRewardsV6__factory.js +1003 -1003
  41. package/lib/contracts/types/generated/factories/GNSPairInfosV6_1__factory.d.ts +98 -98
  42. package/lib/contracts/types/generated/factories/GNSPairInfosV6_1__factory.js +1485 -1485
  43. package/lib/contracts/types/generated/factories/GNSPairsStorageV6__factory.d.ts +117 -117
  44. package/lib/contracts/types/generated/factories/GNSPairsStorageV6__factory.js +1265 -1265
  45. package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_4__factory.d.ts +82 -82
  46. package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_4__factory.js +1326 -1326
  47. package/lib/contracts/types/generated/factories/GTokenOpenPnlFeed__factory.d.ts +59 -59
  48. package/lib/contracts/types/generated/factories/GTokenOpenPnlFeed__factory.js +765 -765
  49. package/lib/contracts/types/generated/factories/GTokenV6_3_2__factory.d.ts +110 -110
  50. package/lib/contracts/types/generated/factories/GTokenV6_3_2__factory.js +2682 -2682
  51. package/lib/contracts/types/generated/factories/index.d.ts +9 -9
  52. package/lib/contracts/types/generated/factories/index.js +24 -24
  53. package/lib/contracts/types/generated/index.d.ts +19 -19
  54. package/lib/contracts/types/generated/index.js +45 -45
  55. package/lib/contracts/types/index.d.ts +23 -23
  56. package/lib/contracts/types/index.js +2 -2
  57. package/lib/contracts/utils/borrowingFees.d.ts +8 -8
  58. package/lib/contracts/utils/borrowingFees.js +28 -28
  59. package/lib/contracts/utils/index.d.ts +4 -4
  60. package/lib/contracts/utils/index.js +20 -20
  61. package/lib/contracts/utils/openLimitOrders.d.ts +8 -8
  62. package/lib/contracts/utils/openLimitOrders.js +88 -88
  63. package/lib/contracts/utils/openTrades.d.ts +9 -9
  64. package/lib/contracts/utils/openTrades.js +172 -172
  65. package/lib/contracts/utils/pairs.d.ts +7 -7
  66. package/lib/contracts/utils/pairs.js +115 -115
  67. package/lib/index.d.ts +7 -7
  68. package/lib/index.js +24 -24
  69. package/lib/markets/commodities.d.ts +1 -1
  70. package/lib/markets/commodities.js +31 -31
  71. package/lib/markets/crypto.d.ts +1 -1
  72. package/lib/markets/crypto.js +6 -6
  73. package/lib/markets/forex.d.ts +2 -2
  74. package/lib/markets/forex.js +38 -38
  75. package/lib/markets/index.d.ts +5 -5
  76. package/lib/markets/index.js +21 -21
  77. package/lib/markets/indices.d.ts +1 -1
  78. package/lib/markets/indices.js +6 -6
  79. package/lib/markets/stocks.d.ts +3 -3
  80. package/lib/markets/stocks.js +54 -54
  81. package/lib/trade/fees/borrowing/converter.d.ts +13 -13
  82. package/lib/trade/fees/borrowing/converter.js +41 -41
  83. package/lib/trade/fees/borrowing/index.d.ts +55 -55
  84. package/lib/trade/fees/borrowing/index.js +171 -171
  85. package/lib/trade/fees/borrowing/types.d.ts +36 -36
  86. package/lib/trade/fees/borrowing/types.js +2 -2
  87. package/lib/trade/fees/index.d.ts +16 -16
  88. package/lib/trade/fees/index.js +60 -60
  89. package/lib/trade/fees.d.ts +15 -0
  90. package/lib/trade/fees.js +45 -0
  91. package/lib/trade/index.d.ts +8 -8
  92. package/lib/trade/index.js +24 -24
  93. package/lib/trade/liquidation.d.ts +7 -7
  94. package/lib/trade/liquidation.js +18 -18
  95. package/lib/trade/oiWindows.d.ts +3 -3
  96. package/lib/trade/oiWindows.js +19 -19
  97. package/lib/trade/openLimitOrder.d.ts +2 -2
  98. package/lib/trade/openLimitOrder.js +24 -24
  99. package/lib/trade/pnl.d.ts +9 -9
  100. package/lib/trade/pnl.js +44 -44
  101. package/lib/trade/spread.d.ts +3 -3
  102. package/lib/trade/spread.js +32 -32
  103. package/lib/trade/types.d.ts +185 -185
  104. package/lib/trade/types.js +14 -14
  105. package/lib/utils/index.d.ts +1 -1
  106. package/lib/utils/index.js +17 -17
  107. package/lib/utils/packing.d.ts +2 -2
  108. package/lib/utils/packing.js +39 -39
  109. package/lib/vault/index.d.ts +7 -7
  110. package/lib/vault/index.js +11 -11
  111. package/package.json +104 -104
  112. package/lib/contracts/types/generated/GNSBorrowingFeesV6_3_2.d.ts +0 -979
  113. package/lib/contracts/types/generated/GNSBorrowingFeesV6_3_2.js +0 -2
  114. package/lib/contracts/types/generated/GNSTradingCallbacksV6_3_2.d.ts +0 -806
  115. package/lib/contracts/types/generated/GNSTradingCallbacksV6_3_2.js +0 -2
  116. package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_3_2__factory.d.ts +0 -88
  117. package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_3_2__factory.js +0 -1654
  118. package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_3_2__factory.d.ts +0 -82
  119. package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_3_2__factory.js +0 -1273
package/lib/constants.js CHANGED
@@ -1,186 +1,231 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.delistedGroupsIxs = exports.delistedPairIxs = exports.defaultSpreadReductionsP100 = exports.stockSplits = exports.tickerChanges = exports.getAssetClassFromGroupIndex = exports.pairs = void 0;
4
- exports.pairs = {
5
- "BTC/USD": "crypto",
6
- "ETH/USD": "crypto",
7
- "LINK/USD": "crypto",
8
- "DOGE/USD": "crypto",
9
- "MATIC/USD": "crypto",
10
- "ADA/USD": "crypto",
11
- "SUSHI/USD": "crypto",
12
- "AAVE/USD": "crypto",
13
- "ALGO/USD": "crypto",
14
- "BAT/USD": "crypto",
15
- "COMP/USD": "crypto",
16
- "DOT/USD": "crypto",
17
- "EOS/USD": "crypto",
18
- "LTC/USD": "crypto",
19
- "MANA/USD": "crypto",
20
- "OMG/USD": "crypto",
21
- "SNX/USD": "crypto",
22
- "UNI/USD": "crypto",
23
- "XLM/USD": "crypto",
24
- "XRP/USD": "crypto",
25
- "ZEC/USD": "crypto",
26
- "EUR/USD": "forex",
27
- "USD/JPY": "forex",
28
- "GBP/USD": "forex",
29
- "USD/CHF": "forex",
30
- "AUD/USD": "forex",
31
- "USD/CAD": "forex",
32
- "NZD/USD": "forex",
33
- "EUR/CHF": "forex",
34
- "EUR/JPY": "forex",
35
- "EUR/GBP": "forex",
36
- "LUNA/USD": "crypto",
37
- "YFI/USD": "crypto",
38
- "SOL/USD": "crypto",
39
- "XTZ/USD": "crypto",
40
- "BCH/USD": "crypto",
41
- "BNT/USD": "crypto",
42
- "CRV/USD": "crypto",
43
- "DASH/USD": "crypto",
44
- "ETC/USD": "crypto",
45
- "ICP/USD": "crypto",
46
- "MKR/USD": "crypto",
47
- "NEO/USD": "crypto",
48
- "THETA/USD": "crypto",
49
- "TRX/USD": "crypto",
50
- "ZRX/USD": "crypto",
51
- "SAND/USD": "crypto",
52
- "BNB/USD": "crypto",
53
- "AXS/USD": "crypto",
54
- "GRT/USD": "crypto",
55
- "HBAR/USD": "crypto",
56
- "XMR/USD": "crypto",
57
- "ENJ/USD": "crypto",
58
- "FTM/USD": "crypto",
59
- "FTT/USD": "crypto",
60
- "APE/USD": "crypto",
61
- "CHZ/USD": "crypto",
62
- "SHIB/USD": "crypto",
63
- "AAPL/USD": "stocks",
64
- "FB/USD": "stocks",
65
- "GOOGL/USD": "stocks",
66
- "AMZN/USD": "stocks",
67
- "MSFT/USD": "stocks",
68
- "TSLA/USD": "stocks",
69
- "SNAP/USD": "stocks",
70
- "NVDA/USD": "stocks",
71
- "V/USD": "stocks",
72
- "MA/USD": "stocks",
73
- "PFE/USD": "stocks",
74
- "KO/USD": "stocks",
75
- "DIS/USD": "stocks",
76
- "GME/USD": "stocks",
77
- "NKE/USD": "stocks",
78
- "AMD/USD": "stocks",
79
- "PYPL/USD": "stocks",
80
- "ABNB/USD": "stocks",
81
- "BA/USD": "stocks",
82
- "SBUX/USD": "stocks",
83
- "WMT/USD": "stocks",
84
- "INTC/USD": "stocks",
85
- "MCD/USD": "stocks",
86
- "META/USD": "stocks",
87
- "GOOGL_1/USD": "stocks",
88
- "GME_1/USD": "stocks",
89
- "AMZN_1/USD": "stocks",
90
- "TSLA_1/USD": "stocks",
91
- "SPY/USD": "indices",
92
- "QQQ/USD": "indices",
93
- "IWM/USD": "indices",
94
- "DIA/USD": "indices",
95
- "XAU/USD": "commodities",
96
- "XAG/USD": "commodities",
97
- "USD/CNH": "forex",
98
- "USD/SGD": "forex",
99
- "EUR/SEK": "forex",
100
- "USD/KRW": "forex",
101
- "EUR/NOK": "forex",
102
- "USD/INR": "forex",
103
- "USD/MXN": "forex",
104
- "USD/TWD": "forex",
105
- "USD/ZAR": "forex",
106
- "USD/BRL": "forex",
107
- "AVAX/USD": "crypto",
108
- "ATOM/USD": "crypto",
109
- "NEAR/USD": "crypto",
110
- "QNT/USD": "crypto",
111
- "IOTA/USD": "crypto",
112
- "TON/USD": "crypto",
113
- "RPL/USD": "crypto",
114
- "ARB/USD": "crypto",
115
- "EUR/AUD": "forex",
116
- "EUR/NZD": "forex",
117
- "EUR/CAD": "forex",
118
- "GBP/AUD": "forex",
119
- "GBP/NZD": "forex",
120
- "GBP/CAD": "forex",
121
- "GBP/CHF": "forex",
122
- "GBP/JPY": "forex",
123
- "AUD/NZD": "forex",
124
- "AUD/CAD": "forex",
125
- "AUD/CHF": "forex",
126
- "AUD/JPY": "forex",
127
- "NZD/CAD": "forex",
128
- "NZD/CHF": "forex",
129
- "NZD/JPY": "forex",
130
- "CAD/CHF": "forex",
131
- "CAD/JPY": "forex",
132
- "CHF/JPY": "forex",
133
- "LDO/USD": "crypto",
134
- "INJ/USD": "crypto",
135
- "RUNE/USD": "crypto",
136
- "CAKE/USD": "crypto",
137
- "FXS/USD": "crypto",
138
- "TWT/USD": "crypto",
139
- "PEPE/USD": "crypto",
140
- "DYDX/USD": "crypto",
141
- "GMX/USD": "crypto",
142
- "RNDR/USD": "crypto",
143
- "SUI/USD": "crypto",
144
- "FIL/USD": "crypto",
145
- "FET/USD": "crypto",
146
- "WLD/USD": "crypto",
147
- "VET/USD": "crypto",
148
- "ZIL/USD": "crypto",
149
- };
150
- const getAssetClassFromGroupIndex = (groupIndex) => {
151
- switch (groupIndex) {
152
- case 0:
153
- return "crypto";
154
- case 1:
155
- case 8:
156
- case 9:
157
- return "forex";
158
- case 2:
159
- case 3:
160
- case 4:
161
- return "stocks";
162
- case 5:
163
- return "indices";
164
- case 6:
165
- case 7:
166
- return "commodities";
167
- }
168
- };
169
- exports.getAssetClassFromGroupIndex = getAssetClassFromGroupIndex;
170
- exports.tickerChanges = {
171
- FB: { newTicker: "META", date: "06/09/2022" },
172
- };
173
- exports.stockSplits = {
174
- "AMZN_1/USD": { date: "6/6/2022", split: 20 },
175
- "GOOGL_1/USD": { date: "7/18/2022", split: 20 },
176
- "GME_1/USD": { date: "7/22/2022", split: 4 },
177
- "TSLA_1/USD": { date: "8/25/2022", split: 3 },
178
- };
179
- exports.defaultSpreadReductionsP100 = [15, 20, 25, 30, 35];
180
- exports.delistedPairIxs = new Set([
181
- 6, 31, 36, 42, 45, 48, 50, 54, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
182
- 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
183
- 89, 97, 99, 101, 106, 107, 108, 52, 131, 132, 137, 138, 139, 140, 141, 142,
184
- 143,
185
- ]);
186
- exports.delistedGroupsIxs = new Set([6, 7]);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.delistedGroupsIxs = exports.delistedPairIxs = exports.defaultSpreadReductionsP100 = exports.stockSplits = exports.tickerChanges = exports.getAssetClassFromGroupIndex = exports.pairs = void 0;
4
+ exports.pairs = {
5
+ "BTC/USD": "crypto",
6
+ "ETH/USD": "crypto",
7
+ "LINK/USD": "crypto",
8
+ "DOGE/USD": "crypto",
9
+ "MATIC/USD": "crypto",
10
+ "ADA/USD": "crypto",
11
+ "SUSHI/USD": "crypto",
12
+ "AAVE/USD": "crypto",
13
+ "ALGO/USD": "crypto",
14
+ "BAT/USD": "crypto",
15
+ "COMP/USD": "crypto",
16
+ "DOT/USD": "crypto",
17
+ "EOS/USD": "crypto",
18
+ "LTC/USD": "crypto",
19
+ "MANA/USD": "crypto",
20
+ "OMG/USD": "crypto",
21
+ "SNX/USD": "crypto",
22
+ "UNI/USD": "crypto",
23
+ "XLM/USD": "crypto",
24
+ "XRP/USD": "crypto",
25
+ "ZEC/USD": "crypto",
26
+ "EUR/USD": "forex",
27
+ "USD/JPY": "forex",
28
+ "GBP/USD": "forex",
29
+ "USD/CHF": "forex",
30
+ "AUD/USD": "forex",
31
+ "USD/CAD": "forex",
32
+ "NZD/USD": "forex",
33
+ "EUR/CHF": "forex",
34
+ "EUR/JPY": "forex",
35
+ "EUR/GBP": "forex",
36
+ "LUNA/USD": "crypto",
37
+ "YFI/USD": "crypto",
38
+ "SOL/USD": "crypto",
39
+ "XTZ/USD": "crypto",
40
+ "BCH/USD": "crypto",
41
+ "BNT/USD": "crypto",
42
+ "CRV/USD": "crypto",
43
+ "DASH/USD": "crypto",
44
+ "ETC/USD": "crypto",
45
+ "ICP/USD": "crypto",
46
+ "MKR/USD": "crypto",
47
+ "NEO/USD": "crypto",
48
+ "THETA/USD": "crypto",
49
+ "TRX/USD": "crypto",
50
+ "ZRX/USD": "crypto",
51
+ "SAND/USD": "crypto",
52
+ "BNB/USD": "crypto",
53
+ "AXS/USD": "crypto",
54
+ "GRT/USD": "crypto",
55
+ "HBAR/USD": "crypto",
56
+ "XMR/USD": "crypto",
57
+ "ENJ/USD": "crypto",
58
+ "FTM/USD": "crypto",
59
+ "FTT/USD": "crypto",
60
+ "APE/USD": "crypto",
61
+ "CHZ/USD": "crypto",
62
+ "SHIB/USD": "crypto",
63
+ "AAPL/USD": "stocks",
64
+ "FB/USD": "stocks",
65
+ "GOOGL/USD": "stocks",
66
+ "AMZN/USD": "stocks",
67
+ "MSFT/USD": "stocks",
68
+ "TSLA/USD": "stocks",
69
+ "SNAP/USD": "stocks",
70
+ "NVDA/USD": "stocks",
71
+ "V/USD": "stocks",
72
+ "MA/USD": "stocks",
73
+ "PFE/USD": "stocks",
74
+ "KO/USD": "stocks",
75
+ "DIS/USD": "stocks",
76
+ "GME/USD": "stocks",
77
+ "NKE/USD": "stocks",
78
+ "AMD/USD": "stocks",
79
+ "PYPL/USD": "stocks",
80
+ "ABNB/USD": "stocks",
81
+ "BA/USD": "stocks",
82
+ "SBUX/USD": "stocks",
83
+ "WMT/USD": "stocks",
84
+ "INTC/USD": "stocks",
85
+ "MCD/USD": "stocks",
86
+ "META/USD": "stocks",
87
+ "GOOGL_1/USD": "stocks",
88
+ "GME_1/USD": "stocks",
89
+ "AMZN_1/USD": "stocks",
90
+ "TSLA_1/USD": "stocks",
91
+ "SPY/USD": "indices",
92
+ "QQQ/USD": "indices",
93
+ "IWM/USD": "indices",
94
+ "DIA/USD": "indices",
95
+ "XAU/USD": "commodities",
96
+ "XAG/USD": "commodities",
97
+ "USD/CNH": "forex",
98
+ "USD/SGD": "forex",
99
+ "EUR/SEK": "forex",
100
+ "USD/KRW": "forex",
101
+ "EUR/NOK": "forex",
102
+ "USD/INR": "forex",
103
+ "USD/MXN": "forex",
104
+ "USD/TWD": "forex",
105
+ "USD/ZAR": "forex",
106
+ "USD/BRL": "forex",
107
+ "AVAX/USD": "crypto",
108
+ "ATOM/USD": "crypto",
109
+ "NEAR/USD": "crypto",
110
+ "QNT/USD": "crypto",
111
+ "IOTA/USD": "crypto",
112
+ "TON/USD": "crypto",
113
+ "RPL/USD": "crypto",
114
+ "ARB/USD": "crypto",
115
+ "EUR/AUD": "forex",
116
+ "EUR/NZD": "forex",
117
+ "EUR/CAD": "forex",
118
+ "GBP/AUD": "forex",
119
+ "GBP/NZD": "forex",
120
+ "GBP/CAD": "forex",
121
+ "GBP/CHF": "forex",
122
+ "GBP/JPY": "forex",
123
+ "AUD/NZD": "forex",
124
+ "AUD/CAD": "forex",
125
+ "AUD/CHF": "forex",
126
+ "AUD/JPY": "forex",
127
+ "NZD/CAD": "forex",
128
+ "NZD/CHF": "forex",
129
+ "NZD/JPY": "forex",
130
+ "CAD/CHF": "forex",
131
+ "CAD/JPY": "forex",
132
+ "CHF/JPY": "forex",
133
+ "LDO/USD": "crypto",
134
+ "INJ/USD": "crypto",
135
+ "RUNE/USD": "crypto",
136
+ "CAKE/USD": "crypto",
137
+ "FXS/USD": "crypto",
138
+ "TWT/USD": "crypto",
139
+ "PEPE/USD": "crypto",
140
+ "DYDX/USD": "crypto",
141
+ "GMX/USD": "crypto",
142
+ "FIL/USD": "crypto",
143
+ "APT/USD": "crypto",
144
+ "IMX/USD": "crypto",
145
+ "VET/USD": "crypto",
146
+ "OP/USD": "crypto",
147
+ "RNDR/USD": "crypto",
148
+ "EGLD/USD": "crypto",
149
+ "TIA/USD": "crypto",
150
+ "STX/USD": "crypto",
151
+ "FLOW/USD": "crypto",
152
+ "KAVA/USD": "crypto",
153
+ "GALA/USD": "crypto",
154
+ "MINA/USD": "crypto",
155
+ "ORDI/USD": "crypto",
156
+ "ILV/USD": "crypto",
157
+ "KLAY/USD": "crypto",
158
+ "SUI/USD": "crypto",
159
+ "BLUR/USD": "crypto",
160
+ "FET/USD": "crypto",
161
+ "CFX/USD": "crypto",
162
+ "BEAM/USD": "crypto",
163
+ "AR/USD": "crypto",
164
+ "SEI/USD": "crypto",
165
+ "BTT/USD": "crypto",
166
+ "ROSE/USD": "crypto",
167
+ "WOO/USD": "crypto",
168
+ "AGIX/USD": "crypto",
169
+ "ZIL/USD": "crypto",
170
+ "GMT/USD": "crypto",
171
+ "ASTR/USD": "crypto",
172
+ "1INCH/USD": "crypto",
173
+ "FLOKI/USD": "crypto",
174
+ "QTUM/USD": "crypto",
175
+ "OCEAN/USD": "crypto",
176
+ "WLD/USD": "crypto",
177
+ "MASK/USD": "crypto",
178
+ "CELO/USD": "crypto",
179
+ "LRC/USD": "crypto",
180
+ "ENS/USD": "crypto",
181
+ "MEME/USD": "crypto",
182
+ "ANKR/USD": "crypto",
183
+ "IOTX/USD": "crypto",
184
+ "ICX/USD": "crypto",
185
+ "KSM/USD": "crypto",
186
+ "RVN/USD": "crypto",
187
+ "ANT/USD": "crypto",
188
+ "WAVES/USD": "crypto",
189
+ "SKL/USD": "crypto",
190
+ "SUPER/USD": "crypto",
191
+ "BAL/USD": "crypto",
192
+ };
193
+ const getAssetClassFromGroupIndex = (groupIndex) => {
194
+ switch (groupIndex) {
195
+ case 0:
196
+ return "crypto";
197
+ case 1:
198
+ case 8:
199
+ case 9:
200
+ return "forex";
201
+ case 2:
202
+ case 3:
203
+ case 4:
204
+ return "stocks";
205
+ case 5:
206
+ return "indices";
207
+ case 6:
208
+ case 7:
209
+ return "commodities";
210
+ }
211
+ };
212
+ exports.getAssetClassFromGroupIndex = getAssetClassFromGroupIndex;
213
+ exports.tickerChanges = {
214
+ FB: { newTicker: "META", date: "06/09/2022" },
215
+ };
216
+ exports.stockSplits = {
217
+ "AMZN_1/USD": { date: "6/6/2022", split: 20 },
218
+ "GOOGL_1/USD": { date: "7/18/2022", split: 20 },
219
+ "GME_1/USD": { date: "7/22/2022", split: 4 },
220
+ "TSLA_1/USD": { date: "8/25/2022", split: 3 },
221
+ };
222
+ exports.defaultSpreadReductionsP100 = [15, 20, 25, 30, 35];
223
+ exports.delistedPairIxs = new Set([
224
+ 6, 31, 36, 42, 45, 48, 50, 54, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
225
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
226
+ 89, 97, 99, 101, 106, 107, 108, 52, 131, 132, 137, 138, 139, 140, 141, 142,
227
+ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
228
+ 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
229
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
230
+ ]);
231
+ exports.delistedGroupsIxs = new Set([6, 7]);
@@ -1,2 +1,2 @@
1
- import { ContractAddresses } from "./types";
2
- export declare const getContractAddressesForChain: (chainId: number) => ContractAddresses;
1
+ import { ContractAddresses } from "./types";
2
+ export declare const getContractAddressesForChain: (chainId: number) => ContractAddresses;
@@ -1,15 +1,15 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getContractAddressesForChain = void 0;
7
- const addresses_json_1 = __importDefault(require("./addresses.json"));
8
- const getContractAddressesForChain = (chainId) => {
9
- const _addresses = addresses_json_1.default;
10
- if (!_addresses[chainId]) {
11
- throw new Error(`Unknown chain id (${chainId}). No known contracts have been deployed on this chain.`);
12
- }
13
- return _addresses[chainId];
14
- };
15
- exports.getContractAddressesForChain = getContractAddressesForChain;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getContractAddressesForChain = void 0;
7
+ const addresses_json_1 = __importDefault(require("./addresses.json"));
8
+ const getContractAddressesForChain = (chainId) => {
9
+ const _addresses = addresses_json_1.default;
10
+ if (!_addresses[chainId]) {
11
+ throw new Error(`Unknown chain id (${chainId}). No known contracts have been deployed on this chain.`);
12
+ }
13
+ return _addresses[chainId];
14
+ };
15
+ exports.getContractAddressesForChain = getContractAddressesForChain;
@@ -1,35 +1,35 @@
1
- {
2
- "137": {
3
- "gfarmTradingStorageV5": "0xaee4d11a16B2bc65EDD6416Fb626EB404a6D65BD",
4
- "gnsPairsStorageV6": "0x6e5326e944F528c243B9Ca5d14fe5C9269a8c922",
5
- "gnsPairInfosV6_1": "0xEe7442aCcC1C27f2C69423576d3b1D25b563E977",
6
- "gTokenOpenPnlFeed": "0x8d687276543b92819F2f2B5C3faad4AD27F4440c",
7
- "gnsNftRewardsV6": "0x3470756E5B490a974Bc25FeEeEb24c11102f5268",
8
- "gnsNftRewardsV6_3_1": "0x8103C0665A544201BBF606d90845d1B2D8005F1c",
9
- "gnsBorrowingFeesV6_3_2": "0x83AE6fADB88872D77299550Dc746b95D0196FE15",
10
- "gnsTradingCallbacksV6_3_2": "0x82e59334da8c667797009bbe82473b55c7a6b311",
11
- "gDai": "0x91993f2101cc758D0dEB7279d41e880F7dEFe827"
12
- },
13
- "42161": {
14
- "gfarmTradingStorageV5": "0xcFa6ebD475d89dB04cAd5A756fff1cb2BC5bE33c",
15
- "gnsPairsStorageV6": "0xf67Df2a4339eC1591615d94599081Dd037960d4b",
16
- "gnsPairInfosV6_1": "0x04a5e3cf21B0080B72fAcDca634349A56982D497",
17
- "gTokenOpenPnlFeed": "0x990BA9Edd8a9615A23E4c452E63A80e519A4a23D",
18
- "gnsNftRewardsV6": "0xc2d107e870927E3fb1127E6c1a33De5C863505b8",
19
- "gnsNftRewardsV6_3_1": "0xde5750071CacA8db173FC6543D23d0BCACACFEC3",
20
- "gnsBorrowingFeesV6_3_2": "0xA03e32a42C75FDdDc9a39973ddd082F147393154",
21
- "gnsTradingCallbacksV6_3_2": "0x298a695906e16aea0a184a2815a76ead1a0b7522",
22
- "gDai": "0xd85E038593d7A098614721EaE955EC2022B9B91B"
23
- },
24
- "80001": {
25
- "gfarmTradingStorageV5": "0x4d2dF485c608aa55A23d8d98dD2B4FA24Ba0f2Cf",
26
- "gnsPairsStorageV6": "0xF7F324bc1D659f01A9a8d00C40d65568b25b4007",
27
- "gnsPairInfosV6_1": "0xe780bBf94b0257fEDccF4EAEcBC70722E6F5F574",
28
- "gTokenOpenPnlFeed": "0xA7C829CB2346E12DC49Fd5ea8002Abaf48E9396C",
29
- "gnsNftRewardsV6": "0x3982E3de77DAd60373C0c2c539fCb93Bd288D2f5",
30
- "gnsNftRewardsV6_3_1": "0xf7Ac400b45Bdd2E098FaCA3642bE4d01071BC73B",
31
- "gnsBorrowingFeesV6_3_2": "0xA280c8e34dcD6A835183E13CA82c6fAE20988644",
32
- "gnsTradingCallbacksV6_3_2": "0xA7443A20B42f9156F7D9DB01e51523C42CAC8eCE",
33
- "gDai": "0x5215C8B3e76D493c8bcb9A7352F7afe18A6bb091"
34
- }
35
- }
1
+ {
2
+ "137": {
3
+ "gfarmTradingStorageV5": "0xaee4d11a16B2bc65EDD6416Fb626EB404a6D65BD",
4
+ "gnsPairsStorageV6": "0x6e5326e944F528c243B9Ca5d14fe5C9269a8c922",
5
+ "gnsPairInfosV6_1": "0xEe7442aCcC1C27f2C69423576d3b1D25b563E977",
6
+ "gTokenOpenPnlFeed": "0x8d687276543b92819F2f2B5C3faad4AD27F4440c",
7
+ "gnsNftRewardsV6": "0x3470756E5B490a974Bc25FeEeEb24c11102f5268",
8
+ "gnsNftRewardsV6_3_1": "0x8103C0665A544201BBF606d90845d1B2D8005F1c",
9
+ "gnsBorrowingFeesV6_3_2": "0x83AE6fADB88872D77299550Dc746b95D0196FE15",
10
+ "gnsTradingCallbacksV6_3_2": "0x82e59334da8c667797009bbe82473b55c7a6b311",
11
+ "gDai": "0x91993f2101cc758D0dEB7279d41e880F7dEFe827"
12
+ },
13
+ "42161": {
14
+ "gfarmTradingStorageV5": "0xcFa6ebD475d89dB04cAd5A756fff1cb2BC5bE33c",
15
+ "gnsPairsStorageV6": "0xf67Df2a4339eC1591615d94599081Dd037960d4b",
16
+ "gnsPairInfosV6_1": "0x04a5e3cf21B0080B72fAcDca634349A56982D497",
17
+ "gTokenOpenPnlFeed": "0x990BA9Edd8a9615A23E4c452E63A80e519A4a23D",
18
+ "gnsNftRewardsV6": "0xc2d107e870927E3fb1127E6c1a33De5C863505b8",
19
+ "gnsNftRewardsV6_3_1": "0xde5750071CacA8db173FC6543D23d0BCACACFEC3",
20
+ "gnsBorrowingFeesV6_3_2": "0xA03e32a42C75FDdDc9a39973ddd082F147393154",
21
+ "gnsTradingCallbacksV6_3_2": "0x298a695906e16aea0a184a2815a76ead1a0b7522",
22
+ "gDai": "0xd85E038593d7A098614721EaE955EC2022B9B91B"
23
+ },
24
+ "80001": {
25
+ "gfarmTradingStorageV5": "0x4d2dF485c608aa55A23d8d98dD2B4FA24Ba0f2Cf",
26
+ "gnsPairsStorageV6": "0xF7F324bc1D659f01A9a8d00C40d65568b25b4007",
27
+ "gnsPairInfosV6_1": "0xe780bBf94b0257fEDccF4EAEcBC70722E6F5F574",
28
+ "gTokenOpenPnlFeed": "0xA7C829CB2346E12DC49Fd5ea8002Abaf48E9396C",
29
+ "gnsNftRewardsV6": "0x3982E3de77DAd60373C0c2c539fCb93Bd288D2f5",
30
+ "gnsNftRewardsV6_3_1": "0xf7Ac400b45Bdd2E098FaCA3642bE4d01071BC73B",
31
+ "gnsBorrowingFeesV6_3_2": "0xA280c8e34dcD6A835183E13CA82c6fAE20988644",
32
+ "gnsTradingCallbacksV6_3_2": "0xA7443A20B42f9156F7D9DB01e51523C42CAC8eCE",
33
+ "gDai": "0x5215C8B3e76D493c8bcb9A7352F7afe18A6bb091"
34
+ }
35
+ }
@@ -1,6 +1,6 @@
1
- import type { Signer } from "ethers";
2
- import type { Provider } from "@ethersproject/providers";
3
- import { Contracts } from "./types";
4
- export declare const getContractsForChain: (chainId: number, signerOrProvider?: Signer | Provider) => Contracts;
5
- export * from "./utils";
6
- export * from "./addresses";
1
+ import type { Signer } from "ethers";
2
+ import type { Provider } from "@ethersproject/providers";
3
+ import { Contracts } from "./types";
4
+ export declare const getContractsForChain: (chainId: number, signerOrProvider?: Signer | Provider) => Contracts;
5
+ export * from "./utils";
6
+ export * from "./addresses";
@@ -1,35 +1,35 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.getContractsForChain = void 0;
18
- const addresses_1 = require("./addresses");
19
- const factories_1 = require("./types/generated/factories");
20
- const getContractsForChain = (chainId, signerOrProvider) => {
21
- const addresses = (0, addresses_1.getContractAddressesForChain)(chainId);
22
- return {
23
- gfarmTradingStorageV5: factories_1.GFarmTradingStorageV5__factory.connect(addresses.gfarmTradingStorageV5, signerOrProvider),
24
- gnsPairInfosV6_1: factories_1.GNSPairInfosV6_1__factory.connect(addresses.gnsPairInfosV6_1, signerOrProvider),
25
- gnsPairsStorageV6: factories_1.GNSPairsStorageV6__factory.connect(addresses.gnsPairsStorageV6, signerOrProvider),
26
- gTokenOpenPnlFeed: factories_1.GTokenOpenPnlFeed__factory.connect(addresses.gTokenOpenPnlFeed, signerOrProvider),
27
- gnsNftRewards: factories_1.GNSNftRewardsV6_3_1__factory.connect(addresses.gnsNftRewardsV6_3_1, signerOrProvider),
28
- gnsBorrowingFees: factories_1.GNSBorrowingFees__factory.connect(addresses.gnsBorrowingFeesV6_3_2, signerOrProvider),
29
- gnsTradingCallbacks: factories_1.GNSTradingCallbacksV6_4__factory.connect(addresses.gnsTradingCallbacksV6_3_2, signerOrProvider),
30
- gDai: factories_1.GTokenV6_3_2__factory.connect(addresses.gDai, signerOrProvider),
31
- };
32
- };
33
- exports.getContractsForChain = getContractsForChain;
34
- __exportStar(require("./utils"), exports);
35
- __exportStar(require("./addresses"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.getContractsForChain = void 0;
18
+ const addresses_1 = require("./addresses");
19
+ const factories_1 = require("./types/generated/factories");
20
+ const getContractsForChain = (chainId, signerOrProvider) => {
21
+ const addresses = (0, addresses_1.getContractAddressesForChain)(chainId);
22
+ return {
23
+ gfarmTradingStorageV5: factories_1.GFarmTradingStorageV5__factory.connect(addresses.gfarmTradingStorageV5, signerOrProvider),
24
+ gnsPairInfosV6_1: factories_1.GNSPairInfosV6_1__factory.connect(addresses.gnsPairInfosV6_1, signerOrProvider),
25
+ gnsPairsStorageV6: factories_1.GNSPairsStorageV6__factory.connect(addresses.gnsPairsStorageV6, signerOrProvider),
26
+ gTokenOpenPnlFeed: factories_1.GTokenOpenPnlFeed__factory.connect(addresses.gTokenOpenPnlFeed, signerOrProvider),
27
+ gnsNftRewards: factories_1.GNSNftRewardsV6_3_1__factory.connect(addresses.gnsNftRewardsV6_3_1, signerOrProvider),
28
+ gnsBorrowingFees: factories_1.GNSBorrowingFees__factory.connect(addresses.gnsBorrowingFeesV6_3_2, signerOrProvider),
29
+ gnsTradingCallbacks: factories_1.GNSTradingCallbacksV6_4__factory.connect(addresses.gnsTradingCallbacksV6_3_2, signerOrProvider),
30
+ gDai: factories_1.GTokenV6_3_2__factory.connect(addresses.gDai, signerOrProvider),
31
+ };
32
+ };
33
+ exports.getContractsForChain = getContractsForChain;
34
+ __exportStar(require("./utils"), exports);
35
+ __exportStar(require("./addresses"), exports);