@gainsnetwork/sdk 1.6.7 → 1.6.9

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 (38) hide show
  1. package/lib/constants.d.ts +1 -0
  2. package/lib/constants.js +2 -1
  3. package/lib/contracts/types/generated/GFarmTradingStorageV5.d.ts +1911 -0
  4. package/lib/contracts/types/generated/GFarmTradingStorageV5.js +2 -0
  5. package/lib/contracts/types/generated/GNSBorrowingFees.d.ts +1067 -0
  6. package/lib/contracts/types/generated/GNSBorrowingFees.js +2 -0
  7. package/lib/contracts/types/generated/GNSNftRewardsV6.d.ts +533 -0
  8. package/lib/contracts/types/generated/GNSNftRewardsV6.js +2 -0
  9. package/lib/contracts/types/generated/GNSNftRewardsV6_3_1.d.ts +613 -0
  10. package/lib/contracts/types/generated/GNSNftRewardsV6_3_1.js +2 -0
  11. package/lib/contracts/types/generated/GNSTrading.d.ts +758 -0
  12. package/lib/contracts/types/generated/GNSTrading.js +2 -0
  13. package/lib/contracts/types/generated/GNSTradingCallbacks.d.ts +875 -0
  14. package/lib/contracts/types/generated/GNSTradingCallbacks.js +2 -0
  15. package/lib/contracts/types/generated/GNSTradingStorage.d.ts +1387 -0
  16. package/lib/contracts/types/generated/GNSTradingStorage.js +2 -0
  17. package/lib/contracts/types/generated/GTokenV6_3_2.d.ts +1838 -0
  18. package/lib/contracts/types/generated/GTokenV6_3_2.js +2 -0
  19. package/lib/contracts/types/generated/factories/GFarmTradingStorageV5__factory.d.ts +83 -0
  20. package/lib/contracts/types/generated/factories/GFarmTradingStorageV5__factory.js +2691 -0
  21. package/lib/contracts/types/generated/factories/GNSBorrowingFees__factory.d.ts +124 -0
  22. package/lib/contracts/types/generated/factories/GNSBorrowingFees__factory.js +1784 -0
  23. package/lib/contracts/types/generated/factories/GNSNftRewardsV6_3_1__factory.d.ts +100 -0
  24. package/lib/contracts/types/generated/factories/GNSNftRewardsV6_3_1__factory.js +1116 -0
  25. package/lib/contracts/types/generated/factories/GNSNftRewardsV6__factory.d.ts +100 -0
  26. package/lib/contracts/types/generated/factories/GNSNftRewardsV6__factory.js +1003 -0
  27. package/lib/contracts/types/generated/factories/GNSTradingCallbacks__factory.d.ts +113 -0
  28. package/lib/contracts/types/generated/factories/GNSTradingCallbacks__factory.js +1428 -0
  29. package/lib/contracts/types/generated/factories/GNSTradingStorage__factory.d.ts +96 -0
  30. package/lib/contracts/types/generated/factories/GNSTradingStorage__factory.js +2241 -0
  31. package/lib/contracts/types/generated/factories/GNSTrading__factory.d.ts +95 -0
  32. package/lib/contracts/types/generated/factories/GNSTrading__factory.js +1071 -0
  33. package/lib/contracts/types/generated/factories/GTokenV6_3_2__factory.d.ts +110 -0
  34. package/lib/contracts/types/generated/factories/GTokenV6_3_2__factory.js +2682 -0
  35. package/lib/contracts/utils/pairs.js +1 -0
  36. package/lib/trade/types.d.ts +2 -1
  37. package/lib/trade/types.js +1 -0
  38. package/package.json +1 -1
