@gainsnetwork/sdk 0.1.5 → 0.1.7

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 (139) hide show
  1. package/README.md +11 -11
  2. package/lib/constants.d.ts +229 -229
  3. package/lib/constants.js +246 -246
  4. package/lib/contracts/addresses.d.ts +3 -3
  5. package/lib/contracts/addresses.js +31 -31
  6. package/lib/contracts/addresses.json +89 -89
  7. package/lib/contracts/index.d.ts +8 -8
  8. package/lib/contracts/index.js +40 -40
  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 +1067 -1067
  12. package/lib/contracts/types/generated/GNSBorrowingFees.js +2 -2
  13. package/lib/contracts/types/generated/GNSBorrowingFeesV6_3_2.d.ts +979 -0
  14. package/lib/contracts/types/generated/GNSBorrowingFeesV6_3_2.js +2 -0
  15. package/lib/contracts/types/generated/GNSBorrowingFeesV6_4.d.ts +1058 -1058
  16. package/lib/contracts/types/generated/GNSBorrowingFeesV6_4.js +2 -2
  17. package/lib/contracts/types/generated/GNSMultiCollatDiamond.d.ts +1740 -1740
  18. package/lib/contracts/types/generated/GNSMultiCollatDiamond.js +2 -2
  19. package/lib/contracts/types/generated/GNSNftRewardsV6.d.ts +533 -533
  20. package/lib/contracts/types/generated/GNSNftRewardsV6.js +2 -2
  21. package/lib/contracts/types/generated/GNSNftRewardsV6_3_1.d.ts +613 -613
  22. package/lib/contracts/types/generated/GNSNftRewardsV6_3_1.js +2 -2
  23. package/lib/contracts/types/generated/GNSPairInfosV6_1.d.ts +911 -911
  24. package/lib/contracts/types/generated/GNSPairInfosV6_1.js +2 -2
  25. package/lib/contracts/types/generated/GNSPairsStorageV6.d.ts +660 -660
  26. package/lib/contracts/types/generated/GNSPairsStorageV6.js +2 -2
  27. package/lib/contracts/types/generated/GNSTrading.d.ts +758 -758
  28. package/lib/contracts/types/generated/GNSTrading.js +2 -2
  29. package/lib/contracts/types/generated/GNSTradingCallbacks.d.ts +875 -875
  30. package/lib/contracts/types/generated/GNSTradingCallbacks.js +2 -2
  31. package/lib/contracts/types/generated/GNSTradingCallbacksV6_3_2.d.ts +806 -0
  32. package/lib/contracts/types/generated/GNSTradingCallbacksV6_3_2.js +2 -0
  33. package/lib/contracts/types/generated/GNSTradingCallbacksV6_4.d.ts +821 -821
  34. package/lib/contracts/types/generated/GNSTradingCallbacksV6_4.js +2 -2
  35. package/lib/contracts/types/generated/GNSTradingStorage.d.ts +1387 -1387
  36. package/lib/contracts/types/generated/GNSTradingStorage.js +2 -2
  37. package/lib/contracts/types/generated/GToken.d.ts +1946 -1946
  38. package/lib/contracts/types/generated/GToken.js +2 -2
  39. package/lib/contracts/types/generated/GTokenOpenPnlFeed.d.ts +557 -557
  40. package/lib/contracts/types/generated/GTokenOpenPnlFeed.js +2 -2
  41. package/lib/contracts/types/generated/GTokenV6_3_2.d.ts +1838 -1838
  42. package/lib/contracts/types/generated/GTokenV6_3_2.js +2 -2
  43. package/lib/contracts/types/generated/common.d.ts +22 -22
  44. package/lib/contracts/types/generated/common.js +2 -2
  45. package/lib/contracts/types/generated/factories/GFarmTradingStorageV5__factory.d.ts +83 -83
  46. package/lib/contracts/types/generated/factories/GFarmTradingStorageV5__factory.js +2691 -2691
  47. package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_3_2__factory.d.ts +88 -0
  48. package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_3_2__factory.js +1654 -0
  49. package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_4__factory.d.ts +113 -113
  50. package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_4__factory.js +1742 -1742
  51. package/lib/contracts/types/generated/factories/GNSBorrowingFees__factory.d.ts +124 -124
  52. package/lib/contracts/types/generated/factories/GNSBorrowingFees__factory.js +1784 -1784
  53. package/lib/contracts/types/generated/factories/GNSMultiCollatDiamond__factory.d.ts +144 -144
  54. package/lib/contracts/types/generated/factories/GNSMultiCollatDiamond__factory.js +3094 -3094
  55. package/lib/contracts/types/generated/factories/GNSNftRewardsV6_3_1__factory.d.ts +100 -100
  56. package/lib/contracts/types/generated/factories/GNSNftRewardsV6_3_1__factory.js +1116 -1116
  57. package/lib/contracts/types/generated/factories/GNSNftRewardsV6__factory.d.ts +100 -100
  58. package/lib/contracts/types/generated/factories/GNSNftRewardsV6__factory.js +1003 -1003
  59. package/lib/contracts/types/generated/factories/GNSPairInfosV6_1__factory.d.ts +98 -98
  60. package/lib/contracts/types/generated/factories/GNSPairInfosV6_1__factory.js +1485 -1485
  61. package/lib/contracts/types/generated/factories/GNSPairsStorageV6__factory.d.ts +117 -117
  62. package/lib/contracts/types/generated/factories/GNSPairsStorageV6__factory.js +1265 -1265
  63. package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_3_2__factory.d.ts +82 -0
  64. package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_3_2__factory.js +1273 -0
  65. package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_4__factory.d.ts +82 -82
  66. package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_4__factory.js +1326 -1326
  67. package/lib/contracts/types/generated/factories/GNSTradingCallbacks__factory.d.ts +113 -113
  68. package/lib/contracts/types/generated/factories/GNSTradingCallbacks__factory.js +1428 -1428
  69. package/lib/contracts/types/generated/factories/GNSTradingStorage__factory.d.ts +96 -96
  70. package/lib/contracts/types/generated/factories/GNSTradingStorage__factory.js +2241 -2241
  71. package/lib/contracts/types/generated/factories/GNSTrading__factory.d.ts +95 -95
  72. package/lib/contracts/types/generated/factories/GNSTrading__factory.js +1071 -1071
  73. package/lib/contracts/types/generated/factories/GTokenOpenPnlFeed__factory.d.ts +59 -59
  74. package/lib/contracts/types/generated/factories/GTokenOpenPnlFeed__factory.js +765 -765
  75. package/lib/contracts/types/generated/factories/GTokenV6_3_2__factory.d.ts +110 -110
  76. package/lib/contracts/types/generated/factories/GTokenV6_3_2__factory.js +2682 -2682
  77. package/lib/contracts/types/generated/factories/GToken__factory.d.ts +121 -121
  78. package/lib/contracts/types/generated/factories/GToken__factory.js +2944 -2944
  79. package/lib/contracts/types/generated/factories/index.d.ts +10 -10
  80. package/lib/contracts/types/generated/factories/index.js +26 -26
  81. package/lib/contracts/types/generated/index.d.ts +21 -21
  82. package/lib/contracts/types/generated/index.js +47 -47
  83. package/lib/contracts/types/index.d.ts +27 -27
  84. package/lib/contracts/types/index.js +10 -10
  85. package/lib/contracts/utils/borrowingFees.d.ts +8 -8
  86. package/lib/contracts/utils/borrowingFees.js +28 -28
  87. package/lib/contracts/utils/index.d.ts +4 -4
  88. package/lib/contracts/utils/index.js +20 -20
  89. package/lib/contracts/utils/openLimitOrders.d.ts +8 -8
  90. package/lib/contracts/utils/openLimitOrders.js +88 -88
  91. package/lib/contracts/utils/openTrades.d.ts +9 -9
  92. package/lib/contracts/utils/openTrades.js +188 -188
  93. package/lib/contracts/utils/pairs.d.ts +7 -6
  94. package/lib/contracts/utils/pairs.js +296 -94
  95. package/lib/index.d.ts +7 -7
  96. package/lib/index.js +24 -24
  97. package/lib/markets/commodities.d.ts +1 -1
  98. package/lib/markets/commodities.js +31 -31
  99. package/lib/markets/crypto.d.ts +1 -1
  100. package/lib/markets/crypto.js +6 -6
  101. package/lib/markets/forex.d.ts +2 -2
  102. package/lib/markets/forex.js +38 -38
  103. package/lib/markets/index.d.ts +5 -5
  104. package/lib/markets/index.js +21 -21
  105. package/lib/markets/indices.d.ts +1 -1
  106. package/lib/markets/indices.js +6 -6
  107. package/lib/markets/stocks.d.ts +3 -3
  108. package/lib/markets/stocks.js +54 -54
  109. package/lib/trade/fees/borrowing/converter.d.ts +13 -13
  110. package/lib/trade/fees/borrowing/converter.js +41 -41
  111. package/lib/trade/fees/borrowing/index.d.ts +55 -55
  112. package/lib/trade/fees/borrowing/index.js +171 -171
  113. package/lib/trade/fees/borrowing/types.d.ts +36 -36
  114. package/lib/trade/fees/borrowing/types.js +2 -2
  115. package/lib/trade/fees/index.d.ts +3 -3
  116. package/lib/trade/fees/index.js +29 -29
  117. package/lib/trade/index.d.ts +8 -8
  118. package/lib/trade/index.js +24 -24
  119. package/lib/trade/liquidation.d.ts +3 -3
  120. package/lib/trade/liquidation.js +16 -16
  121. package/lib/trade/oiWindows.d.ts +3 -3
  122. package/lib/trade/oiWindows.js +20 -20
  123. package/lib/trade/openLimitOrder.d.ts +2 -2
  124. package/lib/trade/openLimitOrder.js +23 -23
  125. package/lib/trade/pnl.d.ts +7 -7
  126. package/lib/trade/pnl.js +33 -33
  127. package/lib/trade/spread.d.ts +2 -2
  128. package/lib/trade/spread.js +22 -22
  129. package/lib/trade/types.d.ts +372 -181
  130. package/lib/trade/types.js +208 -14
  131. package/lib/utils/index.d.ts +1 -1
  132. package/lib/utils/index.js +17 -17
  133. package/lib/utils/packing.d.ts +2 -2
  134. package/lib/utils/packing.js +39 -39
  135. package/lib/vault/index.d.ts +8 -8
  136. package/lib/vault/index.js +10 -10
  137. package/package.json +104 -104
  138. package/lib/trade/fees.d.ts +0 -15
  139. package/lib/trade/fees.js +0 -45
