@gmx-io/sdk 0.0.4 → 0.0.5

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 (90) hide show
  1. package/build/src/abis/CustomErrors.json +3196 -3196
  2. package/build/src/abis/DataStore.json +1335 -1335
  3. package/build/src/abis/ERC721.json +399 -399
  4. package/build/src/abis/EventEmitter.json +1967 -1967
  5. package/build/src/abis/ExchangeRouter.json +1461 -1461
  6. package/build/src/abis/GMT.json +478 -478
  7. package/build/src/abis/GlpManager.json +590 -589
  8. package/build/src/abis/GlvReader.json +1338 -1337
  9. package/build/src/abis/GlvRouter.json +595 -594
  10. package/build/src/abis/GmxMigrator.json +601 -601
  11. package/build/src/abis/GovToken.json +1040 -1040
  12. package/build/src/abis/MintableBaseToken.json +645 -645
  13. package/build/src/abis/Multicall.json +310 -310
  14. package/build/src/abis/OrderBook.json +1995 -1995
  15. package/build/src/abis/OrderBookReader.json +103 -103
  16. package/build/src/abis/OrderExecutor.json +108 -108
  17. package/build/src/abis/PositionManager.json +1162 -1162
  18. package/build/src/abis/PositionRouter.json +2028 -2028
  19. package/build/src/abis/Reader.json +328 -328
  20. package/build/src/abis/ReaderV2.json +628 -628
  21. package/build/src/abis/ReferralStorage.json +460 -460
  22. package/build/src/abis/RewardReader.json +78 -78
  23. package/build/src/abis/RewardRouter.json +767 -767
  24. package/build/src/abis/RewardTracker.json +848 -848
  25. package/build/src/abis/Router-v2.json +602 -602
  26. package/build/src/abis/Router.json +602 -602
  27. package/build/src/abis/SubaccountRouter.json +572 -572
  28. package/build/src/abis/SyntheticsReader.json +4238 -4238
  29. package/build/src/abis/SyntheticsRouter.json +67 -67
  30. package/build/src/abis/Timelock.json +1735 -1735
  31. package/build/src/abis/Token.json +311 -311
  32. package/build/src/abis/Treasury.json +375 -375
  33. package/build/src/abis/UniPool.json +81 -81
  34. package/build/src/abis/UniswapV2.json +1 -1
  35. package/build/src/abis/Vault.json +3218 -3218
  36. package/build/src/abis/VaultReader.json +81 -81
  37. package/build/src/abis/VaultV2.json +3017 -3017
  38. package/build/src/abis/VaultV2b.json +3218 -3218
  39. package/build/src/abis/Vester.json +942 -942
  40. package/build/src/abis/WETH.json +289 -289
  41. package/build/src/abis/YieldFarm.json +556 -556
  42. package/build/src/abis/YieldToken.json +512 -512
  43. package/build/src/prebuilt/hashedMarketConfigKeys.json +3656 -3656
  44. package/build/src/prebuilt/hashedMarketValuesKeys.json +1101 -1101
  45. package/package.json +2 -2
  46. package/build/abis/CustomErrors.json +0 -3254
  47. package/build/abis/DataStore.json +0 -1440
  48. package/build/abis/ERC721.json +0 -442
  49. package/build/abis/EventEmitter.json +0 -2065
  50. package/build/abis/ExchangeRouter.json +0 -1598
  51. package/build/abis/GMT.json +0 -522
  52. package/build/abis/GlpManager.json +0 -592
  53. package/build/abis/GlvReader.json +0 -1425
  54. package/build/abis/GlvRouter.json +0 -613
  55. package/build/abis/GmxMigrator.json +0 -657
  56. package/build/abis/GovToken.json +0 -1121
  57. package/build/abis/MintableBaseToken.json +0 -696
  58. package/build/abis/Multicall.json +0 -333
  59. package/build/abis/OrderBook.json +0 -1997
  60. package/build/abis/OrderBookReader.json +0 -111
  61. package/build/abis/OrderExecutor.json +0 -122
  62. package/build/abis/PositionManager.json +0 -1165
  63. package/build/abis/PositionRouter.json +0 -2030
  64. package/build/abis/Reader.json +0 -355
  65. package/build/abis/ReaderV2.json +0 -630
  66. package/build/abis/ReferralStorage.json +0 -507
  67. package/build/abis/RewardReader.json +0 -86
  68. package/build/abis/RewardRouter.json +0 -769
  69. package/build/abis/RewardTracker.json +0 -918
  70. package/build/abis/Router-v2.json +0 -605
  71. package/build/abis/Router.json +0 -605
  72. package/build/abis/SubaccountRouter.json +0 -648
  73. package/build/abis/SyntheticsReader.json +0 -4577
  74. package/build/abis/SyntheticsRouter.json +0 -77
  75. package/build/abis/Timelock.json +0 -1737
  76. package/build/abis/Token.json +0 -345
  77. package/build/abis/Treasury.json +0 -411
  78. package/build/abis/UniPool.json +0 -89
  79. package/build/abis/UniswapV2.json +0 -1
  80. package/build/abis/Vault.json +0 -3220
  81. package/build/abis/VaultReader.json +0 -87
  82. package/build/abis/VaultV2.json +0 -3019
  83. package/build/abis/VaultV2b.json +0 -3220
  84. package/build/abis/Vester.json +0 -1031
  85. package/build/abis/WETH.json +0 -320
  86. package/build/abis/YieldFarm.json +0 -599
  87. package/build/abis/YieldToken.json +0 -560
  88. package/build/prebuilt/hashedMarketConfigKeys.json +0 -3658
  89. package/build/prebuilt/hashedMarketValuesKeys.json +0 -1103
  90. /package/build/{prebuilt → src/prebuilt}/index.ts +0 -0