@@ -0,0 +1,2691 @@
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.GFarmTradingStorageV5__factory = void 0;
7
+ const ethers_1 = require("ethers");
8
+ const _abi = [
9
+ {
10
+ inputs: [],
11
+ stateMutability: "nonpayable",
12
+ type: "constructor",
13
+ },
14
+ {
15
+ anonymous: false,
16
+ inputs: [
17
+ {
18
+ indexed: false,
19
+ internalType: "string",
20
+ name: "name",
21
+ type: "string",
22
+ },
23
+ {
24
+ indexed: false,
25
+ internalType: "address",
26
+ name: "a",
27
+ type: "address",
28
+ },
29
+ ],
30
+ name: "AddressUpdated",
31
+ type: "event",
32
+ },
33
+ {
34
+ anonymous: false,
35
+ inputs: [
36
+ {
37
+ indexed: false,
38
+ internalType: "contract NftInterfaceV5[5]",
39
+ name: "nfts",
40
+ type: "address[5]",
41
+ },
42
+ ],
43
+ name: "NftsUpdated",
44
+ type: "event",
45
+ },
46
+ {
47
+ anonymous: false,
48
+ inputs: [
49
+ {
50
+ indexed: false,
51
+ internalType: "string",
52
+ name: "name",
53
+ type: "string",
54
+ },
55
+ {
56
+ indexed: false,
57
+ internalType: "uint256",
58
+ name: "value",
59
+ type: "uint256",
60
+ },
61
+ ],
62
+ name: "NumberUpdated",
63
+ type: "event",
64
+ },
65
+ {
66
+ anonymous: false,
67
+ inputs: [
68
+ {
69
+ indexed: false,
70
+ internalType: "string",
71
+ name: "name",
72
+ type: "string",
73
+ },
74
+ {
75
+ indexed: false,
76
+ internalType: "uint256",
77
+ name: "pairIndex",
78
+ type: "uint256",
79
+ },
80
+ {
81
+ indexed: false,
82
+ internalType: "uint256",
83
+ name: "value",
84
+ type: "uint256",
85
+ },
86
+ ],
87
+ name: "NumberUpdatedPair",
88
+ type: "event",
89
+ },
90
+ {
91
+ anonymous: false,
92
+ inputs: [
93
+ {
94
+ indexed: false,
95
+ internalType: "uint256[5]",
96
+ name: "",
97
+ type: "uint256[5]",
98
+ },
99
+ ],
100
+ name: "SpreadReductionsUpdated",
101
+ type: "event",
102
+ },
103
+ {
104
+ anonymous: false,
105
+ inputs: [
106
+ {
107
+ indexed: false,
108
+ internalType: "address",
109
+ name: "a",
110
+ type: "address",
111
+ },
112
+ ],
113
+ name: "SupportedTokenAdded",
114
+ type: "event",
115
+ },
116
+ {
117
+ anonymous: false,
118
+ inputs: [
119
+ {
120
+ indexed: false,
121
+ internalType: "address",
122
+ name: "a",
123
+ type: "address",
124
+ },
125
+ ],
126
+ name: "TradingContractAdded",
127
+ type: "event",
128
+ },
129
+ {
130
+ anonymous: false,
131
+ inputs: [
132
+ {
133
+ indexed: false,
134
+ internalType: "address",
135
+ name: "a",
136
+ type: "address",
137
+ },
138
+ ],
139
+ name: "TradingContractRemoved",
140
+ type: "event",
141
+ },
142
+ {
143
+ inputs: [],
144
+ name: "MINTER_ROLE",
145
+ outputs: [
146
+ {
147
+ internalType: "bytes32",
148
+ name: "",
149
+ type: "bytes32",
150
+ },
151
+ ],
152
+ stateMutability: "view",
153
+ type: "function",
154
+ },
155
+ {
156
+ inputs: [],
157
+ name: "PRECISION",
158
+ outputs: [
159
+ {
160
+ internalType: "uint256",
161
+ name: "",
162
+ type: "uint256",
163
+ },
164
+ ],
165
+ stateMutability: "view",
166
+ type: "function",
167
+ },
168
+ {
169
+ inputs: [
170
+ {
171
+ internalType: "address",
172
+ name: "_token",
173
+ type: "address",
174
+ },
175
+ ],
176
+ name: "addSupportedToken",
177
+ outputs: [],
178
+ stateMutability: "nonpayable",
179
+ type: "function",
180
+ },
181
+ {
182
+ inputs: [
183
+ {
184
+ internalType: "address",
185
+ name: "_trading",
186
+ type: "address",
187
+ },
188
+ ],
189
+ name: "addTradingContract",
190
+ outputs: [],
191
+ stateMutability: "nonpayable",
192
+ type: "function",
193
+ },
194
+ {
195
+ inputs: [],
196
+ name: "callbacks",
197
+ outputs: [
198
+ {
199
+ internalType: "contract PausableInterfaceV5",
200
+ name: "",
201
+ type: "address",
202
+ },
203
+ ],
204
+ stateMutability: "view",
205
+ type: "function",
206
+ },
207
+ {
208
+ inputs: [],
209
+ name: "claimFees",
210
+ outputs: [],
211
+ stateMutability: "nonpayable",
212
+ type: "function",
213
+ },
214
+ {
215
+ inputs: [],
216
+ name: "dai",
217
+ outputs: [
218
+ {
219
+ internalType: "contract TokenInterfaceV5",
220
+ name: "",
221
+ type: "address",
222
+ },
223
+ ],
224
+ stateMutability: "view",
225
+ type: "function",
226
+ },
227
+ {
228
+ inputs: [],
229
+ name: "defaultLeverageUnlocked",
230
+ outputs: [
231
+ {
232
+ internalType: "uint256",
233
+ name: "",
234
+ type: "uint256",
235
+ },
236
+ ],
237
+ stateMutability: "view",
238
+ type: "function",
239
+ },
240
+ {
241
+ inputs: [],
242
+ name: "dev",
243
+ outputs: [
244
+ {
245
+ internalType: "address",
246
+ name: "",
247
+ type: "address",
248
+ },
249
+ ],
250
+ stateMutability: "view",
251
+ type: "function",
252
+ },
253
+ {
254
+ inputs: [],
255
+ name: "devFeesDai",
256
+ outputs: [
257
+ {
258
+ internalType: "uint256",
259
+ name: "",
260
+ type: "uint256",
261
+ },
262
+ ],
263
+ stateMutability: "view",
264
+ type: "function",
265
+ },
266
+ {
267
+ inputs: [],
268
+ name: "devFeesToken",
269
+ outputs: [
270
+ {
271
+ internalType: "uint256",
272
+ name: "",
273
+ type: "uint256",
274
+ },
275
+ ],
276
+ stateMutability: "view",
277
+ type: "function",
278
+ },
279
+ {
280
+ inputs: [
281
+ {
282
+ internalType: "uint256",
283
+ name: "_amount",
284
+ type: "uint256",
285
+ },
286
+ ],
287
+ name: "distributeLpRewards",
288
+ outputs: [],
289
+ stateMutability: "nonpayable",
290
+ type: "function",
291
+ },
292
+ {
293
+ inputs: [
294
+ {
295
+ internalType: "address",
296
+ name: "trader",
297
+ type: "address",
298
+ },
299
+ {
300
+ internalType: "uint256",
301
+ name: "pairIndex",
302
+ type: "uint256",
303
+ },
304
+ ],
305
+ name: "firstEmptyOpenLimitIndex",
306
+ outputs: [
307
+ {
308
+ internalType: "uint256",
309
+ name: "index",
310
+ type: "uint256",
311
+ },
312
+ ],
313
+ stateMutability: "view",
314
+ type: "function",
315
+ },
316
+ {
317
+ inputs: [
318
+ {
319
+ internalType: "address",
320
+ name: "trader",
321
+ type: "address",
322
+ },
323
+ {
324
+ internalType: "uint256",
325
+ name: "pairIndex",
326
+ type: "uint256",
327
+ },
328
+ ],
329
+ name: "firstEmptyTradeIndex",
330
+ outputs: [
331
+ {
332
+ internalType: "uint256",
333
+ name: "index",
334
+ type: "uint256",
335
+ },
336
+ ],
337
+ stateMutability: "view",
338
+ type: "function",
339
+ },
340
+ {
341
+ inputs: [
342
+ {
343
+ internalType: "address",
344
+ name: "_trader",
345
+ type: "address",
346
+ },
347
+ ],
348
+ name: "getLeverageUnlocked",
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: "address",
363
+ name: "_trader",
364
+ type: "address",
365
+ },
366
+ {
367
+ internalType: "uint256",
368
+ name: "_pairIndex",
369
+ type: "uint256",
370
+ },
371
+ {
372
+ internalType: "uint256",
373
+ name: "_index",
374
+ type: "uint256",
375
+ },
376
+ ],
377
+ name: "getOpenLimitOrder",
378
+ outputs: [
379
+ {
380
+ components: [
381
+ {
382
+ internalType: "address",
383
+ name: "trader",
384
+ type: "address",
385
+ },
386
+ {
387
+ internalType: "uint256",
388
+ name: "pairIndex",
389
+ type: "uint256",
390
+ },
391
+ {
392
+ internalType: "uint256",
393
+ name: "index",
394
+ type: "uint256",
395
+ },
396
+ {
397
+ internalType: "uint256",
398
+ name: "positionSize",
399
+ type: "uint256",
400
+ },
401
+ {
402
+ internalType: "uint256",
403
+ name: "spreadReductionP",
404
+ type: "uint256",
405
+ },
406
+ {
407
+ internalType: "bool",
408
+ name: "buy",
409
+ type: "bool",
410
+ },
411
+ {
412
+ internalType: "uint256",
413
+ name: "leverage",
414
+ type: "uint256",
415
+ },
416
+ {
417
+ internalType: "uint256",
418
+ name: "tp",
419
+ type: "uint256",
420
+ },
421
+ {
422
+ internalType: "uint256",
423
+ name: "sl",
424
+ type: "uint256",
425
+ },
426
+ {
427
+ internalType: "uint256",
428
+ name: "minPrice",
429
+ type: "uint256",
430
+ },
431
+ {
432
+ internalType: "uint256",
433
+ name: "maxPrice",
434
+ type: "uint256",
435
+ },
436
+ {
437
+ internalType: "uint256",
438
+ name: "block",
439
+ type: "uint256",
440
+ },
441
+ {
442
+ internalType: "uint256",
443
+ name: "tokenId",
444
+ type: "uint256",
445
+ },
446
+ ],
447
+ internalType: "struct GFarmTradingStorageV5.OpenLimitOrder",
448
+ name: "",
449
+ type: "tuple",
450
+ },
451
+ ],
452
+ stateMutability: "view",
453
+ type: "function",
454
+ },
455
+ {
456
+ inputs: [],
457
+ name: "getOpenLimitOrders",
458
+ outputs: [
459
+ {
460
+ components: [
461
+ {
462
+ internalType: "address",
463
+ name: "trader",
464
+ type: "address",
465
+ },
466
+ {
467
+ internalType: "uint256",
468
+ name: "pairIndex",
469
+ type: "uint256",
470
+ },
471
+ {
472
+ internalType: "uint256",
473
+ name: "index",
474
+ type: "uint256",
475
+ },
476
+ {
477
+ internalType: "uint256",
478
+ name: "positionSize",
479
+ type: "uint256",
480
+ },
481
+ {
482
+ internalType: "uint256",
483
+ name: "spreadReductionP",
484
+ type: "uint256",
485
+ },
486
+ {
487
+ internalType: "bool",
488
+ name: "buy",
489
+ type: "bool",
490
+ },
491
+ {
492
+ internalType: "uint256",
493
+ name: "leverage",
494
+ type: "uint256",
495
+ },
496
+ {
497
+ internalType: "uint256",
498
+ name: "tp",
499
+ type: "uint256",
500
+ },
501
+ {
502
+ internalType: "uint256",
503
+ name: "sl",
504
+ type: "uint256",
505
+ },
506
+ {
507
+ internalType: "uint256",
508
+ name: "minPrice",
509
+ type: "uint256",
510
+ },
511
+ {
512
+ internalType: "uint256",
513
+ name: "maxPrice",
514
+ type: "uint256",
515
+ },
516
+ {
517
+ internalType: "uint256",
518
+ name: "block",
519
+ type: "uint256",
520
+ },
521
+ {
522
+ internalType: "uint256",
523
+ name: "tokenId",
524
+ type: "uint256",
525
+ },
526
+ ],
527
+ internalType: "struct GFarmTradingStorageV5.OpenLimitOrder[]",
528
+ name: "",
529
+ type: "tuple[]",
530
+ },
531
+ ],
532
+ stateMutability: "view",
533
+ type: "function",
534
+ },
535
+ {
536
+ inputs: [
537
+ {
538
+ internalType: "address",
539
+ name: "_trader",
540
+ type: "address",
541
+ },
542
+ ],
543
+ name: "getPendingOrderIds",
544
+ outputs: [
545
+ {
546
+ internalType: "uint256[]",
547
+ name: "",
548
+ type: "uint256[]",
549
+ },
550
+ ],
551
+ stateMutability: "view",
552
+ type: "function",
553
+ },
554
+ {
555
+ inputs: [
556
+ {
557
+ internalType: "address",
558
+ name: "_trader",
559
+ type: "address",
560
+ },
561
+ ],
562
+ name: "getReferral",
563
+ outputs: [
564
+ {
565
+ internalType: "address",
566
+ name: "",
567
+ type: "address",
568
+ },
569
+ ],
570
+ stateMutability: "view",
571
+ type: "function",
572
+ },
573
+ {
574
+ inputs: [],
575
+ name: "getSpreadReductionsArray",
576
+ outputs: [
577
+ {
578
+ internalType: "uint256[5]",
579
+ name: "",
580
+ type: "uint256[5]",
581
+ },
582
+ ],
583
+ stateMutability: "view",
584
+ type: "function",
585
+ },
586
+ {
587
+ inputs: [],
588
+ name: "getSupportedTokens",
589
+ outputs: [
590
+ {
591
+ internalType: "address[]",
592
+ name: "",
593
+ type: "address[]",
594
+ },
595
+ ],
596
+ stateMutability: "view",
597
+ type: "function",
598
+ },
599
+ {
600
+ inputs: [],
601
+ name: "gov",
602
+ outputs: [
603
+ {
604
+ internalType: "address",
605
+ name: "",
606
+ type: "address",
607
+ },
608
+ ],
609
+ stateMutability: "view",
610
+ type: "function",
611
+ },
612
+ {
613
+ inputs: [],
614
+ name: "govFeesDai",
615
+ outputs: [
616
+ {
617
+ internalType: "uint256",
618
+ name: "",
619
+ type: "uint256",
620
+ },
621
+ ],
622
+ stateMutability: "view",
623
+ type: "function",
624
+ },
625
+ {
626
+ inputs: [],
627
+ name: "govFeesToken",
628
+ outputs: [
629
+ {
630
+ internalType: "uint256",
631
+ name: "",
632
+ type: "uint256",
633
+ },
634
+ ],
635
+ stateMutability: "view",
636
+ type: "function",
637
+ },
638
+ {
639
+ inputs: [
640
+ {
641
+ internalType: "uint256",
642
+ name: "_pairIndex",
643
+ type: "uint256",
644
+ },
645
+ {
646
+ internalType: "uint256",
647
+ name: "_leveragedPositionSize",
648
+ type: "uint256",
649
+ },
650
+ {
651
+ internalType: "bool",
652
+ name: "_dai",
653
+ type: "bool",
654
+ },
655
+ {
656
+ internalType: "bool",
657
+ name: "_fullFee",
658
+ type: "bool",
659
+ },
660
+ ],
661
+ name: "handleDevGovFees",
662
+ outputs: [
663
+ {
664
+ internalType: "uint256",
665
+ name: "fee",
666
+ type: "uint256",
667
+ },
668
+ ],
669
+ stateMutability: "nonpayable",
670
+ type: "function",
671
+ },
672
+ {
673
+ inputs: [
674
+ {
675
+ internalType: "address",
676
+ name: "_a",
677
+ type: "address",
678
+ },
679
+ {
680
+ internalType: "uint256",
681
+ name: "_amount",
682
+ type: "uint256",
683
+ },
684
+ {
685
+ internalType: "bool",
686
+ name: "_mint",
687
+ type: "bool",
688
+ },
689
+ ],
690
+ name: "handleTokens",
691
+ outputs: [],
692
+ stateMutability: "nonpayable",
693
+ type: "function",
694
+ },
695
+ {
696
+ inputs: [
697
+ {
698
+ internalType: "address",
699
+ name: "trader",
700
+ type: "address",
701
+ },
702
+ {
703
+ internalType: "uint256",
704
+ name: "pairIndex",
705
+ type: "uint256",
706
+ },
707
+ {
708
+ internalType: "uint256",
709
+ name: "index",
710
+ type: "uint256",
711
+ },
712
+ ],
713
+ name: "hasOpenLimitOrder",
714
+ outputs: [
715
+ {
716
+ internalType: "bool",
717
+ name: "",
718
+ type: "bool",
719
+ },
720
+ ],
721
+ stateMutability: "view",
722
+ type: "function",
723
+ },
724
+ {
725
+ inputs: [
726
+ {
727
+ internalType: "uint256",
728
+ name: "_nftId",
729
+ type: "uint256",
730
+ },
731
+ {
732
+ internalType: "uint256",
733
+ name: "_amount",
734
+ type: "uint256",
735
+ },
736
+ ],
737
+ name: "increaseNftRewards",
738
+ outputs: [],
739
+ stateMutability: "nonpayable",
740
+ type: "function",
741
+ },
742
+ {
743
+ inputs: [
744
+ {
745
+ internalType: "address",
746
+ name: "_referral",
747
+ type: "address",
748
+ },
749
+ {
750
+ internalType: "uint256",
751
+ name: "_amount",
752
+ type: "uint256",
753
+ },
754
+ ],
755
+ name: "increaseReferralRewards",
756
+ outputs: [],
757
+ stateMutability: "nonpayable",
758
+ type: "function",
759
+ },
760
+ {
761
+ inputs: [
762
+ {
763
+ internalType: "address",
764
+ name: "",
765
+ type: "address",
766
+ },
767
+ ],
768
+ name: "isTradingContract",
769
+ outputs: [
770
+ {
771
+ internalType: "bool",
772
+ name: "",
773
+ type: "bool",
774
+ },
775
+ ],
776
+ stateMutability: "view",
777
+ type: "function",
778
+ },
779
+ {
780
+ inputs: [],
781
+ name: "linkErc677",
782
+ outputs: [
783
+ {
784
+ internalType: "contract TokenInterfaceV5",
785
+ name: "",
786
+ type: "address",
787
+ },
788
+ ],
789
+ stateMutability: "view",
790
+ type: "function",
791
+ },
792
+ {
793
+ inputs: [],
794
+ name: "maxGainP",
795
+ outputs: [
796
+ {
797
+ internalType: "uint256",
798
+ name: "",
799
+ type: "uint256",
800
+ },
801
+ ],
802
+ stateMutability: "view",
803
+ type: "function",
804
+ },
805
+ {
806
+ inputs: [],
807
+ name: "maxPendingMarketOrders",
808
+ outputs: [
809
+ {
810
+ internalType: "uint256",
811
+ name: "",
812
+ type: "uint256",
813
+ },
814
+ ],
815
+ stateMutability: "view",
816
+ type: "function",
817
+ },
818
+ {
819
+ inputs: [],
820
+ name: "maxSlP",
821
+ outputs: [
822
+ {
823
+ internalType: "uint256",
824
+ name: "",
825
+ type: "uint256",
826
+ },
827
+ ],
828
+ stateMutability: "view",
829
+ type: "function",
830
+ },
831
+ {
832
+ inputs: [],
833
+ name: "maxTradesPerBlock",
834
+ outputs: [
835
+ {
836
+ internalType: "uint256",
837
+ name: "",
838
+ type: "uint256",
839
+ },
840
+ ],
841
+ stateMutability: "view",
842
+ type: "function",
843
+ },
844
+ {
845
+ inputs: [],
846
+ name: "maxTradesPerPair",
847
+ outputs: [
848
+ {
849
+ internalType: "uint256",
850
+ name: "",
851
+ type: "uint256",
852
+ },
853
+ ],
854
+ stateMutability: "view",
855
+ type: "function",
856
+ },
857
+ {
858
+ inputs: [
859
+ {
860
+ internalType: "uint256",
861
+ name: "",
862
+ type: "uint256",
863
+ },
864
+ ],
865
+ name: "nftLastSuccess",
866
+ outputs: [
867
+ {
868
+ internalType: "uint256",
869
+ name: "",
870
+ type: "uint256",
871
+ },
872
+ ],
873
+ stateMutability: "view",
874
+ type: "function",
875
+ },
876
+ {
877
+ inputs: [],
878
+ name: "nftRewards",
879
+ outputs: [
880
+ {
881
+ internalType: "uint256",
882
+ name: "",
883
+ type: "uint256",
884
+ },
885
+ ],
886
+ stateMutability: "view",
887
+ type: "function",
888
+ },
889
+ {
890
+ inputs: [],
891
+ name: "nftSuccessTimelock",
892
+ outputs: [
893
+ {
894
+ internalType: "uint256",
895
+ name: "",
896
+ type: "uint256",
897
+ },
898
+ ],
899
+ stateMutability: "view",
900
+ type: "function",
901
+ },
902
+ {
903
+ inputs: [
904
+ {
905
+ internalType: "uint256",
906
+ name: "",
907
+ type: "uint256",
908
+ },
909
+ ],
910
+ name: "nfts",
911
+ outputs: [
912
+ {
913
+ internalType: "contract NftInterfaceV5",
914
+ name: "",
915
+ type: "address",
916
+ },
917
+ ],
918
+ stateMutability: "view",
919
+ type: "function",
920
+ },
921
+ {
922
+ inputs: [
923
+ {
924
+ internalType: "uint256",
925
+ name: "",
926
+ type: "uint256",
927
+ },
928
+ {
929
+ internalType: "uint256",
930
+ name: "",
931
+ type: "uint256",
932
+ },
933
+ ],
934
+ name: "openInterestDai",
935
+ outputs: [
936
+ {
937
+ internalType: "uint256",
938
+ name: "",
939
+ type: "uint256",
940
+ },
941
+ ],
942
+ stateMutability: "view",
943
+ type: "function",
944
+ },
945
+ {
946
+ inputs: [
947
+ {
948
+ internalType: "address",
949
+ name: "",
950
+ type: "address",
951
+ },
952
+ {
953
+ internalType: "uint256",
954
+ name: "",
955
+ type: "uint256",
956
+ },
957
+ {
958
+ internalType: "uint256",
959
+ name: "",
960
+ type: "uint256",
961
+ },
962
+ ],
963
+ name: "openLimitOrderIds",
964
+ outputs: [
965
+ {
966
+ internalType: "uint256",
967
+ name: "",
968
+ type: "uint256",
969
+ },
970
+ ],
971
+ stateMutability: "view",
972
+ type: "function",
973
+ },
974
+ {
975
+ inputs: [
976
+ {
977
+ internalType: "uint256",
978
+ name: "",
979
+ type: "uint256",
980
+ },
981
+ ],
982
+ name: "openLimitOrders",
983
+ outputs: [
984
+ {
985
+ internalType: "address",
986
+ name: "trader",
987
+ type: "address",
988
+ },
989
+ {
990
+ internalType: "uint256",
991
+ name: "pairIndex",
992
+ type: "uint256",
993
+ },
994
+ {
995
+ internalType: "uint256",
996
+ name: "index",
997
+ type: "uint256",
998
+ },
999
+ {
1000
+ internalType: "uint256",
1001
+ name: "positionSize",
1002
+ type: "uint256",
1003
+ },
1004
+ {
1005
+ internalType: "uint256",
1006
+ name: "spreadReductionP",
1007
+ type: "uint256",
1008
+ },
1009
+ {
1010
+ internalType: "bool",
1011
+ name: "buy",
1012
+ type: "bool",
1013
+ },
1014
+ {
1015
+ internalType: "uint256",
1016
+ name: "leverage",
1017
+ type: "uint256",
1018
+ },
1019
+ {
1020
+ internalType: "uint256",
1021
+ name: "tp",
1022
+ type: "uint256",
1023
+ },
1024
+ {
1025
+ internalType: "uint256",
1026
+ name: "sl",
1027
+ type: "uint256",
1028
+ },
1029
+ {
1030
+ internalType: "uint256",
1031
+ name: "minPrice",
1032
+ type: "uint256",
1033
+ },
1034
+ {
1035
+ internalType: "uint256",
1036
+ name: "maxPrice",
1037
+ type: "uint256",
1038
+ },
1039
+ {
1040
+ internalType: "uint256",
1041
+ name: "block",
1042
+ type: "uint256",
1043
+ },
1044
+ {
1045
+ internalType: "uint256",
1046
+ name: "tokenId",
1047
+ type: "uint256",
1048
+ },
1049
+ ],
1050
+ stateMutability: "view",
1051
+ type: "function",
1052
+ },
1053
+ {
1054
+ inputs: [
1055
+ {
1056
+ internalType: "address",
1057
+ name: "",
1058
+ type: "address",
1059
+ },
1060
+ {
1061
+ internalType: "uint256",
1062
+ name: "",
1063
+ type: "uint256",
1064
+ },
1065
+ ],
1066
+ name: "openLimitOrdersCount",
1067
+ outputs: [
1068
+ {
1069
+ internalType: "uint256",
1070
+ name: "",
1071
+ type: "uint256",
1072
+ },
1073
+ ],
1074
+ stateMutability: "view",
1075
+ type: "function",
1076
+ },
1077
+ {
1078
+ inputs: [
1079
+ {
1080
+ internalType: "address",
1081
+ name: "",
1082
+ type: "address",
1083
+ },
1084
+ {
1085
+ internalType: "uint256",
1086
+ name: "",
1087
+ type: "uint256",
1088
+ },
1089
+ {
1090
+ internalType: "uint256",
1091
+ name: "",
1092
+ type: "uint256",
1093
+ },
1094
+ ],
1095
+ name: "openTrades",
1096
+ outputs: [
1097
+ {
1098
+ internalType: "address",
1099
+ name: "trader",
1100
+ type: "address",
1101
+ },
1102
+ {
1103
+ internalType: "uint256",
1104
+ name: "pairIndex",
1105
+ type: "uint256",
1106
+ },
1107
+ {
1108
+ internalType: "uint256",
1109
+ name: "index",
1110
+ type: "uint256",
1111
+ },
1112
+ {
1113
+ internalType: "uint256",
1114
+ name: "initialPosToken",
1115
+ type: "uint256",
1116
+ },
1117
+ {
1118
+ internalType: "uint256",
1119
+ name: "positionSizeDai",
1120
+ type: "uint256",
1121
+ },
1122
+ {
1123
+ internalType: "uint256",
1124
+ name: "openPrice",
1125
+ type: "uint256",
1126
+ },
1127
+ {
1128
+ internalType: "bool",
1129
+ name: "buy",
1130
+ type: "bool",
1131
+ },
1132
+ {
1133
+ internalType: "uint256",
1134
+ name: "leverage",
1135
+ type: "uint256",
1136
+ },
1137
+ {
1138
+ internalType: "uint256",
1139
+ name: "tp",
1140
+ type: "uint256",
1141
+ },
1142
+ {
1143
+ internalType: "uint256",
1144
+ name: "sl",
1145
+ type: "uint256",
1146
+ },
1147
+ ],
1148
+ stateMutability: "view",
1149
+ type: "function",
1150
+ },
1151
+ {
1152
+ inputs: [
1153
+ {
1154
+ internalType: "address",
1155
+ name: "",
1156
+ type: "address",
1157
+ },
1158
+ {
1159
+ internalType: "uint256",
1160
+ name: "",
1161
+ type: "uint256",
1162
+ },
1163
+ ],
1164
+ name: "openTradesCount",
1165
+ outputs: [
1166
+ {
1167
+ internalType: "uint256",
1168
+ name: "",
1169
+ type: "uint256",
1170
+ },
1171
+ ],
1172
+ stateMutability: "view",
1173
+ type: "function",
1174
+ },
1175
+ {
1176
+ inputs: [
1177
+ {
1178
+ internalType: "address",
1179
+ name: "",
1180
+ type: "address",
1181
+ },
1182
+ {
1183
+ internalType: "uint256",
1184
+ name: "",
1185
+ type: "uint256",
1186
+ },
1187
+ {
1188
+ internalType: "uint256",
1189
+ name: "",
1190
+ type: "uint256",
1191
+ },
1192
+ ],
1193
+ name: "openTradesInfo",
1194
+ outputs: [
1195
+ {
1196
+ internalType: "uint256",
1197
+ name: "tokenId",
1198
+ type: "uint256",
1199
+ },
1200
+ {
1201
+ internalType: "uint256",
1202
+ name: "tokenPriceDai",
1203
+ type: "uint256",
1204
+ },
1205
+ {
1206
+ internalType: "uint256",
1207
+ name: "openInterestDai",
1208
+ type: "uint256",
1209
+ },
1210
+ {
1211
+ internalType: "uint256",
1212
+ name: "tpLastUpdated",
1213
+ type: "uint256",
1214
+ },
1215
+ {
1216
+ internalType: "uint256",
1217
+ name: "slLastUpdated",
1218
+ type: "uint256",
1219
+ },
1220
+ {
1221
+ internalType: "bool",
1222
+ name: "beingMarketClosed",
1223
+ type: "bool",
1224
+ },
1225
+ ],
1226
+ stateMutability: "view",
1227
+ type: "function",
1228
+ },
1229
+ {
1230
+ inputs: [
1231
+ {
1232
+ internalType: "uint256",
1233
+ name: "",
1234
+ type: "uint256",
1235
+ },
1236
+ {
1237
+ internalType: "uint256",
1238
+ name: "",
1239
+ type: "uint256",
1240
+ },
1241
+ ],
1242
+ name: "pairTraders",
1243
+ outputs: [
1244
+ {
1245
+ internalType: "address",
1246
+ name: "",
1247
+ type: "address",
1248
+ },
1249
+ ],
1250
+ stateMutability: "view",
1251
+ type: "function",
1252
+ },
1253
+ {
1254
+ inputs: [
1255
+ {
1256
+ internalType: "uint256",
1257
+ name: "_pairIndex",
1258
+ type: "uint256",
1259
+ },
1260
+ ],
1261
+ name: "pairTradersArray",
1262
+ outputs: [
1263
+ {
1264
+ internalType: "address[]",
1265
+ name: "",
1266
+ type: "address[]",
1267
+ },
1268
+ ],
1269
+ stateMutability: "view",
1270
+ type: "function",
1271
+ },
1272
+ {
1273
+ inputs: [
1274
+ {
1275
+ internalType: "address",
1276
+ name: "",
1277
+ type: "address",
1278
+ },
1279
+ {
1280
+ internalType: "uint256",
1281
+ name: "",
1282
+ type: "uint256",
1283
+ },
1284
+ ],
1285
+ name: "pairTradersId",
1286
+ outputs: [
1287
+ {
1288
+ internalType: "uint256",
1289
+ name: "",
1290
+ type: "uint256",
1291
+ },
1292
+ ],
1293
+ stateMutability: "view",
1294
+ type: "function",
1295
+ },
1296
+ {
1297
+ inputs: [
1298
+ {
1299
+ internalType: "address",
1300
+ name: "",
1301
+ type: "address",
1302
+ },
1303
+ {
1304
+ internalType: "uint256",
1305
+ name: "",
1306
+ type: "uint256",
1307
+ },
1308
+ ],
1309
+ name: "pendingMarketCloseCount",
1310
+ outputs: [
1311
+ {
1312
+ internalType: "uint256",
1313
+ name: "",
1314
+ type: "uint256",
1315
+ },
1316
+ ],
1317
+ stateMutability: "view",
1318
+ type: "function",
1319
+ },
1320
+ {
1321
+ inputs: [
1322
+ {
1323
+ internalType: "address",
1324
+ name: "",
1325
+ type: "address",
1326
+ },
1327
+ {
1328
+ internalType: "uint256",
1329
+ name: "",
1330
+ type: "uint256",
1331
+ },
1332
+ ],
1333
+ name: "pendingMarketOpenCount",
1334
+ outputs: [
1335
+ {
1336
+ internalType: "uint256",
1337
+ name: "",
1338
+ type: "uint256",
1339
+ },
1340
+ ],
1341
+ stateMutability: "view",
1342
+ type: "function",
1343
+ },
1344
+ {
1345
+ inputs: [
1346
+ {
1347
+ internalType: "address",
1348
+ name: "",
1349
+ type: "address",
1350
+ },
1351
+ {
1352
+ internalType: "uint256",
1353
+ name: "",
1354
+ type: "uint256",
1355
+ },
1356
+ ],
1357
+ name: "pendingOrderIds",
1358
+ outputs: [
1359
+ {
1360
+ internalType: "uint256",
1361
+ name: "",
1362
+ type: "uint256",
1363
+ },
1364
+ ],
1365
+ stateMutability: "view",
1366
+ type: "function",
1367
+ },
1368
+ {
1369
+ inputs: [
1370
+ {
1371
+ internalType: "address",
1372
+ name: "_trader",
1373
+ type: "address",
1374
+ },
1375
+ ],
1376
+ name: "pendingOrderIdsCount",
1377
+ outputs: [
1378
+ {
1379
+ internalType: "uint256",
1380
+ name: "",
1381
+ type: "uint256",
1382
+ },
1383
+ ],
1384
+ stateMutability: "view",
1385
+ type: "function",
1386
+ },
1387
+ {
1388
+ inputs: [],
1389
+ name: "pool",
1390
+ outputs: [
1391
+ {
1392
+ internalType: "contract PoolInterfaceV5",
1393
+ name: "",
1394
+ type: "address",
1395
+ },
1396
+ ],
1397
+ stateMutability: "view",
1398
+ type: "function",
1399
+ },
1400
+ {
1401
+ inputs: [],
1402
+ name: "priceAggregator",
1403
+ outputs: [
1404
+ {
1405
+ internalType: "contract AggregatorInterfaceV5",
1406
+ name: "",
1407
+ type: "address",
1408
+ },
1409
+ ],
1410
+ stateMutability: "view",
1411
+ type: "function",
1412
+ },
1413
+ {
1414
+ inputs: [
1415
+ {
1416
+ internalType: "address",
1417
+ name: "_trading",
1418
+ type: "address",
1419
+ },
1420
+ ],
1421
+ name: "removeTradingContract",
1422
+ outputs: [],
1423
+ stateMutability: "nonpayable",
1424
+ type: "function",
1425
+ },
1426
+ {
1427
+ inputs: [
1428
+ {
1429
+ internalType: "uint256",
1430
+ name: "",
1431
+ type: "uint256",
1432
+ },
1433
+ ],
1434
+ name: "reqID_pendingMarketOrder",
1435
+ outputs: [
1436
+ {
1437
+ components: [
1438
+ {
1439
+ internalType: "address",
1440
+ name: "trader",
1441
+ type: "address",
1442
+ },
1443
+ {
1444
+ internalType: "uint256",
1445
+ name: "pairIndex",
1446
+ type: "uint256",
1447
+ },
1448
+ {
1449
+ internalType: "uint256",
1450
+ name: "index",
1451
+ type: "uint256",
1452
+ },
1453
+ {
1454
+ internalType: "uint256",
1455
+ name: "initialPosToken",
1456
+ type: "uint256",
1457
+ },
1458
+ {
1459
+ internalType: "uint256",
1460
+ name: "positionSizeDai",
1461
+ type: "uint256",
1462
+ },
1463
+ {
1464
+ internalType: "uint256",
1465
+ name: "openPrice",
1466
+ type: "uint256",
1467
+ },
1468
+ {
1469
+ internalType: "bool",
1470
+ name: "buy",
1471
+ type: "bool",
1472
+ },
1473
+ {
1474
+ internalType: "uint256",
1475
+ name: "leverage",
1476
+ type: "uint256",
1477
+ },
1478
+ {
1479
+ internalType: "uint256",
1480
+ name: "tp",
1481
+ type: "uint256",
1482
+ },
1483
+ {
1484
+ internalType: "uint256",
1485
+ name: "sl",
1486
+ type: "uint256",
1487
+ },
1488
+ ],
1489
+ internalType: "struct GFarmTradingStorageV5.Trade",
1490
+ name: "trade",
1491
+ type: "tuple",
1492
+ },
1493
+ {
1494
+ internalType: "uint256",
1495
+ name: "block",
1496
+ type: "uint256",
1497
+ },
1498
+ {
1499
+ internalType: "uint256",
1500
+ name: "wantedPrice",
1501
+ type: "uint256",
1502
+ },
1503
+ {
1504
+ internalType: "uint256",
1505
+ name: "slippageP",
1506
+ type: "uint256",
1507
+ },
1508
+ {
1509
+ internalType: "uint256",
1510
+ name: "spreadReductionP",
1511
+ type: "uint256",
1512
+ },
1513
+ {
1514
+ internalType: "uint256",
1515
+ name: "tokenId",
1516
+ type: "uint256",
1517
+ },
1518
+ ],
1519
+ stateMutability: "view",
1520
+ type: "function",
1521
+ },
1522
+ {
1523
+ inputs: [
1524
+ {
1525
+ internalType: "uint256",
1526
+ name: "",
1527
+ type: "uint256",
1528
+ },
1529
+ ],
1530
+ name: "reqID_pendingNftOrder",
1531
+ outputs: [
1532
+ {
1533
+ internalType: "address",
1534
+ name: "nftHolder",
1535
+ type: "address",
1536
+ },
1537
+ {
1538
+ internalType: "uint256",
1539
+ name: "nftId",
1540
+ type: "uint256",
1541
+ },
1542
+ {
1543
+ internalType: "address",
1544
+ name: "trader",
1545
+ type: "address",
1546
+ },
1547
+ {
1548
+ internalType: "uint256",
1549
+ name: "pairIndex",
1550
+ type: "uint256",
1551
+ },
1552
+ {
1553
+ internalType: "uint256",
1554
+ name: "index",
1555
+ type: "uint256",
1556
+ },
1557
+ {
1558
+ internalType: "enum GFarmTradingStorageV5.LimitOrder",
1559
+ name: "orderType",
1560
+ type: "uint8",
1561
+ },
1562
+ ],
1563
+ stateMutability: "view",
1564
+ type: "function",
1565
+ },
1566
+ {
1567
+ inputs: [
1568
+ {
1569
+ internalType: "address",
1570
+ name: "_callbacks",
1571
+ type: "address",
1572
+ },
1573
+ ],
1574
+ name: "setCallbacks",
1575
+ outputs: [],
1576
+ stateMutability: "nonpayable",
1577
+ type: "function",
1578
+ },
1579
+ {
1580
+ inputs: [
1581
+ {
1582
+ internalType: "uint256",
1583
+ name: "_lev",
1584
+ type: "uint256",
1585
+ },
1586
+ ],
1587
+ name: "setDefaultLeverageUnlocked",
1588
+ outputs: [],
1589
+ stateMutability: "nonpayable",
1590
+ type: "function",
1591
+ },
1592
+ {
1593
+ inputs: [
1594
+ {
1595
+ internalType: "address",
1596
+ name: "_dev",
1597
+ type: "address",
1598
+ },
1599
+ ],
1600
+ name: "setDev",
1601
+ outputs: [],
1602
+ stateMutability: "nonpayable",
1603
+ type: "function",
1604
+ },
1605
+ {
1606
+ inputs: [
1607
+ {
1608
+ internalType: "address",
1609
+ name: "_gov",
1610
+ type: "address",
1611
+ },
1612
+ ],
1613
+ name: "setGov",
1614
+ outputs: [],
1615
+ stateMutability: "nonpayable",
1616
+ type: "function",
1617
+ },
1618
+ {
1619
+ inputs: [
1620
+ {
1621
+ internalType: "address",
1622
+ name: "_trader",
1623
+ type: "address",
1624
+ },
1625
+ {
1626
+ internalType: "uint256",
1627
+ name: "_newLeverage",
1628
+ type: "uint256",
1629
+ },
1630
+ ],
1631
+ name: "setLeverageUnlocked",
1632
+ outputs: [],
1633
+ stateMutability: "nonpayable",
1634
+ type: "function",
1635
+ },
1636
+ {
1637
+ inputs: [
1638
+ {
1639
+ internalType: "uint256",
1640
+ name: "_max",
1641
+ type: "uint256",
1642
+ },
1643
+ ],
1644
+ name: "setMaxGainP",
1645
+ outputs: [],
1646
+ stateMutability: "nonpayable",
1647
+ type: "function",
1648
+ },
1649
+ {
1650
+ inputs: [
1651
+ {
1652
+ internalType: "uint256",
1653
+ name: "_pairIndex",
1654
+ type: "uint256",
1655
+ },
1656
+ {
1657
+ internalType: "uint256",
1658
+ name: "_newMaxOpenInterest",
1659
+ type: "uint256",
1660
+ },
1661
+ ],
1662
+ name: "setMaxOpenInterestDai",
1663
+ outputs: [],
1664
+ stateMutability: "nonpayable",
1665
+ type: "function",
1666
+ },
1667
+ {
1668
+ inputs: [
1669
+ {
1670
+ internalType: "uint256",
1671
+ name: "_maxPendingMarketOrders",
1672
+ type: "uint256",
1673
+ },
1674
+ ],
1675
+ name: "setMaxPendingMarketOrders",
1676
+ outputs: [],
1677
+ stateMutability: "nonpayable",
1678
+ type: "function",
1679
+ },
1680
+ {
1681
+ inputs: [
1682
+ {
1683
+ internalType: "uint256",
1684
+ name: "_max",
1685
+ type: "uint256",
1686
+ },
1687
+ ],
1688
+ name: "setMaxSlP",
1689
+ outputs: [],
1690
+ stateMutability: "nonpayable",
1691
+ type: "function",
1692
+ },
1693
+ {
1694
+ inputs: [
1695
+ {
1696
+ internalType: "uint256",
1697
+ name: "_maxTradesPerBlock",
1698
+ type: "uint256",
1699
+ },
1700
+ ],
1701
+ name: "setMaxTradesPerBlock",
1702
+ outputs: [],
1703
+ stateMutability: "nonpayable",
1704
+ type: "function",
1705
+ },
1706
+ {
1707
+ inputs: [
1708
+ {
1709
+ internalType: "uint256",
1710
+ name: "_maxTradesPerPair",
1711
+ type: "uint256",
1712
+ },
1713
+ ],
1714
+ name: "setMaxTradesPerPair",
1715
+ outputs: [],
1716
+ stateMutability: "nonpayable",
1717
+ type: "function",
1718
+ },
1719
+ {
1720
+ inputs: [
1721
+ {
1722
+ internalType: "uint256",
1723
+ name: "_blocks",
1724
+ type: "uint256",
1725
+ },
1726
+ ],
1727
+ name: "setNftSuccessTimelock",
1728
+ outputs: [],
1729
+ stateMutability: "nonpayable",
1730
+ type: "function",
1731
+ },
1732
+ {
1733
+ inputs: [
1734
+ {
1735
+ internalType: "address",
1736
+ name: "_pool",
1737
+ type: "address",
1738
+ },
1739
+ ],
1740
+ name: "setPool",
1741
+ outputs: [],
1742
+ stateMutability: "nonpayable",
1743
+ type: "function",
1744
+ },
1745
+ {
1746
+ inputs: [
1747
+ {
1748
+ internalType: "address",
1749
+ name: "_aggregator",
1750
+ type: "address",
1751
+ },
1752
+ ],
1753
+ name: "setPriceAggregator",
1754
+ outputs: [],
1755
+ stateMutability: "nonpayable",
1756
+ type: "function",
1757
+ },
1758
+ {
1759
+ inputs: [
1760
+ {
1761
+ internalType: "uint256[5]",
1762
+ name: "_r",
1763
+ type: "uint256[5]",
1764
+ },
1765
+ ],
1766
+ name: "setSpreadReductionsP",
1767
+ outputs: [],
1768
+ stateMutability: "nonpayable",
1769
+ type: "function",
1770
+ },
1771
+ {
1772
+ inputs: [
1773
+ {
1774
+ internalType: "address",
1775
+ name: "_tokenDaiRouter",
1776
+ type: "address",
1777
+ },
1778
+ ],
1779
+ name: "setTokenDaiRouter",
1780
+ outputs: [],
1781
+ stateMutability: "nonpayable",
1782
+ type: "function",
1783
+ },
1784
+ {
1785
+ inputs: [
1786
+ {
1787
+ internalType: "address",
1788
+ name: "_trading",
1789
+ type: "address",
1790
+ },
1791
+ ],
1792
+ name: "setTrading",
1793
+ outputs: [],
1794
+ stateMutability: "nonpayable",
1795
+ type: "function",
1796
+ },
1797
+ {
1798
+ inputs: [
1799
+ {
1800
+ internalType: "address",
1801
+ name: "_vault",
1802
+ type: "address",
1803
+ },
1804
+ ],
1805
+ name: "setVault",
1806
+ outputs: [],
1807
+ stateMutability: "nonpayable",
1808
+ type: "function",
1809
+ },
1810
+ {
1811
+ inputs: [
1812
+ {
1813
+ internalType: "uint256",
1814
+ name: "",
1815
+ type: "uint256",
1816
+ },
1817
+ ],
1818
+ name: "spreadReductionsP",
1819
+ outputs: [
1820
+ {
1821
+ internalType: "uint256",
1822
+ name: "",
1823
+ type: "uint256",
1824
+ },
1825
+ ],
1826
+ stateMutability: "view",
1827
+ type: "function",
1828
+ },
1829
+ {
1830
+ inputs: [
1831
+ {
1832
+ components: [
1833
+ {
1834
+ internalType: "address",
1835
+ name: "trader",
1836
+ type: "address",
1837
+ },
1838
+ {
1839
+ internalType: "uint256",
1840
+ name: "pairIndex",
1841
+ type: "uint256",
1842
+ },
1843
+ {
1844
+ internalType: "uint256",
1845
+ name: "index",
1846
+ type: "uint256",
1847
+ },
1848
+ {
1849
+ internalType: "uint256",
1850
+ name: "positionSize",
1851
+ type: "uint256",
1852
+ },
1853
+ {
1854
+ internalType: "uint256",
1855
+ name: "spreadReductionP",
1856
+ type: "uint256",
1857
+ },
1858
+ {
1859
+ internalType: "bool",
1860
+ name: "buy",
1861
+ type: "bool",
1862
+ },
1863
+ {
1864
+ internalType: "uint256",
1865
+ name: "leverage",
1866
+ type: "uint256",
1867
+ },
1868
+ {
1869
+ internalType: "uint256",
1870
+ name: "tp",
1871
+ type: "uint256",
1872
+ },
1873
+ {
1874
+ internalType: "uint256",
1875
+ name: "sl",
1876
+ type: "uint256",
1877
+ },
1878
+ {
1879
+ internalType: "uint256",
1880
+ name: "minPrice",
1881
+ type: "uint256",
1882
+ },
1883
+ {
1884
+ internalType: "uint256",
1885
+ name: "maxPrice",
1886
+ type: "uint256",
1887
+ },
1888
+ {
1889
+ internalType: "uint256",
1890
+ name: "block",
1891
+ type: "uint256",
1892
+ },
1893
+ {
1894
+ internalType: "uint256",
1895
+ name: "tokenId",
1896
+ type: "uint256",
1897
+ },
1898
+ ],
1899
+ internalType: "struct GFarmTradingStorageV5.OpenLimitOrder",
1900
+ name: "o",
1901
+ type: "tuple",
1902
+ },
1903
+ ],
1904
+ name: "storeOpenLimitOrder",
1905
+ outputs: [],
1906
+ stateMutability: "nonpayable",
1907
+ type: "function",
1908
+ },
1909
+ {
1910
+ inputs: [
1911
+ {
1912
+ components: [
1913
+ {
1914
+ components: [
1915
+ {
1916
+ internalType: "address",
1917
+ name: "trader",
1918
+ type: "address",
1919
+ },
1920
+ {
1921
+ internalType: "uint256",
1922
+ name: "pairIndex",
1923
+ type: "uint256",
1924
+ },
1925
+ {
1926
+ internalType: "uint256",
1927
+ name: "index",
1928
+ type: "uint256",
1929
+ },
1930
+ {
1931
+ internalType: "uint256",
1932
+ name: "initialPosToken",
1933
+ type: "uint256",
1934
+ },
1935
+ {
1936
+ internalType: "uint256",
1937
+ name: "positionSizeDai",
1938
+ type: "uint256",
1939
+ },
1940
+ {
1941
+ internalType: "uint256",
1942
+ name: "openPrice",
1943
+ type: "uint256",
1944
+ },
1945
+ {
1946
+ internalType: "bool",
1947
+ name: "buy",
1948
+ type: "bool",
1949
+ },
1950
+ {
1951
+ internalType: "uint256",
1952
+ name: "leverage",
1953
+ type: "uint256",
1954
+ },
1955
+ {
1956
+ internalType: "uint256",
1957
+ name: "tp",
1958
+ type: "uint256",
1959
+ },
1960
+ {
1961
+ internalType: "uint256",
1962
+ name: "sl",
1963
+ type: "uint256",
1964
+ },
1965
+ ],
1966
+ internalType: "struct GFarmTradingStorageV5.Trade",
1967
+ name: "trade",
1968
+ type: "tuple",
1969
+ },
1970
+ {
1971
+ internalType: "uint256",
1972
+ name: "block",
1973
+ type: "uint256",
1974
+ },
1975
+ {
1976
+ internalType: "uint256",
1977
+ name: "wantedPrice",
1978
+ type: "uint256",
1979
+ },
1980
+ {
1981
+ internalType: "uint256",
1982
+ name: "slippageP",
1983
+ type: "uint256",
1984
+ },
1985
+ {
1986
+ internalType: "uint256",
1987
+ name: "spreadReductionP",
1988
+ type: "uint256",
1989
+ },
1990
+ {
1991
+ internalType: "uint256",
1992
+ name: "tokenId",
1993
+ type: "uint256",
1994
+ },
1995
+ ],
1996
+ internalType: "struct GFarmTradingStorageV5.PendingMarketOrder",
1997
+ name: "_order",
1998
+ type: "tuple",
1999
+ },
2000
+ {
2001
+ internalType: "uint256",
2002
+ name: "_id",
2003
+ type: "uint256",
2004
+ },
2005
+ {
2006
+ internalType: "bool",
2007
+ name: "_open",
2008
+ type: "bool",
2009
+ },
2010
+ ],
2011
+ name: "storePendingMarketOrder",
2012
+ outputs: [],
2013
+ stateMutability: "nonpayable",
2014
+ type: "function",
2015
+ },
2016
+ {
2017
+ inputs: [
2018
+ {
2019
+ components: [
2020
+ {
2021
+ internalType: "address",
2022
+ name: "nftHolder",
2023
+ type: "address",
2024
+ },
2025
+ {
2026
+ internalType: "uint256",
2027
+ name: "nftId",
2028
+ type: "uint256",
2029
+ },
2030
+ {
2031
+ internalType: "address",
2032
+ name: "trader",
2033
+ type: "address",
2034
+ },
2035
+ {
2036
+ internalType: "uint256",
2037
+ name: "pairIndex",
2038
+ type: "uint256",
2039
+ },
2040
+ {
2041
+ internalType: "uint256",
2042
+ name: "index",
2043
+ type: "uint256",
2044
+ },
2045
+ {
2046
+ internalType: "enum GFarmTradingStorageV5.LimitOrder",
2047
+ name: "orderType",
2048
+ type: "uint8",
2049
+ },
2050
+ ],
2051
+ internalType: "struct GFarmTradingStorageV5.PendingNftOrder",
2052
+ name: "_nftOrder",
2053
+ type: "tuple",
2054
+ },
2055
+ {
2056
+ internalType: "uint256",
2057
+ name: "_orderId",
2058
+ type: "uint256",
2059
+ },
2060
+ ],
2061
+ name: "storePendingNftOrder",
2062
+ outputs: [],
2063
+ stateMutability: "nonpayable",
2064
+ type: "function",
2065
+ },
2066
+ {
2067
+ inputs: [
2068
+ {
2069
+ internalType: "address",
2070
+ name: "_trader",
2071
+ type: "address",
2072
+ },
2073
+ {
2074
+ internalType: "address",
2075
+ name: "_referral",
2076
+ type: "address",
2077
+ },
2078
+ ],
2079
+ name: "storeReferral",
2080
+ outputs: [],
2081
+ stateMutability: "nonpayable",
2082
+ type: "function",
2083
+ },
2084
+ {
2085
+ inputs: [
2086
+ {
2087
+ components: [
2088
+ {
2089
+ internalType: "address",
2090
+ name: "trader",
2091
+ type: "address",
2092
+ },
2093
+ {
2094
+ internalType: "uint256",
2095
+ name: "pairIndex",
2096
+ type: "uint256",
2097
+ },
2098
+ {
2099
+ internalType: "uint256",
2100
+ name: "index",
2101
+ type: "uint256",
2102
+ },
2103
+ {
2104
+ internalType: "uint256",
2105
+ name: "initialPosToken",
2106
+ type: "uint256",
2107
+ },
2108
+ {
2109
+ internalType: "uint256",
2110
+ name: "positionSizeDai",
2111
+ type: "uint256",
2112
+ },
2113
+ {
2114
+ internalType: "uint256",
2115
+ name: "openPrice",
2116
+ type: "uint256",
2117
+ },
2118
+ {
2119
+ internalType: "bool",
2120
+ name: "buy",
2121
+ type: "bool",
2122
+ },
2123
+ {
2124
+ internalType: "uint256",
2125
+ name: "leverage",
2126
+ type: "uint256",
2127
+ },
2128
+ {
2129
+ internalType: "uint256",
2130
+ name: "tp",
2131
+ type: "uint256",
2132
+ },
2133
+ {
2134
+ internalType: "uint256",
2135
+ name: "sl",
2136
+ type: "uint256",
2137
+ },
2138
+ ],
2139
+ internalType: "struct GFarmTradingStorageV5.Trade",
2140
+ name: "_trade",
2141
+ type: "tuple",
2142
+ },
2143
+ {
2144
+ components: [
2145
+ {
2146
+ internalType: "uint256",
2147
+ name: "tokenId",
2148
+ type: "uint256",
2149
+ },
2150
+ {
2151
+ internalType: "uint256",
2152
+ name: "tokenPriceDai",
2153
+ type: "uint256",
2154
+ },
2155
+ {
2156
+ internalType: "uint256",
2157
+ name: "openInterestDai",
2158
+ type: "uint256",
2159
+ },
2160
+ {
2161
+ internalType: "uint256",
2162
+ name: "tpLastUpdated",
2163
+ type: "uint256",
2164
+ },
2165
+ {
2166
+ internalType: "uint256",
2167
+ name: "slLastUpdated",
2168
+ type: "uint256",
2169
+ },
2170
+ {
2171
+ internalType: "bool",
2172
+ name: "beingMarketClosed",
2173
+ type: "bool",
2174
+ },
2175
+ ],
2176
+ internalType: "struct GFarmTradingStorageV5.TradeInfo",
2177
+ name: "_tradeInfo",
2178
+ type: "tuple",
2179
+ },
2180
+ ],
2181
+ name: "storeTrade",
2182
+ outputs: [],
2183
+ stateMutability: "nonpayable",
2184
+ type: "function",
2185
+ },
2186
+ {
2187
+ inputs: [
2188
+ {
2189
+ internalType: "uint256",
2190
+ name: "",
2191
+ type: "uint256",
2192
+ },
2193
+ ],
2194
+ name: "supportedTokens",
2195
+ outputs: [
2196
+ {
2197
+ internalType: "address",
2198
+ name: "",
2199
+ type: "address",
2200
+ },
2201
+ ],
2202
+ stateMutability: "view",
2203
+ type: "function",
2204
+ },
2205
+ {
2206
+ inputs: [],
2207
+ name: "token",
2208
+ outputs: [
2209
+ {
2210
+ internalType: "contract TokenInterfaceV5",
2211
+ name: "",
2212
+ type: "address",
2213
+ },
2214
+ ],
2215
+ stateMutability: "view",
2216
+ type: "function",
2217
+ },
2218
+ {
2219
+ inputs: [],
2220
+ name: "tokenDaiRouter",
2221
+ outputs: [
2222
+ {
2223
+ internalType: "address",
2224
+ name: "",
2225
+ type: "address",
2226
+ },
2227
+ ],
2228
+ stateMutability: "view",
2229
+ type: "function",
2230
+ },
2231
+ {
2232
+ inputs: [],
2233
+ name: "tokensBurned",
2234
+ outputs: [
2235
+ {
2236
+ internalType: "uint256",
2237
+ name: "",
2238
+ type: "uint256",
2239
+ },
2240
+ ],
2241
+ stateMutability: "view",
2242
+ type: "function",
2243
+ },
2244
+ {
2245
+ inputs: [],
2246
+ name: "tokensMinted",
2247
+ outputs: [
2248
+ {
2249
+ internalType: "uint256",
2250
+ name: "",
2251
+ type: "uint256",
2252
+ },
2253
+ ],
2254
+ stateMutability: "view",
2255
+ type: "function",
2256
+ },
2257
+ {
2258
+ inputs: [
2259
+ {
2260
+ internalType: "address",
2261
+ name: "",
2262
+ type: "address",
2263
+ },
2264
+ ],
2265
+ name: "traders",
2266
+ outputs: [
2267
+ {
2268
+ internalType: "uint256",
2269
+ name: "leverageUnlocked",
2270
+ type: "uint256",
2271
+ },
2272
+ {
2273
+ internalType: "address",
2274
+ name: "referral",
2275
+ type: "address",
2276
+ },
2277
+ {
2278
+ internalType: "uint256",
2279
+ name: "referralRewardsTotal",
2280
+ type: "uint256",
2281
+ },
2282
+ ],
2283
+ stateMutability: "view",
2284
+ type: "function",
2285
+ },
2286
+ {
2287
+ inputs: [
2288
+ {
2289
+ internalType: "uint256",
2290
+ name: "",
2291
+ type: "uint256",
2292
+ },
2293
+ ],
2294
+ name: "tradesPerBlock",
2295
+ outputs: [
2296
+ {
2297
+ internalType: "uint256",
2298
+ name: "",
2299
+ type: "uint256",
2300
+ },
2301
+ ],
2302
+ stateMutability: "view",
2303
+ type: "function",
2304
+ },
2305
+ {
2306
+ inputs: [],
2307
+ name: "trading",
2308
+ outputs: [
2309
+ {
2310
+ internalType: "contract PausableInterfaceV5",
2311
+ name: "",
2312
+ type: "address",
2313
+ },
2314
+ ],
2315
+ stateMutability: "view",
2316
+ type: "function",
2317
+ },
2318
+ {
2319
+ inputs: [
2320
+ {
2321
+ internalType: "address",
2322
+ name: "_from",
2323
+ type: "address",
2324
+ },
2325
+ {
2326
+ internalType: "address",
2327
+ name: "_to",
2328
+ type: "address",
2329
+ },
2330
+ {
2331
+ internalType: "uint256",
2332
+ name: "_amount",
2333
+ type: "uint256",
2334
+ },
2335
+ ],
2336
+ name: "transferDai",
2337
+ outputs: [],
2338
+ stateMutability: "nonpayable",
2339
+ type: "function",
2340
+ },
2341
+ {
2342
+ inputs: [
2343
+ {
2344
+ internalType: "address",
2345
+ name: "_from",
2346
+ type: "address",
2347
+ },
2348
+ {
2349
+ internalType: "uint256",
2350
+ name: "_pairIndex",
2351
+ type: "uint256",
2352
+ },
2353
+ {
2354
+ internalType: "uint256",
2355
+ name: "_leveragedPosDai",
2356
+ type: "uint256",
2357
+ },
2358
+ ],
2359
+ name: "transferLinkToAggregator",
2360
+ outputs: [],
2361
+ stateMutability: "nonpayable",
2362
+ type: "function",
2363
+ },
2364
+ {
2365
+ inputs: [
2366
+ {
2367
+ internalType: "address",
2368
+ name: "_trader",
2369
+ type: "address",
2370
+ },
2371
+ {
2372
+ internalType: "uint256",
2373
+ name: "_pairIndex",
2374
+ type: "uint256",
2375
+ },
2376
+ {
2377
+ internalType: "uint256",
2378
+ name: "_index",
2379
+ type: "uint256",
2380
+ },
2381
+ ],
2382
+ name: "unregisterOpenLimitOrder",
2383
+ outputs: [],
2384
+ stateMutability: "nonpayable",
2385
+ type: "function",
2386
+ },
2387
+ {
2388
+ inputs: [
2389
+ {
2390
+ internalType: "uint256",
2391
+ name: "_id",
2392
+ type: "uint256",
2393
+ },
2394
+ {
2395
+ internalType: "bool",
2396
+ name: "_open",
2397
+ type: "bool",
2398
+ },
2399
+ ],
2400
+ name: "unregisterPendingMarketOrder",
2401
+ outputs: [],
2402
+ stateMutability: "nonpayable",
2403
+ type: "function",
2404
+ },
2405
+ {
2406
+ inputs: [
2407
+ {
2408
+ internalType: "uint256",
2409
+ name: "_order",
2410
+ type: "uint256",
2411
+ },
2412
+ ],
2413
+ name: "unregisterPendingNftOrder",
2414
+ outputs: [],
2415
+ stateMutability: "nonpayable",
2416
+ type: "function",
2417
+ },
2418
+ {
2419
+ inputs: [
2420
+ {
2421
+ internalType: "address",
2422
+ name: "trader",
2423
+ type: "address",
2424
+ },
2425
+ {
2426
+ internalType: "uint256",
2427
+ name: "pairIndex",
2428
+ type: "uint256",
2429
+ },
2430
+ {
2431
+ internalType: "uint256",
2432
+ name: "index",
2433
+ type: "uint256",
2434
+ },
2435
+ ],
2436
+ name: "unregisterTrade",
2437
+ outputs: [],
2438
+ stateMutability: "nonpayable",
2439
+ type: "function",
2440
+ },
2441
+ {
2442
+ inputs: [
2443
+ {
2444
+ internalType: "contract NftInterfaceV5[5]",
2445
+ name: "_nfts",
2446
+ type: "address[5]",
2447
+ },
2448
+ ],
2449
+ name: "updateNfts",
2450
+ outputs: [],
2451
+ stateMutability: "nonpayable",
2452
+ type: "function",
2453
+ },
2454
+ {
2455
+ inputs: [
2456
+ {
2457
+ components: [
2458
+ {
2459
+ internalType: "address",
2460
+ name: "trader",
2461
+ type: "address",
2462
+ },
2463
+ {
2464
+ internalType: "uint256",
2465
+ name: "pairIndex",
2466
+ type: "uint256",
2467
+ },
2468
+ {
2469
+ internalType: "uint256",
2470
+ name: "index",
2471
+ type: "uint256",
2472
+ },
2473
+ {
2474
+ internalType: "uint256",
2475
+ name: "positionSize",
2476
+ type: "uint256",
2477
+ },
2478
+ {
2479
+ internalType: "uint256",
2480
+ name: "spreadReductionP",
2481
+ type: "uint256",
2482
+ },
2483
+ {
2484
+ internalType: "bool",
2485
+ name: "buy",
2486
+ type: "bool",
2487
+ },
2488
+ {
2489
+ internalType: "uint256",
2490
+ name: "leverage",
2491
+ type: "uint256",
2492
+ },
2493
+ {
2494
+ internalType: "uint256",
2495
+ name: "tp",
2496
+ type: "uint256",
2497
+ },
2498
+ {
2499
+ internalType: "uint256",
2500
+ name: "sl",
2501
+ type: "uint256",
2502
+ },
2503
+ {
2504
+ internalType: "uint256",
2505
+ name: "minPrice",
2506
+ type: "uint256",
2507
+ },
2508
+ {
2509
+ internalType: "uint256",
2510
+ name: "maxPrice",
2511
+ type: "uint256",
2512
+ },
2513
+ {
2514
+ internalType: "uint256",
2515
+ name: "block",
2516
+ type: "uint256",
2517
+ },
2518
+ {
2519
+ internalType: "uint256",
2520
+ name: "tokenId",
2521
+ type: "uint256",
2522
+ },
2523
+ ],
2524
+ internalType: "struct GFarmTradingStorageV5.OpenLimitOrder",
2525
+ name: "_o",
2526
+ type: "tuple",
2527
+ },
2528
+ ],
2529
+ name: "updateOpenLimitOrder",
2530
+ outputs: [],
2531
+ stateMutability: "nonpayable",
2532
+ type: "function",
2533
+ },
2534
+ {
2535
+ inputs: [
2536
+ {
2537
+ internalType: "address",
2538
+ name: "_trader",
2539
+ type: "address",
2540
+ },
2541
+ {
2542
+ internalType: "uint256",
2543
+ name: "_pairIndex",
2544
+ type: "uint256",
2545
+ },
2546
+ {
2547
+ internalType: "uint256",
2548
+ name: "_index",
2549
+ type: "uint256",
2550
+ },
2551
+ {
2552
+ internalType: "uint256",
2553
+ name: "_newSl",
2554
+ type: "uint256",
2555
+ },
2556
+ ],
2557
+ name: "updateSl",
2558
+ outputs: [],
2559
+ stateMutability: "nonpayable",
2560
+ type: "function",
2561
+ },
2562
+ {
2563
+ inputs: [
2564
+ {
2565
+ internalType: "contract TokenInterfaceV5",
2566
+ name: "_newToken",
2567
+ type: "address",
2568
+ },
2569
+ ],
2570
+ name: "updateToken",
2571
+ outputs: [],
2572
+ stateMutability: "nonpayable",
2573
+ type: "function",
2574
+ },
2575
+ {
2576
+ inputs: [
2577
+ {
2578
+ internalType: "address",
2579
+ name: "_trader",
2580
+ type: "address",
2581
+ },
2582
+ {
2583
+ internalType: "uint256",
2584
+ name: "_pairIndex",
2585
+ type: "uint256",
2586
+ },
2587
+ {
2588
+ internalType: "uint256",
2589
+ name: "_index",
2590
+ type: "uint256",
2591
+ },
2592
+ {
2593
+ internalType: "uint256",
2594
+ name: "_newTp",
2595
+ type: "uint256",
2596
+ },
2597
+ ],
2598
+ name: "updateTp",
2599
+ outputs: [],
2600
+ stateMutability: "nonpayable",
2601
+ type: "function",
2602
+ },
2603
+ {
2604
+ inputs: [
2605
+ {
2606
+ components: [
2607
+ {
2608
+ internalType: "address",
2609
+ name: "trader",
2610
+ type: "address",
2611
+ },
2612
+ {
2613
+ internalType: "uint256",
2614
+ name: "pairIndex",
2615
+ type: "uint256",
2616
+ },
2617
+ {
2618
+ internalType: "uint256",
2619
+ name: "index",
2620
+ type: "uint256",
2621
+ },
2622
+ {
2623
+ internalType: "uint256",
2624
+ name: "initialPosToken",
2625
+ type: "uint256",
2626
+ },
2627
+ {
2628
+ internalType: "uint256",
2629
+ name: "positionSizeDai",
2630
+ type: "uint256",
2631
+ },
2632
+ {
2633
+ internalType: "uint256",
2634
+ name: "openPrice",
2635
+ type: "uint256",
2636
+ },
2637
+ {
2638
+ internalType: "bool",
2639
+ name: "buy",
2640
+ type: "bool",
2641
+ },
2642
+ {
2643
+ internalType: "uint256",
2644
+ name: "leverage",
2645
+ type: "uint256",
2646
+ },
2647
+ {
2648
+ internalType: "uint256",
2649
+ name: "tp",
2650
+ type: "uint256",
2651
+ },
2652
+ {
2653
+ internalType: "uint256",
2654
+ name: "sl",
2655
+ type: "uint256",
2656
+ },
2657
+ ],
2658
+ internalType: "struct GFarmTradingStorageV5.Trade",
2659
+ name: "_t",
2660
+ type: "tuple",
2661
+ },
2662
+ ],
2663
+ name: "updateTrade",
2664
+ outputs: [],
2665
+ stateMutability: "nonpayable",
2666
+ type: "function",
2667
+ },
2668
+ {
2669
+ inputs: [],
2670
+ name: "vault",
2671
+ outputs: [
2672
+ {
2673
+ internalType: "address",
2674
+ name: "",
2675
+ type: "address",
2676
+ },
2677
+ ],
2678
+ stateMutability: "view",
2679
+ type: "function",
2680
+ },
2681
+ ];
2682
+ class GFarmTradingStorageV5__factory {
2683
+ static createInterface() {
2684
+ return new ethers_1.utils.Interface(_abi);
2685
+ }
2686
+ static connect(address, signerOrProvider) {
2687
+ return new ethers_1.Contract(address, _abi, signerOrProvider);
2688
+ }
2689
+ }
2690
+ exports.GFarmTradingStorageV5__factory = GFarmTradingStorageV5__factory;
2691
+ GFarmTradingStorageV5__factory.abi = _abi;