@@ -1,1265 +1,1265 @@
1
- "use strict";
2
- /* Autogenerated file. Do not edit manually. */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.GNSPairsStorageV6__factory = void 0;
7
- const ethers_1 = require("ethers");
8
- const _abi = [
9
- {
10
- inputs: [
11
- {
12
- internalType: "uint256",
13
- name: "_currentOrderId",
14
- type: "uint256",
15
- },
16
- ],
17
- stateMutability: "nonpayable",
18
- type: "constructor",
19
- },
20
- {
21
- anonymous: false,
22
- inputs: [
23
- {
24
- indexed: false,
25
- internalType: "uint256",
26
- name: "index",
27
- type: "uint256",
28
- },
29
- {
30
- indexed: false,
31
- internalType: "string",
32
- name: "name",
33
- type: "string",
34
- },
35
- ],
36
- name: "FeeAdded",
37
- type: "event",
38
- },
39
- {
40
- anonymous: false,
41
- inputs: [
42
- {
43
- indexed: false,
44
- internalType: "uint256",
45
- name: "index",
46
- type: "uint256",
47
- },
48
- ],
49
- name: "FeeUpdated",
50
- type: "event",
51
- },
52
- {
53
- anonymous: false,
54
- inputs: [
55
- {
56
- indexed: false,
57
- internalType: "uint256",
58
- name: "index",
59
- type: "uint256",
60
- },
61
- {
62
- indexed: false,
63
- internalType: "string",
64
- name: "name",
65
- type: "string",
66
- },
67
- ],
68
- name: "GroupAdded",
69
- type: "event",
70
- },
71
- {
72
- anonymous: false,
73
- inputs: [
74
- {
75
- indexed: false,
76
- internalType: "uint256",
77
- name: "index",
78
- type: "uint256",
79
- },
80
- ],
81
- name: "GroupUpdated",
82
- type: "event",
83
- },
84
- {
85
- anonymous: false,
86
- inputs: [
87
- {
88
- indexed: false,
89
- internalType: "uint256",
90
- name: "index",
91
- type: "uint256",
92
- },
93
- {
94
- indexed: false,
95
- internalType: "string",
96
- name: "from",
97
- type: "string",
98
- },
99
- {
100
- indexed: false,
101
- internalType: "string",
102
- name: "to",
103
- type: "string",
104
- },
105
- ],
106
- name: "PairAdded",
107
- type: "event",
108
- },
109
- {
110
- anonymous: false,
111
- inputs: [
112
- {
113
- indexed: false,
114
- internalType: "uint256",
115
- name: "index",
116
- type: "uint256",
117
- },
118
- ],
119
- name: "PairUpdated",
120
- type: "event",
121
- },
122
- {
123
- inputs: [
124
- {
125
- components: [
126
- {
127
- internalType: "string",
128
- name: "name",
129
- type: "string",
130
- },
131
- {
132
- internalType: "uint256",
133
- name: "openFeeP",
134
- type: "uint256",
135
- },
136
- {
137
- internalType: "uint256",
138
- name: "closeFeeP",
139
- type: "uint256",
140
- },
141
- {
142
- internalType: "uint256",
143
- name: "oracleFeeP",
144
- type: "uint256",
145
- },
146
- {
147
- internalType: "uint256",
148
- name: "nftLimitOrderFeeP",
149
- type: "uint256",
150
- },
151
- {
152
- internalType: "uint256",
153
- name: "referralFeeP",
154
- type: "uint256",
155
- },
156
- {
157
- internalType: "uint256",
158
- name: "minLevPosDai",
159
- type: "uint256",
160
- },
161
- ],
162
- internalType: "struct GNSPairsStorageV6.Fee",
163
- name: "_fee",
164
- type: "tuple",
165
- },
166
- ],
167
- name: "addFee",
168
- outputs: [],
169
- stateMutability: "nonpayable",
170
- type: "function",
171
- },
172
- {
173
- inputs: [
174
- {
175
- components: [
176
- {
177
- internalType: "string",
178
- name: "name",
179
- type: "string",
180
- },
181
- {
182
- internalType: "bytes32",
183
- name: "job",
184
- type: "bytes32",
185
- },
186
- {
187
- internalType: "uint256",
188
- name: "minLeverage",
189
- type: "uint256",
190
- },
191
- {
192
- internalType: "uint256",
193
- name: "maxLeverage",
194
- type: "uint256",
195
- },
196
- {
197
- internalType: "uint256",
198
- name: "maxCollateralP",
199
- type: "uint256",
200
- },
201
- ],
202
- internalType: "struct GNSPairsStorageV6.Group",
203
- name: "_group",
204
- type: "tuple",
205
- },
206
- ],
207
- name: "addGroup",
208
- outputs: [],
209
- stateMutability: "nonpayable",
210
- type: "function",
211
- },
212
- {
213
- inputs: [
214
- {
215
- components: [
216
- {
217
- internalType: "string",
218
- name: "from",
219
- type: "string",
220
- },
221
- {
222
- internalType: "string",
223
- name: "to",
224
- type: "string",
225
- },
226
- {
227
- components: [
228
- {
229
- internalType: "address",
230
- name: "feed1",
231
- type: "address",
232
- },
233
- {
234
- internalType: "address",
235
- name: "feed2",
236
- type: "address",
237
- },
238
- {
239
- internalType: "enum GNSPairsStorageV6.FeedCalculation",
240
- name: "feedCalculation",
241
- type: "uint8",
242
- },
243
- {
244
- internalType: "uint256",
245
- name: "maxDeviationP",
246
- type: "uint256",
247
- },
248
- ],
249
- internalType: "struct GNSPairsStorageV6.Feed",
250
- name: "feed",
251
- type: "tuple",
252
- },
253
- {
254
- internalType: "uint256",
255
- name: "spreadP",
256
- type: "uint256",
257
- },
258
- {
259
- internalType: "uint256",
260
- name: "groupIndex",
261
- type: "uint256",
262
- },
263
- {
264
- internalType: "uint256",
265
- name: "feeIndex",
266
- type: "uint256",
267
- },
268
- ],
269
- internalType: "struct GNSPairsStorageV6.Pair",
270
- name: "_pair",
271
- type: "tuple",
272
- },
273
- ],
274
- name: "addPair",
275
- outputs: [],
276
- stateMutability: "nonpayable",
277
- type: "function",
278
- },
279
- {
280
- inputs: [
281
- {
282
- components: [
283
- {
284
- internalType: "string",
285
- name: "from",
286
- type: "string",
287
- },
288
- {
289
- internalType: "string",
290
- name: "to",
291
- type: "string",
292
- },
293
- {
294
- components: [
295
- {
296
- internalType: "address",
297
- name: "feed1",
298
- type: "address",
299
- },
300
- {
301
- internalType: "address",
302
- name: "feed2",
303
- type: "address",
304
- },
305
- {
306
- internalType: "enum GNSPairsStorageV6.FeedCalculation",
307
- name: "feedCalculation",
308
- type: "uint8",
309
- },
310
- {
311
- internalType: "uint256",
312
- name: "maxDeviationP",
313
- type: "uint256",
314
- },
315
- ],
316
- internalType: "struct GNSPairsStorageV6.Feed",
317
- name: "feed",
318
- type: "tuple",
319
- },
320
- {
321
- internalType: "uint256",
322
- name: "spreadP",
323
- type: "uint256",
324
- },
325
- {
326
- internalType: "uint256",
327
- name: "groupIndex",
328
- type: "uint256",
329
- },
330
- {
331
- internalType: "uint256",
332
- name: "feeIndex",
333
- type: "uint256",
334
- },
335
- ],
336
- internalType: "struct GNSPairsStorageV6.Pair[]",
337
- name: "_pairs",
338
- type: "tuple[]",
339
- },
340
- ],
341
- name: "addPairs",
342
- outputs: [],
343
- stateMutability: "nonpayable",
344
- type: "function",
345
- },
346
- {
347
- inputs: [],
348
- name: "currentOrderId",
349
- outputs: [
350
- {
351
- internalType: "uint256",
352
- name: "",
353
- type: "uint256",
354
- },
355
- ],
356
- stateMutability: "view",
357
- type: "function",
358
- },
359
- {
360
- inputs: [
361
- {
362
- internalType: "uint256",
363
- name: "",
364
- type: "uint256",
365
- },
366
- ],
367
- name: "fees",
368
- outputs: [
369
- {
370
- internalType: "string",
371
- name: "name",
372
- type: "string",
373
- },
374
- {
375
- internalType: "uint256",
376
- name: "openFeeP",
377
- type: "uint256",
378
- },
379
- {
380
- internalType: "uint256",
381
- name: "closeFeeP",
382
- type: "uint256",
383
- },
384
- {
385
- internalType: "uint256",
386
- name: "oracleFeeP",
387
- type: "uint256",
388
- },
389
- {
390
- internalType: "uint256",
391
- name: "nftLimitOrderFeeP",
392
- type: "uint256",
393
- },
394
- {
395
- internalType: "uint256",
396
- name: "referralFeeP",
397
- type: "uint256",
398
- },
399
- {
400
- internalType: "uint256",
401
- name: "minLevPosDai",
402
- type: "uint256",
403
- },
404
- ],
405
- stateMutability: "view",
406
- type: "function",
407
- },
408
- {
409
- inputs: [],
410
- name: "feesCount",
411
- outputs: [
412
- {
413
- internalType: "uint256",
414
- name: "",
415
- type: "uint256",
416
- },
417
- ],
418
- stateMutability: "view",
419
- type: "function",
420
- },
421
- {
422
- inputs: [
423
- {
424
- internalType: "uint256",
425
- name: "_pairIndex",
426
- type: "uint256",
427
- },
428
- {
429
- internalType: "bool",
430
- name: "_long",
431
- type: "bool",
432
- },
433
- ],
434
- name: "groupCollateral",
435
- outputs: [
436
- {
437
- internalType: "uint256",
438
- name: "",
439
- type: "uint256",
440
- },
441
- ],
442
- stateMutability: "view",
443
- type: "function",
444
- },
445
- {
446
- inputs: [
447
- {
448
- internalType: "uint256",
449
- name: "_pairIndex",
450
- type: "uint256",
451
- },
452
- ],
453
- name: "groupMaxCollateral",
454
- outputs: [
455
- {
456
- internalType: "uint256",
457
- name: "",
458
- type: "uint256",
459
- },
460
- ],
461
- stateMutability: "view",
462
- type: "function",
463
- },
464
- {
465
- inputs: [
466
- {
467
- internalType: "uint256",
468
- name: "",
469
- type: "uint256",
470
- },
471
- ],
472
- name: "groups",
473
- outputs: [
474
- {
475
- internalType: "string",
476
- name: "name",
477
- type: "string",
478
- },
479
- {
480
- internalType: "bytes32",
481
- name: "job",
482
- type: "bytes32",
483
- },
484
- {
485
- internalType: "uint256",
486
- name: "minLeverage",
487
- type: "uint256",
488
- },
489
- {
490
- internalType: "uint256",
491
- name: "maxLeverage",
492
- type: "uint256",
493
- },
494
- {
495
- internalType: "uint256",
496
- name: "maxCollateralP",
497
- type: "uint256",
498
- },
499
- ],
500
- stateMutability: "view",
501
- type: "function",
502
- },
503
- {
504
- inputs: [
505
- {
506
- internalType: "uint256",
507
- name: "",
508
- type: "uint256",
509
- },
510
- {
511
- internalType: "uint256",
512
- name: "",
513
- type: "uint256",
514
- },
515
- ],
516
- name: "groupsCollaterals",
517
- outputs: [
518
- {
519
- internalType: "uint256",
520
- name: "",
521
- type: "uint256",
522
- },
523
- ],
524
- stateMutability: "view",
525
- type: "function",
526
- },
527
- {
528
- inputs: [],
529
- name: "groupsCount",
530
- outputs: [
531
- {
532
- internalType: "uint256",
533
- name: "",
534
- type: "uint256",
535
- },
536
- ],
537
- stateMutability: "view",
538
- type: "function",
539
- },
540
- {
541
- inputs: [
542
- {
543
- internalType: "uint256",
544
- name: "_pairIndex",
545
- type: "uint256",
546
- },
547
- ],
548
- name: "guaranteedSlEnabled",
549
- outputs: [
550
- {
551
- internalType: "bool",
552
- name: "",
553
- type: "bool",
554
- },
555
- ],
556
- stateMutability: "view",
557
- type: "function",
558
- },
559
- {
560
- inputs: [
561
- {
562
- internalType: "string",
563
- name: "",
564
- type: "string",
565
- },
566
- {
567
- internalType: "string",
568
- name: "",
569
- type: "string",
570
- },
571
- ],
572
- name: "isPairListed",
573
- outputs: [
574
- {
575
- internalType: "bool",
576
- name: "",
577
- type: "bool",
578
- },
579
- ],
580
- stateMutability: "view",
581
- type: "function",
582
- },
583
- {
584
- inputs: [
585
- {
586
- internalType: "uint256",
587
- name: "_pairIndex",
588
- type: "uint256",
589
- },
590
- ],
591
- name: "pairCloseFeeP",
592
- outputs: [
593
- {
594
- internalType: "uint256",
595
- name: "",
596
- type: "uint256",
597
- },
598
- ],
599
- stateMutability: "view",
600
- type: "function",
601
- },
602
- {
603
- inputs: [
604
- {
605
- internalType: "uint256",
606
- name: "_pairIndex",
607
- type: "uint256",
608
- },
609
- ],
610
- name: "pairFeed",
611
- outputs: [
612
- {
613
- components: [
614
- {
615
- internalType: "address",
616
- name: "feed1",
617
- type: "address",
618
- },
619
- {
620
- internalType: "address",
621
- name: "feed2",
622
- type: "address",
623
- },
624
- {
625
- internalType: "enum GNSPairsStorageV6.FeedCalculation",
626
- name: "feedCalculation",
627
- type: "uint8",
628
- },
629
- {
630
- internalType: "uint256",
631
- name: "maxDeviationP",
632
- type: "uint256",
633
- },
634
- ],
635
- internalType: "struct GNSPairsStorageV6.Feed",
636
- name: "",
637
- type: "tuple",
638
- },
639
- ],
640
- stateMutability: "view",
641
- type: "function",
642
- },
643
- {
644
- inputs: [
645
- {
646
- internalType: "uint256",
647
- name: "_pairIndex",
648
- type: "uint256",
649
- },
650
- ],
651
- name: "pairJob",
652
- outputs: [
653
- {
654
- internalType: "string",
655
- name: "",
656
- type: "string",
657
- },
658
- {
659
- internalType: "string",
660
- name: "",
661
- type: "string",
662
- },
663
- {
664
- internalType: "bytes32",
665
- name: "",
666
- type: "bytes32",
667
- },
668
- {
669
- internalType: "uint256",
670
- name: "",
671
- type: "uint256",
672
- },
673
- ],
674
- stateMutability: "nonpayable",
675
- type: "function",
676
- },
677
- {
678
- inputs: [
679
- {
680
- internalType: "uint256",
681
- name: "_pairIndex",
682
- type: "uint256",
683
- },
684
- ],
685
- name: "pairMaxLeverage",
686
- outputs: [
687
- {
688
- internalType: "uint256",
689
- name: "",
690
- type: "uint256",
691
- },
692
- ],
693
- stateMutability: "view",
694
- type: "function",
695
- },
696
- {
697
- inputs: [
698
- {
699
- internalType: "uint256",
700
- name: "_pairIndex",
701
- type: "uint256",
702
- },
703
- ],
704
- name: "pairMinLevPosDai",
705
- outputs: [
706
- {
707
- internalType: "uint256",
708
- name: "",
709
- type: "uint256",
710
- },
711
- ],
712
- stateMutability: "view",
713
- type: "function",
714
- },
715
- {
716
- inputs: [
717
- {
718
- internalType: "uint256",
719
- name: "_pairIndex",
720
- type: "uint256",
721
- },
722
- ],
723
- name: "pairMinLeverage",
724
- outputs: [
725
- {
726
- internalType: "uint256",
727
- name: "",
728
- type: "uint256",
729
- },
730
- ],
731
- stateMutability: "view",
732
- type: "function",
733
- },
734
- {
735
- inputs: [
736
- {
737
- internalType: "uint256",
738
- name: "_pairIndex",
739
- type: "uint256",
740
- },
741
- ],
742
- name: "pairNftLimitOrderFeeP",
743
- outputs: [
744
- {
745
- internalType: "uint256",
746
- name: "",
747
- type: "uint256",
748
- },
749
- ],
750
- stateMutability: "view",
751
- type: "function",
752
- },
753
- {
754
- inputs: [
755
- {
756
- internalType: "uint256",
757
- name: "_pairIndex",
758
- type: "uint256",
759
- },
760
- ],
761
- name: "pairOpenFeeP",
762
- outputs: [
763
- {
764
- internalType: "uint256",
765
- name: "",
766
- type: "uint256",
767
- },
768
- ],
769
- stateMutability: "view",
770
- type: "function",
771
- },
772
- {
773
- inputs: [
774
- {
775
- internalType: "uint256",
776
- name: "_pairIndex",
777
- type: "uint256",
778
- },
779
- ],
780
- name: "pairOracleFeeP",
781
- outputs: [
782
- {
783
- internalType: "uint256",
784
- name: "",
785
- type: "uint256",
786
- },
787
- ],
788
- stateMutability: "view",
789
- type: "function",
790
- },
791
- {
792
- inputs: [
793
- {
794
- internalType: "uint256",
795
- name: "_pairIndex",
796
- type: "uint256",
797
- },
798
- ],
799
- name: "pairReferralFeeP",
800
- outputs: [
801
- {
802
- internalType: "uint256",
803
- name: "",
804
- type: "uint256",
805
- },
806
- ],
807
- stateMutability: "view",
808
- type: "function",
809
- },
810
- {
811
- inputs: [
812
- {
813
- internalType: "uint256",
814
- name: "_pairIndex",
815
- type: "uint256",
816
- },
817
- ],
818
- name: "pairSpreadP",
819
- outputs: [
820
- {
821
- internalType: "uint256",
822
- name: "",
823
- type: "uint256",
824
- },
825
- ],
826
- stateMutability: "view",
827
- type: "function",
828
- },
829
- {
830
- inputs: [
831
- {
832
- internalType: "uint256",
833
- name: "",
834
- type: "uint256",
835
- },
836
- ],
837
- name: "pairs",
838
- outputs: [
839
- {
840
- internalType: "string",
841
- name: "from",
842
- type: "string",
843
- },
844
- {
845
- internalType: "string",
846
- name: "to",
847
- type: "string",
848
- },
849
- {
850
- components: [
851
- {
852
- internalType: "address",
853
- name: "feed1",
854
- type: "address",
855
- },
856
- {
857
- internalType: "address",
858
- name: "feed2",
859
- type: "address",
860
- },
861
- {
862
- internalType: "enum GNSPairsStorageV6.FeedCalculation",
863
- name: "feedCalculation",
864
- type: "uint8",
865
- },
866
- {
867
- internalType: "uint256",
868
- name: "maxDeviationP",
869
- type: "uint256",
870
- },
871
- ],
872
- internalType: "struct GNSPairsStorageV6.Feed",
873
- name: "feed",
874
- type: "tuple",
875
- },
876
- {
877
- internalType: "uint256",
878
- name: "spreadP",
879
- type: "uint256",
880
- },
881
- {
882
- internalType: "uint256",
883
- name: "groupIndex",
884
- type: "uint256",
885
- },
886
- {
887
- internalType: "uint256",
888
- name: "feeIndex",
889
- type: "uint256",
890
- },
891
- ],
892
- stateMutability: "view",
893
- type: "function",
894
- },
895
- {
896
- inputs: [
897
- {
898
- internalType: "uint256",
899
- name: "_index",
900
- type: "uint256",
901
- },
902
- ],
903
- name: "pairsBackend",
904
- outputs: [
905
- {
906
- components: [
907
- {
908
- internalType: "string",
909
- name: "from",
910
- type: "string",
911
- },
912
- {
913
- internalType: "string",
914
- name: "to",
915
- type: "string",
916
- },
917
- {
918
- components: [
919
- {
920
- internalType: "address",
921
- name: "feed1",
922
- type: "address",
923
- },
924
- {
925
- internalType: "address",
926
- name: "feed2",
927
- type: "address",
928
- },
929
- {
930
- internalType: "enum GNSPairsStorageV6.FeedCalculation",
931
- name: "feedCalculation",
932
- type: "uint8",
933
- },
934
- {
935
- internalType: "uint256",
936
- name: "maxDeviationP",
937
- type: "uint256",
938
- },
939
- ],
940
- internalType: "struct GNSPairsStorageV6.Feed",
941
- name: "feed",
942
- type: "tuple",
943
- },
944
- {
945
- internalType: "uint256",
946
- name: "spreadP",
947
- type: "uint256",
948
- },
949
- {
950
- internalType: "uint256",
951
- name: "groupIndex",
952
- type: "uint256",
953
- },
954
- {
955
- internalType: "uint256",
956
- name: "feeIndex",
957
- type: "uint256",
958
- },
959
- ],
960
- internalType: "struct GNSPairsStorageV6.Pair",
961
- name: "",
962
- type: "tuple",
963
- },
964
- {
965
- components: [
966
- {
967
- internalType: "string",
968
- name: "name",
969
- type: "string",
970
- },
971
- {
972
- internalType: "bytes32",
973
- name: "job",
974
- type: "bytes32",
975
- },
976
- {
977
- internalType: "uint256",
978
- name: "minLeverage",
979
- type: "uint256",
980
- },
981
- {
982
- internalType: "uint256",
983
- name: "maxLeverage",
984
- type: "uint256",
985
- },
986
- {
987
- internalType: "uint256",
988
- name: "maxCollateralP",
989
- type: "uint256",
990
- },
991
- ],
992
- internalType: "struct GNSPairsStorageV6.Group",
993
- name: "",
994
- type: "tuple",
995
- },
996
- {
997
- components: [
998
- {
999
- internalType: "string",
1000
- name: "name",
1001
- type: "string",
1002
- },
1003
- {
1004
- internalType: "uint256",
1005
- name: "openFeeP",
1006
- type: "uint256",
1007
- },
1008
- {
1009
- internalType: "uint256",
1010
- name: "closeFeeP",
1011
- type: "uint256",
1012
- },
1013
- {
1014
- internalType: "uint256",
1015
- name: "oracleFeeP",
1016
- type: "uint256",
1017
- },
1018
- {
1019
- internalType: "uint256",
1020
- name: "nftLimitOrderFeeP",
1021
- type: "uint256",
1022
- },
1023
- {
1024
- internalType: "uint256",
1025
- name: "referralFeeP",
1026
- type: "uint256",
1027
- },
1028
- {
1029
- internalType: "uint256",
1030
- name: "minLevPosDai",
1031
- type: "uint256",
1032
- },
1033
- ],
1034
- internalType: "struct GNSPairsStorageV6.Fee",
1035
- name: "",
1036
- type: "tuple",
1037
- },
1038
- ],
1039
- stateMutability: "view",
1040
- type: "function",
1041
- },
1042
- {
1043
- inputs: [],
1044
- name: "pairsCount",
1045
- outputs: [
1046
- {
1047
- internalType: "uint256",
1048
- name: "",
1049
- type: "uint256",
1050
- },
1051
- ],
1052
- stateMutability: "view",
1053
- type: "function",
1054
- },
1055
- {
1056
- inputs: [
1057
- {
1058
- internalType: "uint256",
1059
- name: "_id",
1060
- type: "uint256",
1061
- },
1062
- {
1063
- components: [
1064
- {
1065
- internalType: "string",
1066
- name: "name",
1067
- type: "string",
1068
- },
1069
- {
1070
- internalType: "uint256",
1071
- name: "openFeeP",
1072
- type: "uint256",
1073
- },
1074
- {
1075
- internalType: "uint256",
1076
- name: "closeFeeP",
1077
- type: "uint256",
1078
- },
1079
- {
1080
- internalType: "uint256",
1081
- name: "oracleFeeP",
1082
- type: "uint256",
1083
- },
1084
- {
1085
- internalType: "uint256",
1086
- name: "nftLimitOrderFeeP",
1087
- type: "uint256",
1088
- },
1089
- {
1090
- internalType: "uint256",
1091
- name: "referralFeeP",
1092
- type: "uint256",
1093
- },
1094
- {
1095
- internalType: "uint256",
1096
- name: "minLevPosDai",
1097
- type: "uint256",
1098
- },
1099
- ],
1100
- internalType: "struct GNSPairsStorageV6.Fee",
1101
- name: "_fee",
1102
- type: "tuple",
1103
- },
1104
- ],
1105
- name: "updateFee",
1106
- outputs: [],
1107
- stateMutability: "nonpayable",
1108
- type: "function",
1109
- },
1110
- {
1111
- inputs: [
1112
- {
1113
- internalType: "uint256",
1114
- name: "_id",
1115
- type: "uint256",
1116
- },
1117
- {
1118
- components: [
1119
- {
1120
- internalType: "string",
1121
- name: "name",
1122
- type: "string",
1123
- },
1124
- {
1125
- internalType: "bytes32",
1126
- name: "job",
1127
- type: "bytes32",
1128
- },
1129
- {
1130
- internalType: "uint256",
1131
- name: "minLeverage",
1132
- type: "uint256",
1133
- },
1134
- {
1135
- internalType: "uint256",
1136
- name: "maxLeverage",
1137
- type: "uint256",
1138
- },
1139
- {
1140
- internalType: "uint256",
1141
- name: "maxCollateralP",
1142
- type: "uint256",
1143
- },
1144
- ],
1145
- internalType: "struct GNSPairsStorageV6.Group",
1146
- name: "_group",
1147
- type: "tuple",
1148
- },
1149
- ],
1150
- name: "updateGroup",
1151
- outputs: [],
1152
- stateMutability: "nonpayable",
1153
- type: "function",
1154
- },
1155
- {
1156
- inputs: [
1157
- {
1158
- internalType: "uint256",
1159
- name: "_pairIndex",
1160
- type: "uint256",
1161
- },
1162
- {
1163
- internalType: "uint256",
1164
- name: "_amount",
1165
- type: "uint256",
1166
- },
1167
- {
1168
- internalType: "bool",
1169
- name: "_long",
1170
- type: "bool",
1171
- },
1172
- {
1173
- internalType: "bool",
1174
- name: "_increase",
1175
- type: "bool",
1176
- },
1177
- ],
1178
- name: "updateGroupCollateral",
1179
- outputs: [],
1180
- stateMutability: "nonpayable",
1181
- type: "function",
1182
- },
1183
- {
1184
- inputs: [
1185
- {
1186
- internalType: "uint256",
1187
- name: "_pairIndex",
1188
- type: "uint256",
1189
- },
1190
- {
1191
- components: [
1192
- {
1193
- internalType: "string",
1194
- name: "from",
1195
- type: "string",
1196
- },
1197
- {
1198
- internalType: "string",
1199
- name: "to",
1200
- type: "string",
1201
- },
1202
- {
1203
- components: [
1204
- {
1205
- internalType: "address",
1206
- name: "feed1",
1207
- type: "address",
1208
- },
1209
- {
1210
- internalType: "address",
1211
- name: "feed2",
1212
- type: "address",
1213
- },
1214
- {
1215
- internalType: "enum GNSPairsStorageV6.FeedCalculation",
1216
- name: "feedCalculation",
1217
- type: "uint8",
1218
- },
1219
- {
1220
- internalType: "uint256",
1221
- name: "maxDeviationP",
1222
- type: "uint256",
1223
- },
1224
- ],
1225
- internalType: "struct GNSPairsStorageV6.Feed",
1226
- name: "feed",
1227
- type: "tuple",
1228
- },
1229
- {
1230
- internalType: "uint256",
1231
- name: "spreadP",
1232
- type: "uint256",
1233
- },
1234
- {
1235
- internalType: "uint256",
1236
- name: "groupIndex",
1237
- type: "uint256",
1238
- },
1239
- {
1240
- internalType: "uint256",
1241
- name: "feeIndex",
1242
- type: "uint256",
1243
- },
1244
- ],
1245
- internalType: "struct GNSPairsStorageV6.Pair",
1246
- name: "_pair",
1247
- type: "tuple",
1248
- },
1249
- ],
1250
- name: "updatePair",
1251
- outputs: [],
1252
- stateMutability: "nonpayable",
1253
- type: "function",
1254
- },
1255
- ];
1256
- class GNSPairsStorageV6__factory {
1257
- static createInterface() {
1258
- return new ethers_1.utils.Interface(_abi);
1259
- }
1260
- static connect(address, signerOrProvider) {
1261
- return new ethers_1.Contract(address, _abi, signerOrProvider);
1262
- }
1263
- }
1264
- exports.GNSPairsStorageV6__factory = GNSPairsStorageV6__factory;
1265
- GNSPairsStorageV6__factory.abi = _abi;
1
+ "use strict";
2
+ /* Autogenerated file. Do not edit manually. */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.GNSPairsStorageV6__factory = void 0;
7
+ const ethers_1 = require("ethers");
8
+ const _abi = [
9
+ {
10
+ inputs: [
11
+ {
12
+ internalType: "uint256",
13
+ name: "_currentOrderId",
14
+ type: "uint256",
15
+ },
16
+ ],
17
+ stateMutability: "nonpayable",
18
+ type: "constructor",
19
+ },
20
+ {
21
+ anonymous: false,
22
+ inputs: [
23
+ {
24
+ indexed: false,
25
+ internalType: "uint256",
26
+ name: "index",
27
+ type: "uint256",
28
+ },
29
+ {
30
+ indexed: false,
31
+ internalType: "string",
32
+ name: "name",
33
+ type: "string",
34
+ },
35
+ ],
36
+ name: "FeeAdded",
37
+ type: "event",
38
+ },
39
+ {
40
+ anonymous: false,
41
+ inputs: [
42
+ {
43
+ indexed: false,
44
+ internalType: "uint256",
45
+ name: "index",
46
+ type: "uint256",
47
+ },
48
+ ],
49
+ name: "FeeUpdated",
50
+ type: "event",
51
+ },
52
+ {
53
+ anonymous: false,
54
+ inputs: [
55
+ {
56
+ indexed: false,
57
+ internalType: "uint256",
58
+ name: "index",
59
+ type: "uint256",
60
+ },
61
+ {
62
+ indexed: false,
63
+ internalType: "string",
64
+ name: "name",
65
+ type: "string",
66
+ },
67
+ ],
68
+ name: "GroupAdded",
69
+ type: "event",
70
+ },
71
+ {
72
+ anonymous: false,
73
+ inputs: [
74
+ {
75
+ indexed: false,
76
+ internalType: "uint256",
77
+ name: "index",
78
+ type: "uint256",
79
+ },
80
+ ],
81
+ name: "GroupUpdated",
82
+ type: "event",
83
+ },
84
+ {
85
+ anonymous: false,
86
+ inputs: [
87
+ {
88
+ indexed: false,
89
+ internalType: "uint256",
90
+ name: "index",
91
+ type: "uint256",
92
+ },
93
+ {
94
+ indexed: false,
95
+ internalType: "string",
96
+ name: "from",
97
+ type: "string",
98
+ },
99
+ {
100
+ indexed: false,
101
+ internalType: "string",
102
+ name: "to",
103
+ type: "string",
104
+ },
105
+ ],
106
+ name: "PairAdded",
107
+ type: "event",
108
+ },
109
+ {
110
+ anonymous: false,
111
+ inputs: [
112
+ {
113
+ indexed: false,
114
+ internalType: "uint256",
115
+ name: "index",
116
+ type: "uint256",
117
+ },
118
+ ],
119
+ name: "PairUpdated",
120
+ type: "event",
121
+ },
122
+ {
123
+ inputs: [
124
+ {
125
+ components: [
126
+ {
127
+ internalType: "string",
128
+ name: "name",
129
+ type: "string",
130
+ },
131
+ {
132
+ internalType: "uint256",
133
+ name: "openFeeP",
134
+ type: "uint256",
135
+ },
136
+ {
137
+ internalType: "uint256",
138
+ name: "closeFeeP",
139
+ type: "uint256",
140
+ },
141
+ {
142
+ internalType: "uint256",
143
+ name: "oracleFeeP",
144
+ type: "uint256",
145
+ },
146
+ {
147
+ internalType: "uint256",
148
+ name: "nftLimitOrderFeeP",
149
+ type: "uint256",
150
+ },
151
+ {
152
+ internalType: "uint256",
153
+ name: "referralFeeP",
154
+ type: "uint256",
155
+ },
156
+ {
157
+ internalType: "uint256",
158
+ name: "minLevPosDai",
159
+ type: "uint256",
160
+ },
161
+ ],
162
+ internalType: "struct GNSPairsStorageV6.Fee",
163
+ name: "_fee",
164
+ type: "tuple",
165
+ },
166
+ ],
167
+ name: "addFee",
168
+ outputs: [],
169
+ stateMutability: "nonpayable",
170
+ type: "function",
171
+ },
172
+ {
173
+ inputs: [
174
+ {
175
+ components: [
176
+ {
177
+ internalType: "string",
178
+ name: "name",
179
+ type: "string",
180
+ },
181
+ {
182
+ internalType: "bytes32",
183
+ name: "job",
184
+ type: "bytes32",
185
+ },
186
+ {
187
+ internalType: "uint256",
188
+ name: "minLeverage",
189
+ type: "uint256",
190
+ },
191
+ {
192
+ internalType: "uint256",
193
+ name: "maxLeverage",
194
+ type: "uint256",
195
+ },
196
+ {
197
+ internalType: "uint256",
198
+ name: "maxCollateralP",
199
+ type: "uint256",
200
+ },
201
+ ],
202
+ internalType: "struct GNSPairsStorageV6.Group",
203
+ name: "_group",
204
+ type: "tuple",
205
+ },
206
+ ],
207
+ name: "addGroup",
208
+ outputs: [],
209
+ stateMutability: "nonpayable",
210
+ type: "function",
211
+ },
212
+ {
213
+ inputs: [
214
+ {
215
+ components: [
216
+ {
217
+ internalType: "string",
218
+ name: "from",
219
+ type: "string",
220
+ },
221
+ {
222
+ internalType: "string",
223
+ name: "to",
224
+ type: "string",
225
+ },
226
+ {
227
+ components: [
228
+ {
229
+ internalType: "address",
230
+ name: "feed1",
231
+ type: "address",
232
+ },
233
+ {
234
+ internalType: "address",
235
+ name: "feed2",
236
+ type: "address",
237
+ },
238
+ {
239
+ internalType: "enum GNSPairsStorageV6.FeedCalculation",
240
+ name: "feedCalculation",
241
+ type: "uint8",
242
+ },
243
+ {
244
+ internalType: "uint256",
245
+ name: "maxDeviationP",
246
+ type: "uint256",
247
+ },
248
+ ],
249
+ internalType: "struct GNSPairsStorageV6.Feed",
250
+ name: "feed",
251
+ type: "tuple",
252
+ },
253
+ {
254
+ internalType: "uint256",
255
+ name: "spreadP",
256
+ type: "uint256",
257
+ },
258
+ {
259
+ internalType: "uint256",
260
+ name: "groupIndex",
261
+ type: "uint256",
262
+ },
263
+ {
264
+ internalType: "uint256",
265
+ name: "feeIndex",
266
+ type: "uint256",
267
+ },
268
+ ],
269
+ internalType: "struct GNSPairsStorageV6.Pair",
270
+ name: "_pair",
271
+ type: "tuple",
272
+ },
273
+ ],
274
+ name: "addPair",
275
+ outputs: [],
276
+ stateMutability: "nonpayable",
277
+ type: "function",
278
+ },
279
+ {
280
+ inputs: [
281
+ {
282
+ components: [
283
+ {
284
+ internalType: "string",
285
+ name: "from",
286
+ type: "string",
287
+ },
288
+ {
289
+ internalType: "string",
290
+ name: "to",
291
+ type: "string",
292
+ },
293
+ {
294
+ components: [
295
+ {
296
+ internalType: "address",
297
+ name: "feed1",
298
+ type: "address",
299
+ },
300
+ {
301
+ internalType: "address",
302
+ name: "feed2",
303
+ type: "address",
304
+ },
305
+ {
306
+ internalType: "enum GNSPairsStorageV6.FeedCalculation",
307
+ name: "feedCalculation",
308
+ type: "uint8",
309
+ },
310
+ {
311
+ internalType: "uint256",
312
+ name: "maxDeviationP",
313
+ type: "uint256",
314
+ },
315
+ ],
316
+ internalType: "struct GNSPairsStorageV6.Feed",
317
+ name: "feed",
318
+ type: "tuple",
319
+ },
320
+ {
321
+ internalType: "uint256",
322
+ name: "spreadP",
323
+ type: "uint256",
324
+ },
325
+ {
326
+ internalType: "uint256",
327
+ name: "groupIndex",
328
+ type: "uint256",
329
+ },
330
+ {
331
+ internalType: "uint256",
332
+ name: "feeIndex",
333
+ type: "uint256",
334
+ },
335
+ ],
336
+ internalType: "struct GNSPairsStorageV6.Pair[]",
337
+ name: "_pairs",
338
+ type: "tuple[]",
339
+ },
340
+ ],
341
+ name: "addPairs",
342
+ outputs: [],
343
+ stateMutability: "nonpayable",
344
+ type: "function",
345
+ },
346
+ {
347
+ inputs: [],
348
+ name: "currentOrderId",
349
+ outputs: [
350
+ {
351
+ internalType: "uint256",
352
+ name: "",
353
+ type: "uint256",
354
+ },
355
+ ],
356
+ stateMutability: "view",
357
+ type: "function",
358
+ },
359
+ {
360
+ inputs: [
361
+ {
362
+ internalType: "uint256",
363
+ name: "",
364
+ type: "uint256",
365
+ },
366
+ ],
367
+ name: "fees",
368
+ outputs: [
369
+ {
370
+ internalType: "string",
371
+ name: "name",
372
+ type: "string",
373
+ },
374
+ {
375
+ internalType: "uint256",
376
+ name: "openFeeP",
377
+ type: "uint256",
378
+ },
379
+ {
380
+ internalType: "uint256",
381
+ name: "closeFeeP",
382
+ type: "uint256",
383
+ },
384
+ {
385
+ internalType: "uint256",
386
+ name: "oracleFeeP",
387
+ type: "uint256",
388
+ },
389
+ {
390
+ internalType: "uint256",
391
+ name: "nftLimitOrderFeeP",
392
+ type: "uint256",
393
+ },
394
+ {
395
+ internalType: "uint256",
396
+ name: "referralFeeP",
397
+ type: "uint256",
398
+ },
399
+ {
400
+ internalType: "uint256",
401
+ name: "minLevPosDai",
402
+ type: "uint256",
403
+ },
404
+ ],
405
+ stateMutability: "view",
406
+ type: "function",
407
+ },
408
+ {
409
+ inputs: [],
410
+ name: "feesCount",
411
+ outputs: [
412
+ {
413
+ internalType: "uint256",
414
+ name: "",
415
+ type: "uint256",
416
+ },
417
+ ],
418
+ stateMutability: "view",
419
+ type: "function",
420
+ },
421
+ {
422
+ inputs: [
423
+ {
424
+ internalType: "uint256",
425
+ name: "_pairIndex",
426
+ type: "uint256",
427
+ },
428
+ {
429
+ internalType: "bool",
430
+ name: "_long",
431
+ type: "bool",
432
+ },
433
+ ],
434
+ name: "groupCollateral",
435
+ outputs: [
436
+ {
437
+ internalType: "uint256",
438
+ name: "",
439
+ type: "uint256",
440
+ },
441
+ ],
442
+ stateMutability: "view",
443
+ type: "function",
444
+ },
445
+ {
446
+ inputs: [
447
+ {
448
+ internalType: "uint256",
449
+ name: "_pairIndex",
450
+ type: "uint256",
451
+ },
452
+ ],
453
+ name: "groupMaxCollateral",
454
+ outputs: [
455
+ {
456
+ internalType: "uint256",
457
+ name: "",
458
+ type: "uint256",
459
+ },
460
+ ],
461
+ stateMutability: "view",
462
+ type: "function",
463
+ },
464
+ {
465
+ inputs: [
466
+ {
467
+ internalType: "uint256",
468
+ name: "",
469
+ type: "uint256",
470
+ },
471
+ ],
472
+ name: "groups",
473
+ outputs: [
474
+ {
475
+ internalType: "string",
476
+ name: "name",
477
+ type: "string",
478
+ },
479
+ {
480
+ internalType: "bytes32",
481
+ name: "job",
482
+ type: "bytes32",
483
+ },
484
+ {
485
+ internalType: "uint256",
486
+ name: "minLeverage",
487
+ type: "uint256",
488
+ },
489
+ {
490
+ internalType: "uint256",
491
+ name: "maxLeverage",
492
+ type: "uint256",
493
+ },
494
+ {
495
+ internalType: "uint256",
496
+ name: "maxCollateralP",
497
+ type: "uint256",
498
+ },
499
+ ],
500
+ stateMutability: "view",
501
+ type: "function",
502
+ },
503
+ {
504
+ inputs: [
505
+ {
506
+ internalType: "uint256",
507
+ name: "",
508
+ type: "uint256",
509
+ },
510
+ {
511
+ internalType: "uint256",
512
+ name: "",
513
+ type: "uint256",
514
+ },
515
+ ],
516
+ name: "groupsCollaterals",
517
+ outputs: [
518
+ {
519
+ internalType: "uint256",
520
+ name: "",
521
+ type: "uint256",
522
+ },
523
+ ],
524
+ stateMutability: "view",
525
+ type: "function",
526
+ },
527
+ {
528
+ inputs: [],
529
+ name: "groupsCount",
530
+ outputs: [
531
+ {
532
+ internalType: "uint256",
533
+ name: "",
534
+ type: "uint256",
535
+ },
536
+ ],
537
+ stateMutability: "view",
538
+ type: "function",
539
+ },
540
+ {
541
+ inputs: [
542
+ {
543
+ internalType: "uint256",
544
+ name: "_pairIndex",
545
+ type: "uint256",
546
+ },
547
+ ],
548
+ name: "guaranteedSlEnabled",
549
+ outputs: [
550
+ {
551
+ internalType: "bool",
552
+ name: "",
553
+ type: "bool",
554
+ },
555
+ ],
556
+ stateMutability: "view",
557
+ type: "function",
558
+ },
559
+ {
560
+ inputs: [
561
+ {
562
+ internalType: "string",
563
+ name: "",
564
+ type: "string",
565
+ },
566
+ {
567
+ internalType: "string",
568
+ name: "",
569
+ type: "string",
570
+ },
571
+ ],
572
+ name: "isPairListed",
573
+ outputs: [
574
+ {
575
+ internalType: "bool",
576
+ name: "",
577
+ type: "bool",
578
+ },
579
+ ],
580
+ stateMutability: "view",
581
+ type: "function",
582
+ },
583
+ {
584
+ inputs: [
585
+ {
586
+ internalType: "uint256",
587
+ name: "_pairIndex",
588
+ type: "uint256",
589
+ },
590
+ ],
591
+ name: "pairCloseFeeP",
592
+ outputs: [
593
+ {
594
+ internalType: "uint256",
595
+ name: "",
596
+ type: "uint256",
597
+ },
598
+ ],
599
+ stateMutability: "view",
600
+ type: "function",
601
+ },
602
+ {
603
+ inputs: [
604
+ {
605
+ internalType: "uint256",
606
+ name: "_pairIndex",
607
+ type: "uint256",
608
+ },
609
+ ],
610
+ name: "pairFeed",
611
+ outputs: [
612
+ {
613
+ components: [
614
+ {
615
+ internalType: "address",
616
+ name: "feed1",
617
+ type: "address",
618
+ },
619
+ {
620
+ internalType: "address",
621
+ name: "feed2",
622
+ type: "address",
623
+ },
624
+ {
625
+ internalType: "enum GNSPairsStorageV6.FeedCalculation",
626
+ name: "feedCalculation",
627
+ type: "uint8",
628
+ },
629
+ {
630
+ internalType: "uint256",
631
+ name: "maxDeviationP",
632
+ type: "uint256",
633
+ },
634
+ ],
635
+ internalType: "struct GNSPairsStorageV6.Feed",
636
+ name: "",
637
+ type: "tuple",
638
+ },
639
+ ],
640
+ stateMutability: "view",
641
+ type: "function",
642
+ },
643
+ {
644
+ inputs: [
645
+ {
646
+ internalType: "uint256",
647
+ name: "_pairIndex",
648
+ type: "uint256",
649
+ },
650
+ ],
651
+ name: "pairJob",
652
+ outputs: [
653
+ {
654
+ internalType: "string",
655
+ name: "",
656
+ type: "string",
657
+ },
658
+ {
659
+ internalType: "string",
660
+ name: "",
661
+ type: "string",
662
+ },
663
+ {
664
+ internalType: "bytes32",
665
+ name: "",
666
+ type: "bytes32",
667
+ },
668
+ {
669
+ internalType: "uint256",
670
+ name: "",
671
+ type: "uint256",
672
+ },
673
+ ],
674
+ stateMutability: "nonpayable",
675
+ type: "function",
676
+ },
677
+ {
678
+ inputs: [
679
+ {
680
+ internalType: "uint256",
681
+ name: "_pairIndex",
682
+ type: "uint256",
683
+ },
684
+ ],
685
+ name: "pairMaxLeverage",
686
+ outputs: [
687
+ {
688
+ internalType: "uint256",
689
+ name: "",
690
+ type: "uint256",
691
+ },
692
+ ],
693
+ stateMutability: "view",
694
+ type: "function",
695
+ },
696
+ {
697
+ inputs: [
698
+ {
699
+ internalType: "uint256",
700
+ name: "_pairIndex",
701
+ type: "uint256",
702
+ },
703
+ ],
704
+ name: "pairMinLevPosDai",
705
+ outputs: [
706
+ {
707
+ internalType: "uint256",
708
+ name: "",
709
+ type: "uint256",
710
+ },
711
+ ],
712
+ stateMutability: "view",
713
+ type: "function",
714
+ },
715
+ {
716
+ inputs: [
717
+ {
718
+ internalType: "uint256",
719
+ name: "_pairIndex",
720
+ type: "uint256",
721
+ },
722
+ ],
723
+ name: "pairMinLeverage",
724
+ outputs: [
725
+ {
726
+ internalType: "uint256",
727
+ name: "",
728
+ type: "uint256",
729
+ },
730
+ ],
731
+ stateMutability: "view",
732
+ type: "function",
733
+ },
734
+ {
735
+ inputs: [
736
+ {
737
+ internalType: "uint256",
738
+ name: "_pairIndex",
739
+ type: "uint256",
740
+ },
741
+ ],
742
+ name: "pairNftLimitOrderFeeP",
743
+ outputs: [
744
+ {
745
+ internalType: "uint256",
746
+ name: "",
747
+ type: "uint256",
748
+ },
749
+ ],
750
+ stateMutability: "view",
751
+ type: "function",
752
+ },
753
+ {
754
+ inputs: [
755
+ {
756
+ internalType: "uint256",
757
+ name: "_pairIndex",
758
+ type: "uint256",
759
+ },
760
+ ],
761
+ name: "pairOpenFeeP",
762
+ outputs: [
763
+ {
764
+ internalType: "uint256",
765
+ name: "",
766
+ type: "uint256",
767
+ },
768
+ ],
769
+ stateMutability: "view",
770
+ type: "function",
771
+ },
772
+ {
773
+ inputs: [
774
+ {
775
+ internalType: "uint256",
776
+ name: "_pairIndex",
777
+ type: "uint256",
778
+ },
779
+ ],
780
+ name: "pairOracleFeeP",
781
+ outputs: [
782
+ {
783
+ internalType: "uint256",
784
+ name: "",
785
+ type: "uint256",
786
+ },
787
+ ],
788
+ stateMutability: "view",
789
+ type: "function",
790
+ },
791
+ {
792
+ inputs: [
793
+ {
794
+ internalType: "uint256",
795
+ name: "_pairIndex",
796
+ type: "uint256",
797
+ },
798
+ ],
799
+ name: "pairReferralFeeP",
800
+ outputs: [
801
+ {
802
+ internalType: "uint256",
803
+ name: "",
804
+ type: "uint256",
805
+ },
806
+ ],
807
+ stateMutability: "view",
808
+ type: "function",
809
+ },
810
+ {
811
+ inputs: [
812
+ {
813
+ internalType: "uint256",
814
+ name: "_pairIndex",
815
+ type: "uint256",
816
+ },
817
+ ],
818
+ name: "pairSpreadP",
819
+ outputs: [
820
+ {
821
+ internalType: "uint256",
822
+ name: "",
823
+ type: "uint256",
824
+ },
825
+ ],
826
+ stateMutability: "view",
827
+ type: "function",
828
+ },
829
+ {
830
+ inputs: [
831
+ {
832
+ internalType: "uint256",
833
+ name: "",
834
+ type: "uint256",
835
+ },
836
+ ],
837
+ name: "pairs",
838
+ outputs: [
839
+ {
840
+ internalType: "string",
841
+ name: "from",
842
+ type: "string",
843
+ },
844
+ {
845
+ internalType: "string",
846
+ name: "to",
847
+ type: "string",
848
+ },
849
+ {
850
+ components: [
851
+ {
852
+ internalType: "address",
853
+ name: "feed1",
854
+ type: "address",
855
+ },
856
+ {
857
+ internalType: "address",
858
+ name: "feed2",
859
+ type: "address",
860
+ },
861
+ {
862
+ internalType: "enum GNSPairsStorageV6.FeedCalculation",
863
+ name: "feedCalculation",
864
+ type: "uint8",
865
+ },
866
+ {
867
+ internalType: "uint256",
868
+ name: "maxDeviationP",
869
+ type: "uint256",
870
+ },
871
+ ],
872
+ internalType: "struct GNSPairsStorageV6.Feed",
873
+ name: "feed",
874
+ type: "tuple",
875
+ },
876
+ {
877
+ internalType: "uint256",
878
+ name: "spreadP",
879
+ type: "uint256",
880
+ },
881
+ {
882
+ internalType: "uint256",
883
+ name: "groupIndex",
884
+ type: "uint256",
885
+ },
886
+ {
887
+ internalType: "uint256",
888
+ name: "feeIndex",
889
+ type: "uint256",
890
+ },
891
+ ],
892
+ stateMutability: "view",
893
+ type: "function",
894
+ },
895
+ {
896
+ inputs: [
897
+ {
898
+ internalType: "uint256",
899
+ name: "_index",
900
+ type: "uint256",
901
+ },
902
+ ],
903
+ name: "pairsBackend",
904
+ outputs: [
905
+ {
906
+ components: [
907
+ {
908
+ internalType: "string",
909
+ name: "from",
910
+ type: "string",
911
+ },
912
+ {
913
+ internalType: "string",
914
+ name: "to",
915
+ type: "string",
916
+ },
917
+ {
918
+ components: [
919
+ {
920
+ internalType: "address",
921
+ name: "feed1",
922
+ type: "address",
923
+ },
924
+ {
925
+ internalType: "address",
926
+ name: "feed2",
927
+ type: "address",
928
+ },
929
+ {
930
+ internalType: "enum GNSPairsStorageV6.FeedCalculation",
931
+ name: "feedCalculation",
932
+ type: "uint8",
933
+ },
934
+ {
935
+ internalType: "uint256",
936
+ name: "maxDeviationP",
937
+ type: "uint256",
938
+ },
939
+ ],
940
+ internalType: "struct GNSPairsStorageV6.Feed",
941
+ name: "feed",
942
+ type: "tuple",
943
+ },
944
+ {
945
+ internalType: "uint256",
946
+ name: "spreadP",
947
+ type: "uint256",
948
+ },
949
+ {
950
+ internalType: "uint256",
951
+ name: "groupIndex",
952
+ type: "uint256",
953
+ },
954
+ {
955
+ internalType: "uint256",
956
+ name: "feeIndex",
957
+ type: "uint256",
958
+ },
959
+ ],
960
+ internalType: "struct GNSPairsStorageV6.Pair",
961
+ name: "",
962
+ type: "tuple",
963
+ },
964
+ {
965
+ components: [
966
+ {
967
+ internalType: "string",
968
+ name: "name",
969
+ type: "string",
970
+ },
971
+ {
972
+ internalType: "bytes32",
973
+ name: "job",
974
+ type: "bytes32",
975
+ },
976
+ {
977
+ internalType: "uint256",
978
+ name: "minLeverage",
979
+ type: "uint256",
980
+ },
981
+ {
982
+ internalType: "uint256",
983
+ name: "maxLeverage",
984
+ type: "uint256",
985
+ },
986
+ {
987
+ internalType: "uint256",
988
+ name: "maxCollateralP",
989
+ type: "uint256",
990
+ },
991
+ ],
992
+ internalType: "struct GNSPairsStorageV6.Group",
993
+ name: "",
994
+ type: "tuple",
995
+ },
996
+ {
997
+ components: [
998
+ {
999
+ internalType: "string",
1000
+ name: "name",
1001
+ type: "string",
1002
+ },
1003
+ {
1004
+ internalType: "uint256",
1005
+ name: "openFeeP",
1006
+ type: "uint256",
1007
+ },
1008
+ {
1009
+ internalType: "uint256",
1010
+ name: "closeFeeP",
1011
+ type: "uint256",
1012
+ },
1013
+ {
1014
+ internalType: "uint256",
1015
+ name: "oracleFeeP",
1016
+ type: "uint256",
1017
+ },
1018
+ {
1019
+ internalType: "uint256",
1020
+ name: "nftLimitOrderFeeP",
1021
+ type: "uint256",
1022
+ },
1023
+ {
1024
+ internalType: "uint256",
1025
+ name: "referralFeeP",
1026
+ type: "uint256",
1027
+ },
1028
+ {
1029
+ internalType: "uint256",
1030
+ name: "minLevPosDai",
1031
+ type: "uint256",
1032
+ },
1033
+ ],
1034
+ internalType: "struct GNSPairsStorageV6.Fee",
1035
+ name: "",
1036
+ type: "tuple",
1037
+ },
1038
+ ],
1039
+ stateMutability: "view",
1040
+ type: "function",
1041
+ },
1042
+ {
1043
+ inputs: [],
1044
+ name: "pairsCount",
1045
+ outputs: [
1046
+ {
1047
+ internalType: "uint256",
1048
+ name: "",
1049
+ type: "uint256",
1050
+ },
1051
+ ],
1052
+ stateMutability: "view",
1053
+ type: "function",
1054
+ },
1055
+ {
1056
+ inputs: [
1057
+ {
1058
+ internalType: "uint256",
1059
+ name: "_id",
1060
+ type: "uint256",
1061
+ },
1062
+ {
1063
+ components: [
1064
+ {
1065
+ internalType: "string",
1066
+ name: "name",
1067
+ type: "string",
1068
+ },
1069
+ {
1070
+ internalType: "uint256",
1071
+ name: "openFeeP",
1072
+ type: "uint256",
1073
+ },
1074
+ {
1075
+ internalType: "uint256",
1076
+ name: "closeFeeP",
1077
+ type: "uint256",
1078
+ },
1079
+ {
1080
+ internalType: "uint256",
1081
+ name: "oracleFeeP",
1082
+ type: "uint256",
1083
+ },
1084
+ {
1085
+ internalType: "uint256",
1086
+ name: "nftLimitOrderFeeP",
1087
+ type: "uint256",
1088
+ },
1089
+ {
1090
+ internalType: "uint256",
1091
+ name: "referralFeeP",
1092
+ type: "uint256",
1093
+ },
1094
+ {
1095
+ internalType: "uint256",
1096
+ name: "minLevPosDai",
1097
+ type: "uint256",
1098
+ },
1099
+ ],
1100
+ internalType: "struct GNSPairsStorageV6.Fee",
1101
+ name: "_fee",
1102
+ type: "tuple",
1103
+ },
1104
+ ],
1105
+ name: "updateFee",
1106
+ outputs: [],
1107
+ stateMutability: "nonpayable",
1108
+ type: "function",
1109
+ },
1110
+ {
1111
+ inputs: [
1112
+ {
1113
+ internalType: "uint256",
1114
+ name: "_id",
1115
+ type: "uint256",
1116
+ },
1117
+ {
1118
+ components: [
1119
+ {
1120
+ internalType: "string",
1121
+ name: "name",
1122
+ type: "string",
1123
+ },
1124
+ {
1125
+ internalType: "bytes32",
1126
+ name: "job",
1127
+ type: "bytes32",
1128
+ },
1129
+ {
1130
+ internalType: "uint256",
1131
+ name: "minLeverage",
1132
+ type: "uint256",
1133
+ },
1134
+ {
1135
+ internalType: "uint256",
1136
+ name: "maxLeverage",
1137
+ type: "uint256",
1138
+ },
1139
+ {
1140
+ internalType: "uint256",
1141
+ name: "maxCollateralP",
1142
+ type: "uint256",
1143
+ },
1144
+ ],
1145
+ internalType: "struct GNSPairsStorageV6.Group",
1146
+ name: "_group",
1147
+ type: "tuple",
1148
+ },
1149
+ ],
1150
+ name: "updateGroup",
1151
+ outputs: [],
1152
+ stateMutability: "nonpayable",
1153
+ type: "function",
1154
+ },
1155
+ {
1156
+ inputs: [
1157
+ {
1158
+ internalType: "uint256",
1159
+ name: "_pairIndex",
1160
+ type: "uint256",
1161
+ },
1162
+ {
1163
+ internalType: "uint256",
1164
+ name: "_amount",
1165
+ type: "uint256",
1166
+ },
1167
+ {
1168
+ internalType: "bool",
1169
+ name: "_long",
1170
+ type: "bool",
1171
+ },
1172
+ {
1173
+ internalType: "bool",
1174
+ name: "_increase",
1175
+ type: "bool",
1176
+ },
1177
+ ],
1178
+ name: "updateGroupCollateral",
1179
+ outputs: [],
1180
+ stateMutability: "nonpayable",
1181
+ type: "function",
1182
+ },
1183
+ {
1184
+ inputs: [
1185
+ {
1186
+ internalType: "uint256",
1187
+ name: "_pairIndex",
1188
+ type: "uint256",
1189
+ },
1190
+ {
1191
+ components: [
1192
+ {
1193
+ internalType: "string",
1194
+ name: "from",
1195
+ type: "string",
1196
+ },
1197
+ {
1198
+ internalType: "string",
1199
+ name: "to",
1200
+ type: "string",
1201
+ },
1202
+ {
1203
+ components: [
1204
+ {
1205
+ internalType: "address",
1206
+ name: "feed1",
1207
+ type: "address",
1208
+ },
1209
+ {
1210
+ internalType: "address",
1211
+ name: "feed2",
1212
+ type: "address",
1213
+ },
1214
+ {
1215
+ internalType: "enum GNSPairsStorageV6.FeedCalculation",
1216
+ name: "feedCalculation",
1217
+ type: "uint8",
1218
+ },
1219
+ {
1220
+ internalType: "uint256",
1221
+ name: "maxDeviationP",
1222
+ type: "uint256",
1223
+ },
1224
+ ],
1225
+ internalType: "struct GNSPairsStorageV6.Feed",
1226
+ name: "feed",
1227
+ type: "tuple",
1228
+ },
1229
+ {
1230
+ internalType: "uint256",
1231
+ name: "spreadP",
1232
+ type: "uint256",
1233
+ },
1234
+ {
1235
+ internalType: "uint256",
1236
+ name: "groupIndex",
1237
+ type: "uint256",
1238
+ },
1239
+ {
1240
+ internalType: "uint256",
1241
+ name: "feeIndex",
1242
+ type: "uint256",
1243
+ },
1244
+ ],
1245
+ internalType: "struct GNSPairsStorageV6.Pair",
1246
+ name: "_pair",
1247
+ type: "tuple",
1248
+ },
1249
+ ],
1250
+ name: "updatePair",
1251
+ outputs: [],
1252
+ stateMutability: "nonpayable",
1253
+ type: "function",
1254
+ },
1255
+ ];
1256
+ class GNSPairsStorageV6__factory {
1257
+ static createInterface() {
1258
+ return new ethers_1.utils.Interface(_abi);
1259
+ }
1260
+ static connect(address, signerOrProvider) {
1261
+ return new ethers_1.Contract(address, _abi, signerOrProvider);
1262
+ }
1263
+ }
1264
+ exports.GNSPairsStorageV6__factory = GNSPairsStorageV6__factory;
1265
+ GNSPairsStorageV6__factory.abi = _abi;