@@ -1,3019 +0,0 @@
1
- {
2
- "_format": "hh-sol-artifact-1",
3
- "contractName": "Vault",
4
- "sourceName": "contracts/core/Vault.sol",
5
- "abi": [
6
- {
7
- "inputs": [],
8
- "stateMutability": "nonpayable",
9
- "type": "constructor"
10
- },
11
- {
12
- "anonymous": false,
13
- "inputs": [
14
- {
15
- "indexed": false,
16
- "internalType": "address",
17
- "name": "account",
18
- "type": "address"
19
- },
20
- {
21
- "indexed": false,
22
- "internalType": "address",
23
- "name": "token",
24
- "type": "address"
25
- },
26
- {
27
- "indexed": false,
28
- "internalType": "uint256",
29
- "name": "tokenAmount",
30
- "type": "uint256"
31
- },
32
- {
33
- "indexed": false,
34
- "internalType": "uint256",
35
- "name": "usdgAmount",
36
- "type": "uint256"
37
- },
38
- {
39
- "indexed": false,
40
- "internalType": "uint256",
41
- "name": "feeBasisPoints",
42
- "type": "uint256"
43
- }
44
- ],
45
- "name": "BuyUSDG",
46
- "type": "event"
47
- },
48
- {
49
- "anonymous": false,
50
- "inputs": [
51
- {
52
- "indexed": false,
53
- "internalType": "bytes32",
54
- "name": "key",
55
- "type": "bytes32"
56
- },
57
- {
58
- "indexed": false,
59
- "internalType": "uint256",
60
- "name": "size",
61
- "type": "uint256"
62
- },
63
- {
64
- "indexed": false,
65
- "internalType": "uint256",
66
- "name": "collateral",
67
- "type": "uint256"
68
- },
69
- {
70
- "indexed": false,
71
- "internalType": "uint256",
72
- "name": "averagePrice",
73
- "type": "uint256"
74
- },
75
- {
76
- "indexed": false,
77
- "internalType": "uint256",
78
- "name": "entryFundingRate",
79
- "type": "uint256"
80
- },
81
- {
82
- "indexed": false,
83
- "internalType": "uint256",
84
- "name": "reserveAmount",
85
- "type": "uint256"
86
- },
87
- {
88
- "indexed": false,
89
- "internalType": "int256",
90
- "name": "realisedPnl",
91
- "type": "int256"
92
- }
93
- ],
94
- "name": "ClosePosition",
95
- "type": "event"
96
- },
97
- {
98
- "anonymous": false,
99
- "inputs": [
100
- {
101
- "indexed": false,
102
- "internalType": "address",
103
- "name": "token",
104
- "type": "address"
105
- },
106
- {
107
- "indexed": false,
108
- "internalType": "uint256",
109
- "name": "feeUsd",
110
- "type": "uint256"
111
- },
112
- {
113
- "indexed": false,
114
- "internalType": "uint256",
115
- "name": "feeTokens",
116
- "type": "uint256"
117
- }
118
- ],
119
- "name": "CollectMarginFees",
120
- "type": "event"
121
- },
122
- {
123
- "anonymous": false,
124
- "inputs": [
125
- {
126
- "indexed": false,
127
- "internalType": "address",
128
- "name": "token",
129
- "type": "address"
130
- },
131
- {
132
- "indexed": false,
133
- "internalType": "uint256",
134
- "name": "feeUsd",
135
- "type": "uint256"
136
- },
137
- {
138
- "indexed": false,
139
- "internalType": "uint256",
140
- "name": "feeTokens",
141
- "type": "uint256"
142
- }
143
- ],
144
- "name": "CollectSwapFees",
145
- "type": "event"
146
- },
147
- {
148
- "anonymous": false,
149
- "inputs": [
150
- {
151
- "indexed": false,
152
- "internalType": "address",
153
- "name": "token",
154
- "type": "address"
155
- },
156
- {
157
- "indexed": false,
158
- "internalType": "uint256",
159
- "name": "amount",
160
- "type": "uint256"
161
- }
162
- ],
163
- "name": "DecreaseGuaranteedUsd",
164
- "type": "event"
165
- },
166
- {
167
- "anonymous": false,
168
- "inputs": [
169
- {
170
- "indexed": false,
171
- "internalType": "address",
172
- "name": "token",
173
- "type": "address"
174
- },
175
- {
176
- "indexed": false,
177
- "internalType": "uint256",
178
- "name": "amount",
179
- "type": "uint256"
180
- }
181
- ],
182
- "name": "DecreasePoolAmount",
183
- "type": "event"
184
- },
185
- {
186
- "anonymous": false,
187
- "inputs": [
188
- {
189
- "indexed": false,
190
- "internalType": "bytes32",
191
- "name": "key",
192
- "type": "bytes32"
193
- },
194
- {
195
- "indexed": false,
196
- "internalType": "address",
197
- "name": "account",
198
- "type": "address"
199
- },
200
- {
201
- "indexed": false,
202
- "internalType": "address",
203
- "name": "collateralToken",
204
- "type": "address"
205
- },
206
- {
207
- "indexed": false,
208
- "internalType": "address",
209
- "name": "indexToken",
210
- "type": "address"
211
- },
212
- {
213
- "indexed": false,
214
- "internalType": "uint256",
215
- "name": "collateralDelta",
216
- "type": "uint256"
217
- },
218
- {
219
- "indexed": false,
220
- "internalType": "uint256",
221
- "name": "sizeDelta",
222
- "type": "uint256"
223
- },
224
- {
225
- "indexed": false,
226
- "internalType": "bool",
227
- "name": "isLong",
228
- "type": "bool"
229
- },
230
- {
231
- "indexed": false,
232
- "internalType": "uint256",
233
- "name": "price",
234
- "type": "uint256"
235
- },
236
- {
237
- "indexed": false,
238
- "internalType": "uint256",
239
- "name": "fee",
240
- "type": "uint256"
241
- }
242
- ],
243
- "name": "DecreasePosition",
244
- "type": "event"
245
- },
246
- {
247
- "anonymous": false,
248
- "inputs": [
249
- {
250
- "indexed": false,
251
- "internalType": "address",
252
- "name": "token",
253
- "type": "address"
254
- },
255
- {
256
- "indexed": false,
257
- "internalType": "uint256",
258
- "name": "amount",
259
- "type": "uint256"
260
- }
261
- ],
262
- "name": "DecreaseReservedAmount",
263
- "type": "event"
264
- },
265
- {
266
- "anonymous": false,
267
- "inputs": [
268
- {
269
- "indexed": false,
270
- "internalType": "address",
271
- "name": "token",
272
- "type": "address"
273
- },
274
- {
275
- "indexed": false,
276
- "internalType": "uint256",
277
- "name": "amount",
278
- "type": "uint256"
279
- }
280
- ],
281
- "name": "DecreaseUsdgAmount",
282
- "type": "event"
283
- },
284
- {
285
- "anonymous": false,
286
- "inputs": [
287
- {
288
- "indexed": false,
289
- "internalType": "address",
290
- "name": "token",
291
- "type": "address"
292
- },
293
- {
294
- "indexed": false,
295
- "internalType": "uint256",
296
- "name": "amount",
297
- "type": "uint256"
298
- }
299
- ],
300
- "name": "DirectPoolDeposit",
301
- "type": "event"
302
- },
303
- {
304
- "anonymous": false,
305
- "inputs": [
306
- {
307
- "indexed": false,
308
- "internalType": "address",
309
- "name": "token",
310
- "type": "address"
311
- },
312
- {
313
- "indexed": false,
314
- "internalType": "uint256",
315
- "name": "amount",
316
- "type": "uint256"
317
- }
318
- ],
319
- "name": "IncreaseGuaranteedUsd",
320
- "type": "event"
321
- },
322
- {
323
- "anonymous": false,
324
- "inputs": [
325
- {
326
- "indexed": false,
327
- "internalType": "address",
328
- "name": "token",
329
- "type": "address"
330
- },
331
- {
332
- "indexed": false,
333
- "internalType": "uint256",
334
- "name": "amount",
335
- "type": "uint256"
336
- }
337
- ],
338
- "name": "IncreasePoolAmount",
339
- "type": "event"
340
- },
341
- {
342
- "anonymous": false,
343
- "inputs": [
344
- {
345
- "indexed": false,
346
- "internalType": "bytes32",
347
- "name": "key",
348
- "type": "bytes32"
349
- },
350
- {
351
- "indexed": false,
352
- "internalType": "address",
353
- "name": "account",
354
- "type": "address"
355
- },
356
- {
357
- "indexed": false,
358
- "internalType": "address",
359
- "name": "collateralToken",
360
- "type": "address"
361
- },
362
- {
363
- "indexed": false,
364
- "internalType": "address",
365
- "name": "indexToken",
366
- "type": "address"
367
- },
368
- {
369
- "indexed": false,
370
- "internalType": "uint256",
371
- "name": "collateralDelta",
372
- "type": "uint256"
373
- },
374
- {
375
- "indexed": false,
376
- "internalType": "uint256",
377
- "name": "sizeDelta",
378
- "type": "uint256"
379
- },
380
- {
381
- "indexed": false,
382
- "internalType": "bool",
383
- "name": "isLong",
384
- "type": "bool"
385
- },
386
- {
387
- "indexed": false,
388
- "internalType": "uint256",
389
- "name": "price",
390
- "type": "uint256"
391
- },
392
- {
393
- "indexed": false,
394
- "internalType": "uint256",
395
- "name": "fee",
396
- "type": "uint256"
397
- }
398
- ],
399
- "name": "IncreasePosition",
400
- "type": "event"
401
- },
402
- {
403
- "anonymous": false,
404
- "inputs": [
405
- {
406
- "indexed": false,
407
- "internalType": "address",
408
- "name": "token",
409
- "type": "address"
410
- },
411
- {
412
- "indexed": false,
413
- "internalType": "uint256",
414
- "name": "amount",
415
- "type": "uint256"
416
- }
417
- ],
418
- "name": "IncreaseReservedAmount",
419
- "type": "event"
420
- },
421
- {
422
- "anonymous": false,
423
- "inputs": [
424
- {
425
- "indexed": false,
426
- "internalType": "address",
427
- "name": "token",
428
- "type": "address"
429
- },
430
- {
431
- "indexed": false,
432
- "internalType": "uint256",
433
- "name": "amount",
434
- "type": "uint256"
435
- }
436
- ],
437
- "name": "IncreaseUsdgAmount",
438
- "type": "event"
439
- },
440
- {
441
- "anonymous": false,
442
- "inputs": [
443
- {
444
- "indexed": false,
445
- "internalType": "bytes32",
446
- "name": "key",
447
- "type": "bytes32"
448
- },
449
- {
450
- "indexed": false,
451
- "internalType": "address",
452
- "name": "account",
453
- "type": "address"
454
- },
455
- {
456
- "indexed": false,
457
- "internalType": "address",
458
- "name": "collateralToken",
459
- "type": "address"
460
- },
461
- {
462
- "indexed": false,
463
- "internalType": "address",
464
- "name": "indexToken",
465
- "type": "address"
466
- },
467
- {
468
- "indexed": false,
469
- "internalType": "bool",
470
- "name": "isLong",
471
- "type": "bool"
472
- },
473
- {
474
- "indexed": false,
475
- "internalType": "uint256",
476
- "name": "size",
477
- "type": "uint256"
478
- },
479
- {
480
- "indexed": false,
481
- "internalType": "uint256",
482
- "name": "collateral",
483
- "type": "uint256"
484
- },
485
- {
486
- "indexed": false,
487
- "internalType": "uint256",
488
- "name": "reserveAmount",
489
- "type": "uint256"
490
- },
491
- {
492
- "indexed": false,
493
- "internalType": "int256",
494
- "name": "realisedPnl",
495
- "type": "int256"
496
- },
497
- {
498
- "indexed": false,
499
- "internalType": "uint256",
500
- "name": "markPrice",
501
- "type": "uint256"
502
- }
503
- ],
504
- "name": "LiquidatePosition",
505
- "type": "event"
506
- },
507
- {
508
- "anonymous": false,
509
- "inputs": [
510
- {
511
- "indexed": false,
512
- "internalType": "address",
513
- "name": "account",
514
- "type": "address"
515
- },
516
- {
517
- "indexed": false,
518
- "internalType": "address",
519
- "name": "token",
520
- "type": "address"
521
- },
522
- {
523
- "indexed": false,
524
- "internalType": "uint256",
525
- "name": "usdgAmount",
526
- "type": "uint256"
527
- },
528
- {
529
- "indexed": false,
530
- "internalType": "uint256",
531
- "name": "tokenAmount",
532
- "type": "uint256"
533
- },
534
- {
535
- "indexed": false,
536
- "internalType": "uint256",
537
- "name": "feeBasisPoints",
538
- "type": "uint256"
539
- }
540
- ],
541
- "name": "SellUSDG",
542
- "type": "event"
543
- },
544
- {
545
- "anonymous": false,
546
- "inputs": [
547
- {
548
- "indexed": false,
549
- "internalType": "address",
550
- "name": "account",
551
- "type": "address"
552
- },
553
- {
554
- "indexed": false,
555
- "internalType": "address",
556
- "name": "tokenIn",
557
- "type": "address"
558
- },
559
- {
560
- "indexed": false,
561
- "internalType": "address",
562
- "name": "tokenOut",
563
- "type": "address"
564
- },
565
- {
566
- "indexed": false,
567
- "internalType": "uint256",
568
- "name": "amountIn",
569
- "type": "uint256"
570
- },
571
- {
572
- "indexed": false,
573
- "internalType": "uint256",
574
- "name": "amountOut",
575
- "type": "uint256"
576
- },
577
- {
578
- "indexed": false,
579
- "internalType": "uint256",
580
- "name": "amountOutAfterFees",
581
- "type": "uint256"
582
- },
583
- {
584
- "indexed": false,
585
- "internalType": "uint256",
586
- "name": "feeBasisPoints",
587
- "type": "uint256"
588
- }
589
- ],
590
- "name": "Swap",
591
- "type": "event"
592
- },
593
- {
594
- "anonymous": false,
595
- "inputs": [
596
- {
597
- "indexed": false,
598
- "internalType": "address",
599
- "name": "token",
600
- "type": "address"
601
- },
602
- {
603
- "indexed": false,
604
- "internalType": "uint256",
605
- "name": "fundingRate",
606
- "type": "uint256"
607
- }
608
- ],
609
- "name": "UpdateFundingRate",
610
- "type": "event"
611
- },
612
- {
613
- "anonymous": false,
614
- "inputs": [
615
- {
616
- "indexed": false,
617
- "internalType": "bytes32",
618
- "name": "key",
619
- "type": "bytes32"
620
- },
621
- {
622
- "indexed": false,
623
- "internalType": "bool",
624
- "name": "hasProfit",
625
- "type": "bool"
626
- },
627
- {
628
- "indexed": false,
629
- "internalType": "uint256",
630
- "name": "delta",
631
- "type": "uint256"
632
- }
633
- ],
634
- "name": "UpdatePnl",
635
- "type": "event"
636
- },
637
- {
638
- "anonymous": false,
639
- "inputs": [
640
- {
641
- "indexed": false,
642
- "internalType": "bytes32",
643
- "name": "key",
644
- "type": "bytes32"
645
- },
646
- {
647
- "indexed": false,
648
- "internalType": "uint256",
649
- "name": "size",
650
- "type": "uint256"
651
- },
652
- {
653
- "indexed": false,
654
- "internalType": "uint256",
655
- "name": "collateral",
656
- "type": "uint256"
657
- },
658
- {
659
- "indexed": false,
660
- "internalType": "uint256",
661
- "name": "averagePrice",
662
- "type": "uint256"
663
- },
664
- {
665
- "indexed": false,
666
- "internalType": "uint256",
667
- "name": "entryFundingRate",
668
- "type": "uint256"
669
- },
670
- {
671
- "indexed": false,
672
- "internalType": "uint256",
673
- "name": "reserveAmount",
674
- "type": "uint256"
675
- },
676
- {
677
- "indexed": false,
678
- "internalType": "int256",
679
- "name": "realisedPnl",
680
- "type": "int256"
681
- }
682
- ],
683
- "name": "UpdatePosition",
684
- "type": "event"
685
- },
686
- {
687
- "inputs": [],
688
- "name": "BASIS_POINTS_DIVISOR",
689
- "outputs": [
690
- {
691
- "internalType": "uint256",
692
- "name": "",
693
- "type": "uint256"
694
- }
695
- ],
696
- "stateMutability": "view",
697
- "type": "function"
698
- },
699
- {
700
- "inputs": [],
701
- "name": "FUNDING_RATE_PRECISION",
702
- "outputs": [
703
- {
704
- "internalType": "uint256",
705
- "name": "",
706
- "type": "uint256"
707
- }
708
- ],
709
- "stateMutability": "view",
710
- "type": "function"
711
- },
712
- {
713
- "inputs": [],
714
- "name": "MAX_FEE_BASIS_POINTS",
715
- "outputs": [
716
- {
717
- "internalType": "uint256",
718
- "name": "",
719
- "type": "uint256"
720
- }
721
- ],
722
- "stateMutability": "view",
723
- "type": "function"
724
- },
725
- {
726
- "inputs": [],
727
- "name": "MAX_FUNDING_RATE_FACTOR",
728
- "outputs": [
729
- {
730
- "internalType": "uint256",
731
- "name": "",
732
- "type": "uint256"
733
- }
734
- ],
735
- "stateMutability": "view",
736
- "type": "function"
737
- },
738
- {
739
- "inputs": [],
740
- "name": "MAX_LIQUIDATION_FEE_USD",
741
- "outputs": [
742
- {
743
- "internalType": "uint256",
744
- "name": "",
745
- "type": "uint256"
746
- }
747
- ],
748
- "stateMutability": "view",
749
- "type": "function"
750
- },
751
- {
752
- "inputs": [],
753
- "name": "MIN_FUNDING_RATE_INTERVAL",
754
- "outputs": [
755
- {
756
- "internalType": "uint256",
757
- "name": "",
758
- "type": "uint256"
759
- }
760
- ],
761
- "stateMutability": "view",
762
- "type": "function"
763
- },
764
- {
765
- "inputs": [],
766
- "name": "MIN_LEVERAGE",
767
- "outputs": [
768
- {
769
- "internalType": "uint256",
770
- "name": "",
771
- "type": "uint256"
772
- }
773
- ],
774
- "stateMutability": "view",
775
- "type": "function"
776
- },
777
- {
778
- "inputs": [],
779
- "name": "PRICE_PRECISION",
780
- "outputs": [
781
- {
782
- "internalType": "uint256",
783
- "name": "",
784
- "type": "uint256"
785
- }
786
- ],
787
- "stateMutability": "view",
788
- "type": "function"
789
- },
790
- {
791
- "inputs": [],
792
- "name": "USDG_DECIMALS",
793
- "outputs": [
794
- {
795
- "internalType": "uint256",
796
- "name": "",
797
- "type": "uint256"
798
- }
799
- ],
800
- "stateMutability": "view",
801
- "type": "function"
802
- },
803
- {
804
- "inputs": [
805
- {
806
- "internalType": "address",
807
- "name": "_router",
808
- "type": "address"
809
- }
810
- ],
811
- "name": "addRouter",
812
- "outputs": [],
813
- "stateMutability": "nonpayable",
814
- "type": "function"
815
- },
816
- {
817
- "inputs": [
818
- {
819
- "internalType": "uint256",
820
- "name": "_amount",
821
- "type": "uint256"
822
- },
823
- {
824
- "internalType": "address",
825
- "name": "_tokenDiv",
826
- "type": "address"
827
- },
828
- {
829
- "internalType": "address",
830
- "name": "_tokenMul",
831
- "type": "address"
832
- }
833
- ],
834
- "name": "adjustForDecimals",
835
- "outputs": [
836
- {
837
- "internalType": "uint256",
838
- "name": "",
839
- "type": "uint256"
840
- }
841
- ],
842
- "stateMutability": "view",
843
- "type": "function"
844
- },
845
- {
846
- "inputs": [
847
- {
848
- "internalType": "uint256",
849
- "name": "",
850
- "type": "uint256"
851
- }
852
- ],
853
- "name": "allWhitelistedTokens",
854
- "outputs": [
855
- {
856
- "internalType": "address",
857
- "name": "",
858
- "type": "address"
859
- }
860
- ],
861
- "stateMutability": "view",
862
- "type": "function"
863
- },
864
- {
865
- "inputs": [],
866
- "name": "allWhitelistedTokensLength",
867
- "outputs": [
868
- {
869
- "internalType": "uint256",
870
- "name": "",
871
- "type": "uint256"
872
- }
873
- ],
874
- "stateMutability": "view",
875
- "type": "function"
876
- },
877
- {
878
- "inputs": [
879
- {
880
- "internalType": "address",
881
- "name": "",
882
- "type": "address"
883
- },
884
- {
885
- "internalType": "address",
886
- "name": "",
887
- "type": "address"
888
- }
889
- ],
890
- "name": "approvedRouters",
891
- "outputs": [
892
- {
893
- "internalType": "bool",
894
- "name": "",
895
- "type": "bool"
896
- }
897
- ],
898
- "stateMutability": "view",
899
- "type": "function"
900
- },
901
- {
902
- "inputs": [
903
- {
904
- "internalType": "address",
905
- "name": "",
906
- "type": "address"
907
- }
908
- ],
909
- "name": "bufferAmounts",
910
- "outputs": [
911
- {
912
- "internalType": "uint256",
913
- "name": "",
914
- "type": "uint256"
915
- }
916
- ],
917
- "stateMutability": "view",
918
- "type": "function"
919
- },
920
- {
921
- "inputs": [
922
- {
923
- "internalType": "address",
924
- "name": "_token",
925
- "type": "address"
926
- },
927
- {
928
- "internalType": "address",
929
- "name": "_receiver",
930
- "type": "address"
931
- }
932
- ],
933
- "name": "buyUSDG",
934
- "outputs": [
935
- {
936
- "internalType": "uint256",
937
- "name": "",
938
- "type": "uint256"
939
- }
940
- ],
941
- "stateMutability": "nonpayable",
942
- "type": "function"
943
- },
944
- {
945
- "inputs": [
946
- {
947
- "internalType": "address",
948
- "name": "_token",
949
- "type": "address"
950
- }
951
- ],
952
- "name": "clearTokenConfig",
953
- "outputs": [],
954
- "stateMutability": "nonpayable",
955
- "type": "function"
956
- },
957
- {
958
- "inputs": [
959
- {
960
- "internalType": "address",
961
- "name": "",
962
- "type": "address"
963
- }
964
- ],
965
- "name": "cumulativeFundingRates",
966
- "outputs": [
967
- {
968
- "internalType": "uint256",
969
- "name": "",
970
- "type": "uint256"
971
- }
972
- ],
973
- "stateMutability": "view",
974
- "type": "function"
975
- },
976
- {
977
- "inputs": [
978
- {
979
- "internalType": "address",
980
- "name": "_account",
981
- "type": "address"
982
- },
983
- {
984
- "internalType": "address",
985
- "name": "_collateralToken",
986
- "type": "address"
987
- },
988
- {
989
- "internalType": "address",
990
- "name": "_indexToken",
991
- "type": "address"
992
- },
993
- {
994
- "internalType": "uint256",
995
- "name": "_collateralDelta",
996
- "type": "uint256"
997
- },
998
- {
999
- "internalType": "uint256",
1000
- "name": "_sizeDelta",
1001
- "type": "uint256"
1002
- },
1003
- {
1004
- "internalType": "bool",
1005
- "name": "_isLong",
1006
- "type": "bool"
1007
- },
1008
- {
1009
- "internalType": "address",
1010
- "name": "_receiver",
1011
- "type": "address"
1012
- }
1013
- ],
1014
- "name": "decreasePosition",
1015
- "outputs": [
1016
- {
1017
- "internalType": "uint256",
1018
- "name": "",
1019
- "type": "uint256"
1020
- }
1021
- ],
1022
- "stateMutability": "nonpayable",
1023
- "type": "function"
1024
- },
1025
- {
1026
- "inputs": [
1027
- {
1028
- "internalType": "address",
1029
- "name": "_token",
1030
- "type": "address"
1031
- }
1032
- ],
1033
- "name": "directPoolDeposit",
1034
- "outputs": [],
1035
- "stateMutability": "nonpayable",
1036
- "type": "function"
1037
- },
1038
- {
1039
- "inputs": [
1040
- {
1041
- "internalType": "address",
1042
- "name": "",
1043
- "type": "address"
1044
- }
1045
- ],
1046
- "name": "feeReserves",
1047
- "outputs": [
1048
- {
1049
- "internalType": "uint256",
1050
- "name": "",
1051
- "type": "uint256"
1052
- }
1053
- ],
1054
- "stateMutability": "view",
1055
- "type": "function"
1056
- },
1057
- {
1058
- "inputs": [],
1059
- "name": "fundingInterval",
1060
- "outputs": [
1061
- {
1062
- "internalType": "uint256",
1063
- "name": "",
1064
- "type": "uint256"
1065
- }
1066
- ],
1067
- "stateMutability": "view",
1068
- "type": "function"
1069
- },
1070
- {
1071
- "inputs": [],
1072
- "name": "fundingRateFactor",
1073
- "outputs": [
1074
- {
1075
- "internalType": "uint256",
1076
- "name": "",
1077
- "type": "uint256"
1078
- }
1079
- ],
1080
- "stateMutability": "view",
1081
- "type": "function"
1082
- },
1083
- {
1084
- "inputs": [
1085
- {
1086
- "internalType": "address",
1087
- "name": "_indexToken",
1088
- "type": "address"
1089
- },
1090
- {
1091
- "internalType": "uint256",
1092
- "name": "_size",
1093
- "type": "uint256"
1094
- },
1095
- {
1096
- "internalType": "uint256",
1097
- "name": "_averagePrice",
1098
- "type": "uint256"
1099
- },
1100
- {
1101
- "internalType": "bool",
1102
- "name": "_isLong",
1103
- "type": "bool"
1104
- },
1105
- {
1106
- "internalType": "uint256",
1107
- "name": "_lastIncreasedTime",
1108
- "type": "uint256"
1109
- }
1110
- ],
1111
- "name": "getDelta",
1112
- "outputs": [
1113
- {
1114
- "internalType": "bool",
1115
- "name": "",
1116
- "type": "bool"
1117
- },
1118
- {
1119
- "internalType": "uint256",
1120
- "name": "",
1121
- "type": "uint256"
1122
- }
1123
- ],
1124
- "stateMutability": "view",
1125
- "type": "function"
1126
- },
1127
- {
1128
- "inputs": [
1129
- {
1130
- "internalType": "address",
1131
- "name": "_token",
1132
- "type": "address"
1133
- },
1134
- {
1135
- "internalType": "uint256",
1136
- "name": "_usdgDelta",
1137
- "type": "uint256"
1138
- },
1139
- {
1140
- "internalType": "uint256",
1141
- "name": "_feeBasisPoints",
1142
- "type": "uint256"
1143
- },
1144
- {
1145
- "internalType": "uint256",
1146
- "name": "_taxBasisPoints",
1147
- "type": "uint256"
1148
- },
1149
- {
1150
- "internalType": "bool",
1151
- "name": "_increment",
1152
- "type": "bool"
1153
- }
1154
- ],
1155
- "name": "getFeeBasisPoints",
1156
- "outputs": [
1157
- {
1158
- "internalType": "uint256",
1159
- "name": "",
1160
- "type": "uint256"
1161
- }
1162
- ],
1163
- "stateMutability": "view",
1164
- "type": "function"
1165
- },
1166
- {
1167
- "inputs": [
1168
- {
1169
- "internalType": "address",
1170
- "name": "_token",
1171
- "type": "address"
1172
- },
1173
- {
1174
- "internalType": "uint256",
1175
- "name": "_size",
1176
- "type": "uint256"
1177
- },
1178
- {
1179
- "internalType": "uint256",
1180
- "name": "_entryFundingRate",
1181
- "type": "uint256"
1182
- }
1183
- ],
1184
- "name": "getFundingFee",
1185
- "outputs": [
1186
- {
1187
- "internalType": "uint256",
1188
- "name": "",
1189
- "type": "uint256"
1190
- }
1191
- ],
1192
- "stateMutability": "view",
1193
- "type": "function"
1194
- },
1195
- {
1196
- "inputs": [
1197
- {
1198
- "internalType": "address",
1199
- "name": "_token",
1200
- "type": "address"
1201
- }
1202
- ],
1203
- "name": "getGlobalShortDelta",
1204
- "outputs": [
1205
- {
1206
- "internalType": "bool",
1207
- "name": "",
1208
- "type": "bool"
1209
- },
1210
- {
1211
- "internalType": "uint256",
1212
- "name": "",
1213
- "type": "uint256"
1214
- }
1215
- ],
1216
- "stateMutability": "view",
1217
- "type": "function"
1218
- },
1219
- {
1220
- "inputs": [
1221
- {
1222
- "internalType": "address",
1223
- "name": "_token",
1224
- "type": "address"
1225
- }
1226
- ],
1227
- "name": "getMaxPrice",
1228
- "outputs": [
1229
- {
1230
- "internalType": "uint256",
1231
- "name": "",
1232
- "type": "uint256"
1233
- }
1234
- ],
1235
- "stateMutability": "view",
1236
- "type": "function"
1237
- },
1238
- {
1239
- "inputs": [
1240
- {
1241
- "internalType": "address",
1242
- "name": "_token",
1243
- "type": "address"
1244
- }
1245
- ],
1246
- "name": "getMinPrice",
1247
- "outputs": [
1248
- {
1249
- "internalType": "uint256",
1250
- "name": "",
1251
- "type": "uint256"
1252
- }
1253
- ],
1254
- "stateMutability": "view",
1255
- "type": "function"
1256
- },
1257
- {
1258
- "inputs": [
1259
- {
1260
- "internalType": "address",
1261
- "name": "_indexToken",
1262
- "type": "address"
1263
- },
1264
- {
1265
- "internalType": "uint256",
1266
- "name": "_size",
1267
- "type": "uint256"
1268
- },
1269
- {
1270
- "internalType": "uint256",
1271
- "name": "_averagePrice",
1272
- "type": "uint256"
1273
- },
1274
- {
1275
- "internalType": "bool",
1276
- "name": "_isLong",
1277
- "type": "bool"
1278
- },
1279
- {
1280
- "internalType": "uint256",
1281
- "name": "_nextPrice",
1282
- "type": "uint256"
1283
- },
1284
- {
1285
- "internalType": "uint256",
1286
- "name": "_sizeDelta",
1287
- "type": "uint256"
1288
- },
1289
- {
1290
- "internalType": "uint256",
1291
- "name": "_lastIncreasedTime",
1292
- "type": "uint256"
1293
- }
1294
- ],
1295
- "name": "getNextAveragePrice",
1296
- "outputs": [
1297
- {
1298
- "internalType": "uint256",
1299
- "name": "",
1300
- "type": "uint256"
1301
- }
1302
- ],
1303
- "stateMutability": "view",
1304
- "type": "function"
1305
- },
1306
- {
1307
- "inputs": [
1308
- {
1309
- "internalType": "address",
1310
- "name": "_token",
1311
- "type": "address"
1312
- }
1313
- ],
1314
- "name": "getNextFundingRate",
1315
- "outputs": [
1316
- {
1317
- "internalType": "uint256",
1318
- "name": "",
1319
- "type": "uint256"
1320
- }
1321
- ],
1322
- "stateMutability": "view",
1323
- "type": "function"
1324
- },
1325
- {
1326
- "inputs": [
1327
- {
1328
- "internalType": "address",
1329
- "name": "_indexToken",
1330
- "type": "address"
1331
- },
1332
- {
1333
- "internalType": "uint256",
1334
- "name": "_nextPrice",
1335
- "type": "uint256"
1336
- },
1337
- {
1338
- "internalType": "uint256",
1339
- "name": "_sizeDelta",
1340
- "type": "uint256"
1341
- }
1342
- ],
1343
- "name": "getNextGlobalShortAveragePrice",
1344
- "outputs": [
1345
- {
1346
- "internalType": "uint256",
1347
- "name": "",
1348
- "type": "uint256"
1349
- }
1350
- ],
1351
- "stateMutability": "view",
1352
- "type": "function"
1353
- },
1354
- {
1355
- "inputs": [
1356
- {
1357
- "internalType": "address",
1358
- "name": "_account",
1359
- "type": "address"
1360
- },
1361
- {
1362
- "internalType": "address",
1363
- "name": "_collateralToken",
1364
- "type": "address"
1365
- },
1366
- {
1367
- "internalType": "address",
1368
- "name": "_indexToken",
1369
- "type": "address"
1370
- },
1371
- {
1372
- "internalType": "bool",
1373
- "name": "_isLong",
1374
- "type": "bool"
1375
- }
1376
- ],
1377
- "name": "getPosition",
1378
- "outputs": [
1379
- {
1380
- "internalType": "uint256",
1381
- "name": "",
1382
- "type": "uint256"
1383
- },
1384
- {
1385
- "internalType": "uint256",
1386
- "name": "",
1387
- "type": "uint256"
1388
- },
1389
- {
1390
- "internalType": "uint256",
1391
- "name": "",
1392
- "type": "uint256"
1393
- },
1394
- {
1395
- "internalType": "uint256",
1396
- "name": "",
1397
- "type": "uint256"
1398
- },
1399
- {
1400
- "internalType": "uint256",
1401
- "name": "",
1402
- "type": "uint256"
1403
- },
1404
- {
1405
- "internalType": "uint256",
1406
- "name": "",
1407
- "type": "uint256"
1408
- },
1409
- {
1410
- "internalType": "bool",
1411
- "name": "",
1412
- "type": "bool"
1413
- },
1414
- {
1415
- "internalType": "uint256",
1416
- "name": "",
1417
- "type": "uint256"
1418
- }
1419
- ],
1420
- "stateMutability": "view",
1421
- "type": "function"
1422
- },
1423
- {
1424
- "inputs": [
1425
- {
1426
- "internalType": "address",
1427
- "name": "_account",
1428
- "type": "address"
1429
- },
1430
- {
1431
- "internalType": "address",
1432
- "name": "_collateralToken",
1433
- "type": "address"
1434
- },
1435
- {
1436
- "internalType": "address",
1437
- "name": "_indexToken",
1438
- "type": "address"
1439
- },
1440
- {
1441
- "internalType": "bool",
1442
- "name": "_isLong",
1443
- "type": "bool"
1444
- }
1445
- ],
1446
- "name": "getPositionDelta",
1447
- "outputs": [
1448
- {
1449
- "internalType": "bool",
1450
- "name": "",
1451
- "type": "bool"
1452
- },
1453
- {
1454
- "internalType": "uint256",
1455
- "name": "",
1456
- "type": "uint256"
1457
- }
1458
- ],
1459
- "stateMutability": "view",
1460
- "type": "function"
1461
- },
1462
- {
1463
- "inputs": [
1464
- {
1465
- "internalType": "uint256",
1466
- "name": "_sizeDelta",
1467
- "type": "uint256"
1468
- }
1469
- ],
1470
- "name": "getPositionFee",
1471
- "outputs": [
1472
- {
1473
- "internalType": "uint256",
1474
- "name": "",
1475
- "type": "uint256"
1476
- }
1477
- ],
1478
- "stateMutability": "view",
1479
- "type": "function"
1480
- },
1481
- {
1482
- "inputs": [
1483
- {
1484
- "internalType": "address",
1485
- "name": "_account",
1486
- "type": "address"
1487
- },
1488
- {
1489
- "internalType": "address",
1490
- "name": "_collateralToken",
1491
- "type": "address"
1492
- },
1493
- {
1494
- "internalType": "address",
1495
- "name": "_indexToken",
1496
- "type": "address"
1497
- },
1498
- {
1499
- "internalType": "bool",
1500
- "name": "_isLong",
1501
- "type": "bool"
1502
- }
1503
- ],
1504
- "name": "getPositionKey",
1505
- "outputs": [
1506
- {
1507
- "internalType": "bytes32",
1508
- "name": "",
1509
- "type": "bytes32"
1510
- }
1511
- ],
1512
- "stateMutability": "pure",
1513
- "type": "function"
1514
- },
1515
- {
1516
- "inputs": [
1517
- {
1518
- "internalType": "address",
1519
- "name": "_account",
1520
- "type": "address"
1521
- },
1522
- {
1523
- "internalType": "address",
1524
- "name": "_collateralToken",
1525
- "type": "address"
1526
- },
1527
- {
1528
- "internalType": "address",
1529
- "name": "_indexToken",
1530
- "type": "address"
1531
- },
1532
- {
1533
- "internalType": "bool",
1534
- "name": "_isLong",
1535
- "type": "bool"
1536
- }
1537
- ],
1538
- "name": "getPositionLeverage",
1539
- "outputs": [
1540
- {
1541
- "internalType": "uint256",
1542
- "name": "",
1543
- "type": "uint256"
1544
- }
1545
- ],
1546
- "stateMutability": "view",
1547
- "type": "function"
1548
- },
1549
- {
1550
- "inputs": [
1551
- {
1552
- "internalType": "address",
1553
- "name": "_token",
1554
- "type": "address"
1555
- },
1556
- {
1557
- "internalType": "uint256",
1558
- "name": "_usdgAmount",
1559
- "type": "uint256"
1560
- }
1561
- ],
1562
- "name": "getRedemptionAmount",
1563
- "outputs": [
1564
- {
1565
- "internalType": "uint256",
1566
- "name": "",
1567
- "type": "uint256"
1568
- }
1569
- ],
1570
- "stateMutability": "view",
1571
- "type": "function"
1572
- },
1573
- {
1574
- "inputs": [
1575
- {
1576
- "internalType": "address",
1577
- "name": "_token",
1578
- "type": "address"
1579
- }
1580
- ],
1581
- "name": "getRedemptionCollateral",
1582
- "outputs": [
1583
- {
1584
- "internalType": "uint256",
1585
- "name": "",
1586
- "type": "uint256"
1587
- }
1588
- ],
1589
- "stateMutability": "view",
1590
- "type": "function"
1591
- },
1592
- {
1593
- "inputs": [
1594
- {
1595
- "internalType": "address",
1596
- "name": "_token",
1597
- "type": "address"
1598
- }
1599
- ],
1600
- "name": "getRedemptionCollateralUsd",
1601
- "outputs": [
1602
- {
1603
- "internalType": "uint256",
1604
- "name": "",
1605
- "type": "uint256"
1606
- }
1607
- ],
1608
- "stateMutability": "view",
1609
- "type": "function"
1610
- },
1611
- {
1612
- "inputs": [
1613
- {
1614
- "internalType": "address",
1615
- "name": "_token",
1616
- "type": "address"
1617
- }
1618
- ],
1619
- "name": "getTargetUsdgAmount",
1620
- "outputs": [
1621
- {
1622
- "internalType": "uint256",
1623
- "name": "",
1624
- "type": "uint256"
1625
- }
1626
- ],
1627
- "stateMutability": "view",
1628
- "type": "function"
1629
- },
1630
- {
1631
- "inputs": [
1632
- {
1633
- "internalType": "address",
1634
- "name": "_token",
1635
- "type": "address"
1636
- }
1637
- ],
1638
- "name": "getUtilisation",
1639
- "outputs": [
1640
- {
1641
- "internalType": "uint256",
1642
- "name": "",
1643
- "type": "uint256"
1644
- }
1645
- ],
1646
- "stateMutability": "view",
1647
- "type": "function"
1648
- },
1649
- {
1650
- "inputs": [
1651
- {
1652
- "internalType": "address",
1653
- "name": "",
1654
- "type": "address"
1655
- }
1656
- ],
1657
- "name": "globalShortAveragePrices",
1658
- "outputs": [
1659
- {
1660
- "internalType": "uint256",
1661
- "name": "",
1662
- "type": "uint256"
1663
- }
1664
- ],
1665
- "stateMutability": "view",
1666
- "type": "function"
1667
- },
1668
- {
1669
- "inputs": [
1670
- {
1671
- "internalType": "address",
1672
- "name": "",
1673
- "type": "address"
1674
- }
1675
- ],
1676
- "name": "globalShortSizes",
1677
- "outputs": [
1678
- {
1679
- "internalType": "uint256",
1680
- "name": "",
1681
- "type": "uint256"
1682
- }
1683
- ],
1684
- "stateMutability": "view",
1685
- "type": "function"
1686
- },
1687
- {
1688
- "inputs": [],
1689
- "name": "gov",
1690
- "outputs": [
1691
- {
1692
- "internalType": "address",
1693
- "name": "",
1694
- "type": "address"
1695
- }
1696
- ],
1697
- "stateMutability": "view",
1698
- "type": "function"
1699
- },
1700
- {
1701
- "inputs": [
1702
- {
1703
- "internalType": "address",
1704
- "name": "",
1705
- "type": "address"
1706
- }
1707
- ],
1708
- "name": "guaranteedUsd",
1709
- "outputs": [
1710
- {
1711
- "internalType": "uint256",
1712
- "name": "",
1713
- "type": "uint256"
1714
- }
1715
- ],
1716
- "stateMutability": "view",
1717
- "type": "function"
1718
- },
1719
- {
1720
- "inputs": [],
1721
- "name": "hasDynamicFees",
1722
- "outputs": [
1723
- {
1724
- "internalType": "bool",
1725
- "name": "",
1726
- "type": "bool"
1727
- }
1728
- ],
1729
- "stateMutability": "view",
1730
- "type": "function"
1731
- },
1732
- {
1733
- "inputs": [],
1734
- "name": "inManagerMode",
1735
- "outputs": [
1736
- {
1737
- "internalType": "bool",
1738
- "name": "",
1739
- "type": "bool"
1740
- }
1741
- ],
1742
- "stateMutability": "view",
1743
- "type": "function"
1744
- },
1745
- {
1746
- "inputs": [],
1747
- "name": "inPrivateLiquidationMode",
1748
- "outputs": [
1749
- {
1750
- "internalType": "bool",
1751
- "name": "",
1752
- "type": "bool"
1753
- }
1754
- ],
1755
- "stateMutability": "view",
1756
- "type": "function"
1757
- },
1758
- {
1759
- "inputs": [],
1760
- "name": "includeAmmPrice",
1761
- "outputs": [
1762
- {
1763
- "internalType": "bool",
1764
- "name": "",
1765
- "type": "bool"
1766
- }
1767
- ],
1768
- "stateMutability": "view",
1769
- "type": "function"
1770
- },
1771
- {
1772
- "inputs": [
1773
- {
1774
- "internalType": "address",
1775
- "name": "_account",
1776
- "type": "address"
1777
- },
1778
- {
1779
- "internalType": "address",
1780
- "name": "_collateralToken",
1781
- "type": "address"
1782
- },
1783
- {
1784
- "internalType": "address",
1785
- "name": "_indexToken",
1786
- "type": "address"
1787
- },
1788
- {
1789
- "internalType": "uint256",
1790
- "name": "_sizeDelta",
1791
- "type": "uint256"
1792
- },
1793
- {
1794
- "internalType": "bool",
1795
- "name": "_isLong",
1796
- "type": "bool"
1797
- }
1798
- ],
1799
- "name": "increasePosition",
1800
- "outputs": [],
1801
- "stateMutability": "nonpayable",
1802
- "type": "function"
1803
- },
1804
- {
1805
- "inputs": [
1806
- {
1807
- "internalType": "address",
1808
- "name": "_router",
1809
- "type": "address"
1810
- },
1811
- {
1812
- "internalType": "address",
1813
- "name": "_usdg",
1814
- "type": "address"
1815
- },
1816
- {
1817
- "internalType": "address",
1818
- "name": "_priceFeed",
1819
- "type": "address"
1820
- },
1821
- {
1822
- "internalType": "uint256",
1823
- "name": "_liquidationFeeUsd",
1824
- "type": "uint256"
1825
- },
1826
- {
1827
- "internalType": "uint256",
1828
- "name": "_fundingRateFactor",
1829
- "type": "uint256"
1830
- },
1831
- {
1832
- "internalType": "uint256",
1833
- "name": "_stableFundingRateFactor",
1834
- "type": "uint256"
1835
- }
1836
- ],
1837
- "name": "initialize",
1838
- "outputs": [],
1839
- "stateMutability": "nonpayable",
1840
- "type": "function"
1841
- },
1842
- {
1843
- "inputs": [],
1844
- "name": "isInitialized",
1845
- "outputs": [
1846
- {
1847
- "internalType": "bool",
1848
- "name": "",
1849
- "type": "bool"
1850
- }
1851
- ],
1852
- "stateMutability": "view",
1853
- "type": "function"
1854
- },
1855
- {
1856
- "inputs": [],
1857
- "name": "isLeverageEnabled",
1858
- "outputs": [
1859
- {
1860
- "internalType": "bool",
1861
- "name": "",
1862
- "type": "bool"
1863
- }
1864
- ],
1865
- "stateMutability": "view",
1866
- "type": "function"
1867
- },
1868
- {
1869
- "inputs": [
1870
- {
1871
- "internalType": "address",
1872
- "name": "",
1873
- "type": "address"
1874
- }
1875
- ],
1876
- "name": "isLiquidator",
1877
- "outputs": [
1878
- {
1879
- "internalType": "bool",
1880
- "name": "",
1881
- "type": "bool"
1882
- }
1883
- ],
1884
- "stateMutability": "view",
1885
- "type": "function"
1886
- },
1887
- {
1888
- "inputs": [
1889
- {
1890
- "internalType": "address",
1891
- "name": "",
1892
- "type": "address"
1893
- }
1894
- ],
1895
- "name": "isManager",
1896
- "outputs": [
1897
- {
1898
- "internalType": "bool",
1899
- "name": "",
1900
- "type": "bool"
1901
- }
1902
- ],
1903
- "stateMutability": "view",
1904
- "type": "function"
1905
- },
1906
- {
1907
- "inputs": [],
1908
- "name": "isSwapEnabled",
1909
- "outputs": [
1910
- {
1911
- "internalType": "bool",
1912
- "name": "",
1913
- "type": "bool"
1914
- }
1915
- ],
1916
- "stateMutability": "view",
1917
- "type": "function"
1918
- },
1919
- {
1920
- "inputs": [
1921
- {
1922
- "internalType": "address",
1923
- "name": "",
1924
- "type": "address"
1925
- }
1926
- ],
1927
- "name": "lastFundingTimes",
1928
- "outputs": [
1929
- {
1930
- "internalType": "uint256",
1931
- "name": "",
1932
- "type": "uint256"
1933
- }
1934
- ],
1935
- "stateMutability": "view",
1936
- "type": "function"
1937
- },
1938
- {
1939
- "inputs": [
1940
- {
1941
- "internalType": "address",
1942
- "name": "_account",
1943
- "type": "address"
1944
- },
1945
- {
1946
- "internalType": "address",
1947
- "name": "_collateralToken",
1948
- "type": "address"
1949
- },
1950
- {
1951
- "internalType": "address",
1952
- "name": "_indexToken",
1953
- "type": "address"
1954
- },
1955
- {
1956
- "internalType": "bool",
1957
- "name": "_isLong",
1958
- "type": "bool"
1959
- },
1960
- {
1961
- "internalType": "address",
1962
- "name": "_feeReceiver",
1963
- "type": "address"
1964
- }
1965
- ],
1966
- "name": "liquidatePosition",
1967
- "outputs": [],
1968
- "stateMutability": "nonpayable",
1969
- "type": "function"
1970
- },
1971
- {
1972
- "inputs": [],
1973
- "name": "liquidationFeeUsd",
1974
- "outputs": [
1975
- {
1976
- "internalType": "uint256",
1977
- "name": "",
1978
- "type": "uint256"
1979
- }
1980
- ],
1981
- "stateMutability": "view",
1982
- "type": "function"
1983
- },
1984
- {
1985
- "inputs": [],
1986
- "name": "marginFeeBasisPoints",
1987
- "outputs": [
1988
- {
1989
- "internalType": "uint256",
1990
- "name": "",
1991
- "type": "uint256"
1992
- }
1993
- ],
1994
- "stateMutability": "view",
1995
- "type": "function"
1996
- },
1997
- {
1998
- "inputs": [],
1999
- "name": "maxGasPrice",
2000
- "outputs": [
2001
- {
2002
- "internalType": "uint256",
2003
- "name": "",
2004
- "type": "uint256"
2005
- }
2006
- ],
2007
- "stateMutability": "view",
2008
- "type": "function"
2009
- },
2010
- {
2011
- "inputs": [],
2012
- "name": "maxLeverage",
2013
- "outputs": [
2014
- {
2015
- "internalType": "uint256",
2016
- "name": "",
2017
- "type": "uint256"
2018
- }
2019
- ],
2020
- "stateMutability": "view",
2021
- "type": "function"
2022
- },
2023
- {
2024
- "inputs": [
2025
- {
2026
- "internalType": "address",
2027
- "name": "",
2028
- "type": "address"
2029
- }
2030
- ],
2031
- "name": "maxUsdgAmounts",
2032
- "outputs": [
2033
- {
2034
- "internalType": "uint256",
2035
- "name": "",
2036
- "type": "uint256"
2037
- }
2038
- ],
2039
- "stateMutability": "view",
2040
- "type": "function"
2041
- },
2042
- {
2043
- "inputs": [
2044
- {
2045
- "internalType": "address",
2046
- "name": "",
2047
- "type": "address"
2048
- }
2049
- ],
2050
- "name": "minProfitBasisPoints",
2051
- "outputs": [
2052
- {
2053
- "internalType": "uint256",
2054
- "name": "",
2055
- "type": "uint256"
2056
- }
2057
- ],
2058
- "stateMutability": "view",
2059
- "type": "function"
2060
- },
2061
- {
2062
- "inputs": [],
2063
- "name": "minProfitTime",
2064
- "outputs": [
2065
- {
2066
- "internalType": "uint256",
2067
- "name": "",
2068
- "type": "uint256"
2069
- }
2070
- ],
2071
- "stateMutability": "view",
2072
- "type": "function"
2073
- },
2074
- {
2075
- "inputs": [],
2076
- "name": "mintBurnFeeBasisPoints",
2077
- "outputs": [
2078
- {
2079
- "internalType": "uint256",
2080
- "name": "",
2081
- "type": "uint256"
2082
- }
2083
- ],
2084
- "stateMutability": "view",
2085
- "type": "function"
2086
- },
2087
- {
2088
- "inputs": [
2089
- {
2090
- "internalType": "address",
2091
- "name": "",
2092
- "type": "address"
2093
- }
2094
- ],
2095
- "name": "poolAmounts",
2096
- "outputs": [
2097
- {
2098
- "internalType": "uint256",
2099
- "name": "",
2100
- "type": "uint256"
2101
- }
2102
- ],
2103
- "stateMutability": "view",
2104
- "type": "function"
2105
- },
2106
- {
2107
- "inputs": [
2108
- {
2109
- "internalType": "bytes32",
2110
- "name": "",
2111
- "type": "bytes32"
2112
- }
2113
- ],
2114
- "name": "positions",
2115
- "outputs": [
2116
- {
2117
- "internalType": "uint256",
2118
- "name": "size",
2119
- "type": "uint256"
2120
- },
2121
- {
2122
- "internalType": "uint256",
2123
- "name": "collateral",
2124
- "type": "uint256"
2125
- },
2126
- {
2127
- "internalType": "uint256",
2128
- "name": "averagePrice",
2129
- "type": "uint256"
2130
- },
2131
- {
2132
- "internalType": "uint256",
2133
- "name": "entryFundingRate",
2134
- "type": "uint256"
2135
- },
2136
- {
2137
- "internalType": "uint256",
2138
- "name": "reserveAmount",
2139
- "type": "uint256"
2140
- },
2141
- {
2142
- "internalType": "int256",
2143
- "name": "realisedPnl",
2144
- "type": "int256"
2145
- },
2146
- {
2147
- "internalType": "uint256",
2148
- "name": "lastIncreasedTime",
2149
- "type": "uint256"
2150
- }
2151
- ],
2152
- "stateMutability": "view",
2153
- "type": "function"
2154
- },
2155
- {
2156
- "inputs": [],
2157
- "name": "priceFeed",
2158
- "outputs": [
2159
- {
2160
- "internalType": "address",
2161
- "name": "",
2162
- "type": "address"
2163
- }
2164
- ],
2165
- "stateMutability": "view",
2166
- "type": "function"
2167
- },
2168
- {
2169
- "inputs": [
2170
- {
2171
- "internalType": "address",
2172
- "name": "_router",
2173
- "type": "address"
2174
- }
2175
- ],
2176
- "name": "removeRouter",
2177
- "outputs": [],
2178
- "stateMutability": "nonpayable",
2179
- "type": "function"
2180
- },
2181
- {
2182
- "inputs": [
2183
- {
2184
- "internalType": "address",
2185
- "name": "",
2186
- "type": "address"
2187
- }
2188
- ],
2189
- "name": "reservedAmounts",
2190
- "outputs": [
2191
- {
2192
- "internalType": "uint256",
2193
- "name": "",
2194
- "type": "uint256"
2195
- }
2196
- ],
2197
- "stateMutability": "view",
2198
- "type": "function"
2199
- },
2200
- {
2201
- "inputs": [],
2202
- "name": "router",
2203
- "outputs": [
2204
- {
2205
- "internalType": "address",
2206
- "name": "",
2207
- "type": "address"
2208
- }
2209
- ],
2210
- "stateMutability": "view",
2211
- "type": "function"
2212
- },
2213
- {
2214
- "inputs": [
2215
- {
2216
- "internalType": "address",
2217
- "name": "_token",
2218
- "type": "address"
2219
- },
2220
- {
2221
- "internalType": "address",
2222
- "name": "_receiver",
2223
- "type": "address"
2224
- }
2225
- ],
2226
- "name": "sellUSDG",
2227
- "outputs": [
2228
- {
2229
- "internalType": "uint256",
2230
- "name": "",
2231
- "type": "uint256"
2232
- }
2233
- ],
2234
- "stateMutability": "nonpayable",
2235
- "type": "function"
2236
- },
2237
- {
2238
- "inputs": [
2239
- {
2240
- "internalType": "address",
2241
- "name": "_token",
2242
- "type": "address"
2243
- },
2244
- {
2245
- "internalType": "uint256",
2246
- "name": "_amount",
2247
- "type": "uint256"
2248
- }
2249
- ],
2250
- "name": "setBufferAmount",
2251
- "outputs": [],
2252
- "stateMutability": "nonpayable",
2253
- "type": "function"
2254
- },
2255
- {
2256
- "inputs": [
2257
- {
2258
- "internalType": "uint256",
2259
- "name": "_taxBasisPoints",
2260
- "type": "uint256"
2261
- },
2262
- {
2263
- "internalType": "uint256",
2264
- "name": "_stableTaxBasisPoints",
2265
- "type": "uint256"
2266
- },
2267
- {
2268
- "internalType": "uint256",
2269
- "name": "_mintBurnFeeBasisPoints",
2270
- "type": "uint256"
2271
- },
2272
- {
2273
- "internalType": "uint256",
2274
- "name": "_swapFeeBasisPoints",
2275
- "type": "uint256"
2276
- },
2277
- {
2278
- "internalType": "uint256",
2279
- "name": "_stableSwapFeeBasisPoints",
2280
- "type": "uint256"
2281
- },
2282
- {
2283
- "internalType": "uint256",
2284
- "name": "_marginFeeBasisPoints",
2285
- "type": "uint256"
2286
- },
2287
- {
2288
- "internalType": "uint256",
2289
- "name": "_liquidationFeeUsd",
2290
- "type": "uint256"
2291
- },
2292
- {
2293
- "internalType": "uint256",
2294
- "name": "_minProfitTime",
2295
- "type": "uint256"
2296
- },
2297
- {
2298
- "internalType": "bool",
2299
- "name": "_hasDynamicFees",
2300
- "type": "bool"
2301
- }
2302
- ],
2303
- "name": "setFees",
2304
- "outputs": [],
2305
- "stateMutability": "nonpayable",
2306
- "type": "function"
2307
- },
2308
- {
2309
- "inputs": [
2310
- {
2311
- "internalType": "uint256",
2312
- "name": "_fundingInterval",
2313
- "type": "uint256"
2314
- },
2315
- {
2316
- "internalType": "uint256",
2317
- "name": "_fundingRateFactor",
2318
- "type": "uint256"
2319
- },
2320
- {
2321
- "internalType": "uint256",
2322
- "name": "_stableFundingRateFactor",
2323
- "type": "uint256"
2324
- }
2325
- ],
2326
- "name": "setFundingRate",
2327
- "outputs": [],
2328
- "stateMutability": "nonpayable",
2329
- "type": "function"
2330
- },
2331
- {
2332
- "inputs": [
2333
- {
2334
- "internalType": "address",
2335
- "name": "_gov",
2336
- "type": "address"
2337
- }
2338
- ],
2339
- "name": "setGov",
2340
- "outputs": [],
2341
- "stateMutability": "nonpayable",
2342
- "type": "function"
2343
- },
2344
- {
2345
- "inputs": [
2346
- {
2347
- "internalType": "bool",
2348
- "name": "_inManagerMode",
2349
- "type": "bool"
2350
- }
2351
- ],
2352
- "name": "setInManagerMode",
2353
- "outputs": [],
2354
- "stateMutability": "nonpayable",
2355
- "type": "function"
2356
- },
2357
- {
2358
- "inputs": [
2359
- {
2360
- "internalType": "bool",
2361
- "name": "_inPrivateLiquidationMode",
2362
- "type": "bool"
2363
- }
2364
- ],
2365
- "name": "setInPrivateLiquidationMode",
2366
- "outputs": [],
2367
- "stateMutability": "nonpayable",
2368
- "type": "function"
2369
- },
2370
- {
2371
- "inputs": [
2372
- {
2373
- "internalType": "bool",
2374
- "name": "_isLeverageEnabled",
2375
- "type": "bool"
2376
- }
2377
- ],
2378
- "name": "setIsLeverageEnabled",
2379
- "outputs": [],
2380
- "stateMutability": "nonpayable",
2381
- "type": "function"
2382
- },
2383
- {
2384
- "inputs": [
2385
- {
2386
- "internalType": "bool",
2387
- "name": "_isSwapEnabled",
2388
- "type": "bool"
2389
- }
2390
- ],
2391
- "name": "setIsSwapEnabled",
2392
- "outputs": [],
2393
- "stateMutability": "nonpayable",
2394
- "type": "function"
2395
- },
2396
- {
2397
- "inputs": [
2398
- {
2399
- "internalType": "address",
2400
- "name": "_liquidator",
2401
- "type": "address"
2402
- },
2403
- {
2404
- "internalType": "bool",
2405
- "name": "_isActive",
2406
- "type": "bool"
2407
- }
2408
- ],
2409
- "name": "setLiquidator",
2410
- "outputs": [],
2411
- "stateMutability": "nonpayable",
2412
- "type": "function"
2413
- },
2414
- {
2415
- "inputs": [
2416
- {
2417
- "internalType": "address",
2418
- "name": "_manager",
2419
- "type": "address"
2420
- },
2421
- {
2422
- "internalType": "bool",
2423
- "name": "_isManager",
2424
- "type": "bool"
2425
- }
2426
- ],
2427
- "name": "setManager",
2428
- "outputs": [],
2429
- "stateMutability": "nonpayable",
2430
- "type": "function"
2431
- },
2432
- {
2433
- "inputs": [
2434
- {
2435
- "internalType": "uint256",
2436
- "name": "_maxGasPrice",
2437
- "type": "uint256"
2438
- }
2439
- ],
2440
- "name": "setMaxGasPrice",
2441
- "outputs": [],
2442
- "stateMutability": "nonpayable",
2443
- "type": "function"
2444
- },
2445
- {
2446
- "inputs": [
2447
- {
2448
- "internalType": "uint256",
2449
- "name": "_maxLeverage",
2450
- "type": "uint256"
2451
- }
2452
- ],
2453
- "name": "setMaxLeverage",
2454
- "outputs": [],
2455
- "stateMutability": "nonpayable",
2456
- "type": "function"
2457
- },
2458
- {
2459
- "inputs": [
2460
- {
2461
- "internalType": "address",
2462
- "name": "_priceFeed",
2463
- "type": "address"
2464
- }
2465
- ],
2466
- "name": "setPriceFeed",
2467
- "outputs": [],
2468
- "stateMutability": "nonpayable",
2469
- "type": "function"
2470
- },
2471
- {
2472
- "inputs": [
2473
- {
2474
- "internalType": "address",
2475
- "name": "_token",
2476
- "type": "address"
2477
- },
2478
- {
2479
- "internalType": "uint256",
2480
- "name": "_tokenDecimals",
2481
- "type": "uint256"
2482
- },
2483
- {
2484
- "internalType": "uint256",
2485
- "name": "_tokenWeight",
2486
- "type": "uint256"
2487
- },
2488
- {
2489
- "internalType": "uint256",
2490
- "name": "_minProfitBps",
2491
- "type": "uint256"
2492
- },
2493
- {
2494
- "internalType": "uint256",
2495
- "name": "_maxUsdgAmount",
2496
- "type": "uint256"
2497
- },
2498
- {
2499
- "internalType": "bool",
2500
- "name": "_isStable",
2501
- "type": "bool"
2502
- },
2503
- {
2504
- "internalType": "bool",
2505
- "name": "_isShortable",
2506
- "type": "bool"
2507
- }
2508
- ],
2509
- "name": "setTokenConfig",
2510
- "outputs": [],
2511
- "stateMutability": "nonpayable",
2512
- "type": "function"
2513
- },
2514
- {
2515
- "inputs": [
2516
- {
2517
- "internalType": "address",
2518
- "name": "_token",
2519
- "type": "address"
2520
- },
2521
- {
2522
- "internalType": "uint256",
2523
- "name": "_amount",
2524
- "type": "uint256"
2525
- }
2526
- ],
2527
- "name": "setUsdgAmount",
2528
- "outputs": [],
2529
- "stateMutability": "nonpayable",
2530
- "type": "function"
2531
- },
2532
- {
2533
- "inputs": [
2534
- {
2535
- "internalType": "address",
2536
- "name": "",
2537
- "type": "address"
2538
- }
2539
- ],
2540
- "name": "shortableTokens",
2541
- "outputs": [
2542
- {
2543
- "internalType": "bool",
2544
- "name": "",
2545
- "type": "bool"
2546
- }
2547
- ],
2548
- "stateMutability": "view",
2549
- "type": "function"
2550
- },
2551
- {
2552
- "inputs": [],
2553
- "name": "stableFundingRateFactor",
2554
- "outputs": [
2555
- {
2556
- "internalType": "uint256",
2557
- "name": "",
2558
- "type": "uint256"
2559
- }
2560
- ],
2561
- "stateMutability": "view",
2562
- "type": "function"
2563
- },
2564
- {
2565
- "inputs": [],
2566
- "name": "stableSwapFeeBasisPoints",
2567
- "outputs": [
2568
- {
2569
- "internalType": "uint256",
2570
- "name": "",
2571
- "type": "uint256"
2572
- }
2573
- ],
2574
- "stateMutability": "view",
2575
- "type": "function"
2576
- },
2577
- {
2578
- "inputs": [],
2579
- "name": "stableTaxBasisPoints",
2580
- "outputs": [
2581
- {
2582
- "internalType": "uint256",
2583
- "name": "",
2584
- "type": "uint256"
2585
- }
2586
- ],
2587
- "stateMutability": "view",
2588
- "type": "function"
2589
- },
2590
- {
2591
- "inputs": [
2592
- {
2593
- "internalType": "address",
2594
- "name": "",
2595
- "type": "address"
2596
- }
2597
- ],
2598
- "name": "stableTokens",
2599
- "outputs": [
2600
- {
2601
- "internalType": "bool",
2602
- "name": "",
2603
- "type": "bool"
2604
- }
2605
- ],
2606
- "stateMutability": "view",
2607
- "type": "function"
2608
- },
2609
- {
2610
- "inputs": [
2611
- {
2612
- "internalType": "address",
2613
- "name": "_tokenIn",
2614
- "type": "address"
2615
- },
2616
- {
2617
- "internalType": "address",
2618
- "name": "_tokenOut",
2619
- "type": "address"
2620
- },
2621
- {
2622
- "internalType": "address",
2623
- "name": "_receiver",
2624
- "type": "address"
2625
- }
2626
- ],
2627
- "name": "swap",
2628
- "outputs": [
2629
- {
2630
- "internalType": "uint256",
2631
- "name": "",
2632
- "type": "uint256"
2633
- }
2634
- ],
2635
- "stateMutability": "nonpayable",
2636
- "type": "function"
2637
- },
2638
- {
2639
- "inputs": [],
2640
- "name": "swapFeeBasisPoints",
2641
- "outputs": [
2642
- {
2643
- "internalType": "uint256",
2644
- "name": "",
2645
- "type": "uint256"
2646
- }
2647
- ],
2648
- "stateMutability": "view",
2649
- "type": "function"
2650
- },
2651
- {
2652
- "inputs": [],
2653
- "name": "taxBasisPoints",
2654
- "outputs": [
2655
- {
2656
- "internalType": "uint256",
2657
- "name": "",
2658
- "type": "uint256"
2659
- }
2660
- ],
2661
- "stateMutability": "view",
2662
- "type": "function"
2663
- },
2664
- {
2665
- "inputs": [
2666
- {
2667
- "internalType": "address",
2668
- "name": "",
2669
- "type": "address"
2670
- }
2671
- ],
2672
- "name": "tokenBalances",
2673
- "outputs": [
2674
- {
2675
- "internalType": "uint256",
2676
- "name": "",
2677
- "type": "uint256"
2678
- }
2679
- ],
2680
- "stateMutability": "view",
2681
- "type": "function"
2682
- },
2683
- {
2684
- "inputs": [
2685
- {
2686
- "internalType": "address",
2687
- "name": "",
2688
- "type": "address"
2689
- }
2690
- ],
2691
- "name": "tokenDecimals",
2692
- "outputs": [
2693
- {
2694
- "internalType": "uint256",
2695
- "name": "",
2696
- "type": "uint256"
2697
- }
2698
- ],
2699
- "stateMutability": "view",
2700
- "type": "function"
2701
- },
2702
- {
2703
- "inputs": [
2704
- {
2705
- "internalType": "address",
2706
- "name": "_token",
2707
- "type": "address"
2708
- },
2709
- {
2710
- "internalType": "uint256",
2711
- "name": "_tokenAmount",
2712
- "type": "uint256"
2713
- }
2714
- ],
2715
- "name": "tokenToUsdMin",
2716
- "outputs": [
2717
- {
2718
- "internalType": "uint256",
2719
- "name": "",
2720
- "type": "uint256"
2721
- }
2722
- ],
2723
- "stateMutability": "view",
2724
- "type": "function"
2725
- },
2726
- {
2727
- "inputs": [
2728
- {
2729
- "internalType": "address",
2730
- "name": "",
2731
- "type": "address"
2732
- }
2733
- ],
2734
- "name": "tokenWeights",
2735
- "outputs": [
2736
- {
2737
- "internalType": "uint256",
2738
- "name": "",
2739
- "type": "uint256"
2740
- }
2741
- ],
2742
- "stateMutability": "view",
2743
- "type": "function"
2744
- },
2745
- {
2746
- "inputs": [],
2747
- "name": "totalTokenWeights",
2748
- "outputs": [
2749
- {
2750
- "internalType": "uint256",
2751
- "name": "",
2752
- "type": "uint256"
2753
- }
2754
- ],
2755
- "stateMutability": "view",
2756
- "type": "function"
2757
- },
2758
- {
2759
- "inputs": [
2760
- {
2761
- "internalType": "address",
2762
- "name": "_token",
2763
- "type": "address"
2764
- }
2765
- ],
2766
- "name": "updateCumulativeFundingRate",
2767
- "outputs": [],
2768
- "stateMutability": "nonpayable",
2769
- "type": "function"
2770
- },
2771
- {
2772
- "inputs": [
2773
- {
2774
- "internalType": "address",
2775
- "name": "_newVault",
2776
- "type": "address"
2777
- },
2778
- {
2779
- "internalType": "address",
2780
- "name": "_token",
2781
- "type": "address"
2782
- },
2783
- {
2784
- "internalType": "uint256",
2785
- "name": "_amount",
2786
- "type": "uint256"
2787
- }
2788
- ],
2789
- "name": "upgradeVault",
2790
- "outputs": [],
2791
- "stateMutability": "nonpayable",
2792
- "type": "function"
2793
- },
2794
- {
2795
- "inputs": [
2796
- {
2797
- "internalType": "address",
2798
- "name": "_token",
2799
- "type": "address"
2800
- },
2801
- {
2802
- "internalType": "uint256",
2803
- "name": "_usdAmount",
2804
- "type": "uint256"
2805
- },
2806
- {
2807
- "internalType": "uint256",
2808
- "name": "_price",
2809
- "type": "uint256"
2810
- }
2811
- ],
2812
- "name": "usdToToken",
2813
- "outputs": [
2814
- {
2815
- "internalType": "uint256",
2816
- "name": "",
2817
- "type": "uint256"
2818
- }
2819
- ],
2820
- "stateMutability": "view",
2821
- "type": "function"
2822
- },
2823
- {
2824
- "inputs": [
2825
- {
2826
- "internalType": "address",
2827
- "name": "_token",
2828
- "type": "address"
2829
- },
2830
- {
2831
- "internalType": "uint256",
2832
- "name": "_usdAmount",
2833
- "type": "uint256"
2834
- }
2835
- ],
2836
- "name": "usdToTokenMax",
2837
- "outputs": [
2838
- {
2839
- "internalType": "uint256",
2840
- "name": "",
2841
- "type": "uint256"
2842
- }
2843
- ],
2844
- "stateMutability": "view",
2845
- "type": "function"
2846
- },
2847
- {
2848
- "inputs": [
2849
- {
2850
- "internalType": "address",
2851
- "name": "_token",
2852
- "type": "address"
2853
- },
2854
- {
2855
- "internalType": "uint256",
2856
- "name": "_usdAmount",
2857
- "type": "uint256"
2858
- }
2859
- ],
2860
- "name": "usdToTokenMin",
2861
- "outputs": [
2862
- {
2863
- "internalType": "uint256",
2864
- "name": "",
2865
- "type": "uint256"
2866
- }
2867
- ],
2868
- "stateMutability": "view",
2869
- "type": "function"
2870
- },
2871
- {
2872
- "inputs": [],
2873
- "name": "usdg",
2874
- "outputs": [
2875
- {
2876
- "internalType": "address",
2877
- "name": "",
2878
- "type": "address"
2879
- }
2880
- ],
2881
- "stateMutability": "view",
2882
- "type": "function"
2883
- },
2884
- {
2885
- "inputs": [
2886
- {
2887
- "internalType": "address",
2888
- "name": "",
2889
- "type": "address"
2890
- }
2891
- ],
2892
- "name": "usdgAmounts",
2893
- "outputs": [
2894
- {
2895
- "internalType": "uint256",
2896
- "name": "",
2897
- "type": "uint256"
2898
- }
2899
- ],
2900
- "stateMutability": "view",
2901
- "type": "function"
2902
- },
2903
- {
2904
- "inputs": [],
2905
- "name": "useSwapPricing",
2906
- "outputs": [
2907
- {
2908
- "internalType": "bool",
2909
- "name": "",
2910
- "type": "bool"
2911
- }
2912
- ],
2913
- "stateMutability": "view",
2914
- "type": "function"
2915
- },
2916
- {
2917
- "inputs": [
2918
- {
2919
- "internalType": "address",
2920
- "name": "_account",
2921
- "type": "address"
2922
- },
2923
- {
2924
- "internalType": "address",
2925
- "name": "_collateralToken",
2926
- "type": "address"
2927
- },
2928
- {
2929
- "internalType": "address",
2930
- "name": "_indexToken",
2931
- "type": "address"
2932
- },
2933
- {
2934
- "internalType": "bool",
2935
- "name": "_isLong",
2936
- "type": "bool"
2937
- },
2938
- {
2939
- "internalType": "bool",
2940
- "name": "_raise",
2941
- "type": "bool"
2942
- }
2943
- ],
2944
- "name": "validateLiquidation",
2945
- "outputs": [
2946
- {
2947
- "internalType": "uint256",
2948
- "name": "",
2949
- "type": "uint256"
2950
- },
2951
- {
2952
- "internalType": "uint256",
2953
- "name": "",
2954
- "type": "uint256"
2955
- }
2956
- ],
2957
- "stateMutability": "view",
2958
- "type": "function"
2959
- },
2960
- {
2961
- "inputs": [],
2962
- "name": "whitelistedTokenCount",
2963
- "outputs": [
2964
- {
2965
- "internalType": "uint256",
2966
- "name": "",
2967
- "type": "uint256"
2968
- }
2969
- ],
2970
- "stateMutability": "view",
2971
- "type": "function"
2972
- },
2973
- {
2974
- "inputs": [
2975
- {
2976
- "internalType": "address",
2977
- "name": "",
2978
- "type": "address"
2979
- }
2980
- ],
2981
- "name": "whitelistedTokens",
2982
- "outputs": [
2983
- {
2984
- "internalType": "bool",
2985
- "name": "",
2986
- "type": "bool"
2987
- }
2988
- ],
2989
- "stateMutability": "view",
2990
- "type": "function"
2991
- },
2992
- {
2993
- "inputs": [
2994
- {
2995
- "internalType": "address",
2996
- "name": "_token",
2997
- "type": "address"
2998
- },
2999
- {
3000
- "internalType": "address",
3001
- "name": "_receiver",
3002
- "type": "address"
3003
- }
3004
- ],
3005
- "name": "withdrawFees",
3006
- "outputs": [
3007
- {
3008
- "internalType": "uint256",
3009
- "name": "",
3010
- "type": "uint256"
3011
- }
3012
- ],
3013
- "stateMutability": "nonpayable",
3014
- "type": "function"
3015
- }
3016
- ],
3017
- "linkReferences": {},
3018
- "deployedLinkReferences": {}
3019
- }