@gmx-io/sdk 0.0.4 → 0.0.6

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,1598 +0,0 @@
1
- {
2
- "address": "0x69C527fC77291722b52649E45c838e41be8Bf5d5",
3
- "abi": [
4
- {
5
- "inputs": [
6
- {
7
- "internalType": "contract Router",
8
- "name": "_router",
9
- "type": "address"
10
- },
11
- {
12
- "internalType": "contract RoleStore",
13
- "name": "_roleStore",
14
- "type": "address"
15
- },
16
- {
17
- "internalType": "contract DataStore",
18
- "name": "_dataStore",
19
- "type": "address"
20
- },
21
- {
22
- "internalType": "contract EventEmitter",
23
- "name": "_eventEmitter",
24
- "type": "address"
25
- },
26
- {
27
- "internalType": "contract IDepositHandler",
28
- "name": "_depositHandler",
29
- "type": "address"
30
- },
31
- {
32
- "internalType": "contract IWithdrawalHandler",
33
- "name": "_withdrawalHandler",
34
- "type": "address"
35
- },
36
- {
37
- "internalType": "contract IShiftHandler",
38
- "name": "_shiftHandler",
39
- "type": "address"
40
- },
41
- {
42
- "internalType": "contract IOrderHandler",
43
- "name": "_orderHandler",
44
- "type": "address"
45
- },
46
- {
47
- "internalType": "contract IExternalHandler",
48
- "name": "_externalHandler",
49
- "type": "address"
50
- }
51
- ],
52
- "stateMutability": "nonpayable",
53
- "type": "constructor"
54
- },
55
- {
56
- "inputs": [
57
- {
58
- "internalType": "uint256",
59
- "name": "adjustedClaimableAmount",
60
- "type": "uint256"
61
- },
62
- {
63
- "internalType": "uint256",
64
- "name": "claimedAmount",
65
- "type": "uint256"
66
- }
67
- ],
68
- "name": "CollateralAlreadyClaimed",
69
- "type": "error"
70
- },
71
- {
72
- "inputs": [
73
- {
74
- "internalType": "bytes32",
75
- "name": "key",
76
- "type": "bytes32"
77
- }
78
- ],
79
- "name": "DisabledFeature",
80
- "type": "error"
81
- },
82
- {
83
- "inputs": [
84
- {
85
- "internalType": "address",
86
- "name": "market",
87
- "type": "address"
88
- }
89
- ],
90
- "name": "DisabledMarket",
91
- "type": "error"
92
- },
93
- {
94
- "inputs": [
95
- {
96
- "internalType": "address",
97
- "name": "market",
98
- "type": "address"
99
- },
100
- {
101
- "internalType": "address",
102
- "name": "token",
103
- "type": "address"
104
- }
105
- ],
106
- "name": "EmptyAddressInMarketTokenBalanceValidation",
107
- "type": "error"
108
- },
109
- {
110
- "inputs": [],
111
- "name": "EmptyDeposit",
112
- "type": "error"
113
- },
114
- {
115
- "inputs": [],
116
- "name": "EmptyHoldingAddress",
117
- "type": "error"
118
- },
119
- {
120
- "inputs": [],
121
- "name": "EmptyMarket",
122
- "type": "error"
123
- },
124
- {
125
- "inputs": [],
126
- "name": "EmptyOrder",
127
- "type": "error"
128
- },
129
- {
130
- "inputs": [],
131
- "name": "EmptyReceiver",
132
- "type": "error"
133
- },
134
- {
135
- "inputs": [
136
- {
137
- "internalType": "address",
138
- "name": "token",
139
- "type": "address"
140
- }
141
- ],
142
- "name": "EmptyTokenTranferGasLimit",
143
- "type": "error"
144
- },
145
- {
146
- "inputs": [
147
- {
148
- "internalType": "uint256",
149
- "name": "marketsLength",
150
- "type": "uint256"
151
- },
152
- {
153
- "internalType": "uint256",
154
- "name": "tokensLength",
155
- "type": "uint256"
156
- }
157
- ],
158
- "name": "InvalidClaimAffiliateRewardsInput",
159
- "type": "error"
160
- },
161
- {
162
- "inputs": [
163
- {
164
- "internalType": "uint256",
165
- "name": "marketsLength",
166
- "type": "uint256"
167
- },
168
- {
169
- "internalType": "uint256",
170
- "name": "tokensLength",
171
- "type": "uint256"
172
- },
173
- {
174
- "internalType": "uint256",
175
- "name": "timeKeysLength",
176
- "type": "uint256"
177
- }
178
- ],
179
- "name": "InvalidClaimCollateralInput",
180
- "type": "error"
181
- },
182
- {
183
- "inputs": [
184
- {
185
- "internalType": "uint256",
186
- "name": "marketsLength",
187
- "type": "uint256"
188
- },
189
- {
190
- "internalType": "uint256",
191
- "name": "tokensLength",
192
- "type": "uint256"
193
- }
194
- ],
195
- "name": "InvalidClaimFundingFeesInput",
196
- "type": "error"
197
- },
198
- {
199
- "inputs": [
200
- {
201
- "internalType": "uint256",
202
- "name": "marketsLength",
203
- "type": "uint256"
204
- },
205
- {
206
- "internalType": "uint256",
207
- "name": "tokensLength",
208
- "type": "uint256"
209
- }
210
- ],
211
- "name": "InvalidClaimUiFeesInput",
212
- "type": "error"
213
- },
214
- {
215
- "inputs": [
216
- {
217
- "internalType": "uint256",
218
- "name": "value",
219
- "type": "uint256"
220
- }
221
- ],
222
- "name": "InvalidClaimableFactor",
223
- "type": "error"
224
- },
225
- {
226
- "inputs": [
227
- {
228
- "internalType": "address",
229
- "name": "market",
230
- "type": "address"
231
- },
232
- {
233
- "internalType": "address",
234
- "name": "token",
235
- "type": "address"
236
- },
237
- {
238
- "internalType": "uint256",
239
- "name": "balance",
240
- "type": "uint256"
241
- },
242
- {
243
- "internalType": "uint256",
244
- "name": "expectedMinBalance",
245
- "type": "uint256"
246
- }
247
- ],
248
- "name": "InvalidMarketTokenBalance",
249
- "type": "error"
250
- },
251
- {
252
- "inputs": [
253
- {
254
- "internalType": "address",
255
- "name": "market",
256
- "type": "address"
257
- },
258
- {
259
- "internalType": "address",
260
- "name": "token",
261
- "type": "address"
262
- },
263
- {
264
- "internalType": "uint256",
265
- "name": "balance",
266
- "type": "uint256"
267
- },
268
- {
269
- "internalType": "uint256",
270
- "name": "claimableFundingFeeAmount",
271
- "type": "uint256"
272
- }
273
- ],
274
- "name": "InvalidMarketTokenBalanceForClaimableFunding",
275
- "type": "error"
276
- },
277
- {
278
- "inputs": [
279
- {
280
- "internalType": "address",
281
- "name": "market",
282
- "type": "address"
283
- },
284
- {
285
- "internalType": "address",
286
- "name": "token",
287
- "type": "address"
288
- },
289
- {
290
- "internalType": "uint256",
291
- "name": "balance",
292
- "type": "uint256"
293
- },
294
- {
295
- "internalType": "uint256",
296
- "name": "collateralAmount",
297
- "type": "uint256"
298
- }
299
- ],
300
- "name": "InvalidMarketTokenBalanceForCollateralAmount",
301
- "type": "error"
302
- },
303
- {
304
- "inputs": [
305
- {
306
- "internalType": "uint256",
307
- "name": "uiFeeFactor",
308
- "type": "uint256"
309
- },
310
- {
311
- "internalType": "uint256",
312
- "name": "maxUiFeeFactor",
313
- "type": "uint256"
314
- }
315
- ],
316
- "name": "InvalidUiFeeFactor",
317
- "type": "error"
318
- },
319
- {
320
- "inputs": [
321
- {
322
- "internalType": "address",
323
- "name": "token",
324
- "type": "address"
325
- },
326
- {
327
- "internalType": "address",
328
- "name": "receiver",
329
- "type": "address"
330
- },
331
- {
332
- "internalType": "uint256",
333
- "name": "amount",
334
- "type": "uint256"
335
- }
336
- ],
337
- "name": "TokenTransferError",
338
- "type": "error"
339
- },
340
- {
341
- "inputs": [
342
- {
343
- "internalType": "address",
344
- "name": "msgSender",
345
- "type": "address"
346
- },
347
- {
348
- "internalType": "string",
349
- "name": "role",
350
- "type": "string"
351
- }
352
- ],
353
- "name": "Unauthorized",
354
- "type": "error"
355
- },
356
- {
357
- "inputs": [
358
- {
359
- "internalType": "bytes32",
360
- "name": "key",
361
- "type": "bytes32"
362
- }
363
- ],
364
- "name": "cancelDeposit",
365
- "outputs": [],
366
- "stateMutability": "payable",
367
- "type": "function"
368
- },
369
- {
370
- "inputs": [
371
- {
372
- "internalType": "bytes32",
373
- "name": "key",
374
- "type": "bytes32"
375
- }
376
- ],
377
- "name": "cancelOrder",
378
- "outputs": [],
379
- "stateMutability": "payable",
380
- "type": "function"
381
- },
382
- {
383
- "inputs": [
384
- {
385
- "internalType": "bytes32",
386
- "name": "key",
387
- "type": "bytes32"
388
- }
389
- ],
390
- "name": "cancelShift",
391
- "outputs": [],
392
- "stateMutability": "payable",
393
- "type": "function"
394
- },
395
- {
396
- "inputs": [
397
- {
398
- "internalType": "bytes32",
399
- "name": "key",
400
- "type": "bytes32"
401
- }
402
- ],
403
- "name": "cancelWithdrawal",
404
- "outputs": [],
405
- "stateMutability": "payable",
406
- "type": "function"
407
- },
408
- {
409
- "inputs": [
410
- {
411
- "internalType": "address[]",
412
- "name": "markets",
413
- "type": "address[]"
414
- },
415
- {
416
- "internalType": "address[]",
417
- "name": "tokens",
418
- "type": "address[]"
419
- },
420
- {
421
- "internalType": "address",
422
- "name": "receiver",
423
- "type": "address"
424
- }
425
- ],
426
- "name": "claimAffiliateRewards",
427
- "outputs": [
428
- {
429
- "internalType": "uint256[]",
430
- "name": "",
431
- "type": "uint256[]"
432
- }
433
- ],
434
- "stateMutability": "payable",
435
- "type": "function"
436
- },
437
- {
438
- "inputs": [
439
- {
440
- "internalType": "address[]",
441
- "name": "markets",
442
- "type": "address[]"
443
- },
444
- {
445
- "internalType": "address[]",
446
- "name": "tokens",
447
- "type": "address[]"
448
- },
449
- {
450
- "internalType": "uint256[]",
451
- "name": "timeKeys",
452
- "type": "uint256[]"
453
- },
454
- {
455
- "internalType": "address",
456
- "name": "receiver",
457
- "type": "address"
458
- }
459
- ],
460
- "name": "claimCollateral",
461
- "outputs": [
462
- {
463
- "internalType": "uint256[]",
464
- "name": "",
465
- "type": "uint256[]"
466
- }
467
- ],
468
- "stateMutability": "payable",
469
- "type": "function"
470
- },
471
- {
472
- "inputs": [
473
- {
474
- "internalType": "address[]",
475
- "name": "markets",
476
- "type": "address[]"
477
- },
478
- {
479
- "internalType": "address[]",
480
- "name": "tokens",
481
- "type": "address[]"
482
- },
483
- {
484
- "internalType": "address",
485
- "name": "receiver",
486
- "type": "address"
487
- }
488
- ],
489
- "name": "claimFundingFees",
490
- "outputs": [
491
- {
492
- "internalType": "uint256[]",
493
- "name": "",
494
- "type": "uint256[]"
495
- }
496
- ],
497
- "stateMutability": "payable",
498
- "type": "function"
499
- },
500
- {
501
- "inputs": [
502
- {
503
- "internalType": "address[]",
504
- "name": "markets",
505
- "type": "address[]"
506
- },
507
- {
508
- "internalType": "address[]",
509
- "name": "tokens",
510
- "type": "address[]"
511
- },
512
- {
513
- "internalType": "address",
514
- "name": "receiver",
515
- "type": "address"
516
- }
517
- ],
518
- "name": "claimUiFees",
519
- "outputs": [
520
- {
521
- "internalType": "uint256[]",
522
- "name": "",
523
- "type": "uint256[]"
524
- }
525
- ],
526
- "stateMutability": "payable",
527
- "type": "function"
528
- },
529
- {
530
- "inputs": [
531
- {
532
- "components": [
533
- {
534
- "internalType": "address",
535
- "name": "receiver",
536
- "type": "address"
537
- },
538
- {
539
- "internalType": "address",
540
- "name": "callbackContract",
541
- "type": "address"
542
- },
543
- {
544
- "internalType": "address",
545
- "name": "uiFeeReceiver",
546
- "type": "address"
547
- },
548
- {
549
- "internalType": "address",
550
- "name": "market",
551
- "type": "address"
552
- },
553
- {
554
- "internalType": "address",
555
- "name": "initialLongToken",
556
- "type": "address"
557
- },
558
- {
559
- "internalType": "address",
560
- "name": "initialShortToken",
561
- "type": "address"
562
- },
563
- {
564
- "internalType": "address[]",
565
- "name": "longTokenSwapPath",
566
- "type": "address[]"
567
- },
568
- {
569
- "internalType": "address[]",
570
- "name": "shortTokenSwapPath",
571
- "type": "address[]"
572
- },
573
- {
574
- "internalType": "uint256",
575
- "name": "minMarketTokens",
576
- "type": "uint256"
577
- },
578
- {
579
- "internalType": "bool",
580
- "name": "shouldUnwrapNativeToken",
581
- "type": "bool"
582
- },
583
- {
584
- "internalType": "uint256",
585
- "name": "executionFee",
586
- "type": "uint256"
587
- },
588
- {
589
- "internalType": "uint256",
590
- "name": "callbackGasLimit",
591
- "type": "uint256"
592
- }
593
- ],
594
- "internalType": "struct DepositUtils.CreateDepositParams",
595
- "name": "params",
596
- "type": "tuple"
597
- }
598
- ],
599
- "name": "createDeposit",
600
- "outputs": [
601
- {
602
- "internalType": "bytes32",
603
- "name": "",
604
- "type": "bytes32"
605
- }
606
- ],
607
- "stateMutability": "payable",
608
- "type": "function"
609
- },
610
- {
611
- "inputs": [
612
- {
613
- "components": [
614
- {
615
- "components": [
616
- {
617
- "internalType": "address",
618
- "name": "receiver",
619
- "type": "address"
620
- },
621
- {
622
- "internalType": "address",
623
- "name": "cancellationReceiver",
624
- "type": "address"
625
- },
626
- {
627
- "internalType": "address",
628
- "name": "callbackContract",
629
- "type": "address"
630
- },
631
- {
632
- "internalType": "address",
633
- "name": "uiFeeReceiver",
634
- "type": "address"
635
- },
636
- {
637
- "internalType": "address",
638
- "name": "market",
639
- "type": "address"
640
- },
641
- {
642
- "internalType": "address",
643
- "name": "initialCollateralToken",
644
- "type": "address"
645
- },
646
- {
647
- "internalType": "address[]",
648
- "name": "swapPath",
649
- "type": "address[]"
650
- }
651
- ],
652
- "internalType": "struct IBaseOrderUtils.CreateOrderParamsAddresses",
653
- "name": "addresses",
654
- "type": "tuple"
655
- },
656
- {
657
- "components": [
658
- {
659
- "internalType": "uint256",
660
- "name": "sizeDeltaUsd",
661
- "type": "uint256"
662
- },
663
- {
664
- "internalType": "uint256",
665
- "name": "initialCollateralDeltaAmount",
666
- "type": "uint256"
667
- },
668
- {
669
- "internalType": "uint256",
670
- "name": "triggerPrice",
671
- "type": "uint256"
672
- },
673
- {
674
- "internalType": "uint256",
675
- "name": "acceptablePrice",
676
- "type": "uint256"
677
- },
678
- {
679
- "internalType": "uint256",
680
- "name": "executionFee",
681
- "type": "uint256"
682
- },
683
- {
684
- "internalType": "uint256",
685
- "name": "callbackGasLimit",
686
- "type": "uint256"
687
- },
688
- {
689
- "internalType": "uint256",
690
- "name": "minOutputAmount",
691
- "type": "uint256"
692
- }
693
- ],
694
- "internalType": "struct IBaseOrderUtils.CreateOrderParamsNumbers",
695
- "name": "numbers",
696
- "type": "tuple"
697
- },
698
- {
699
- "internalType": "enum Order.OrderType",
700
- "name": "orderType",
701
- "type": "uint8"
702
- },
703
- {
704
- "internalType": "enum Order.DecreasePositionSwapType",
705
- "name": "decreasePositionSwapType",
706
- "type": "uint8"
707
- },
708
- {
709
- "internalType": "bool",
710
- "name": "isLong",
711
- "type": "bool"
712
- },
713
- {
714
- "internalType": "bool",
715
- "name": "shouldUnwrapNativeToken",
716
- "type": "bool"
717
- },
718
- {
719
- "internalType": "bool",
720
- "name": "autoCancel",
721
- "type": "bool"
722
- },
723
- {
724
- "internalType": "bytes32",
725
- "name": "referralCode",
726
- "type": "bytes32"
727
- }
728
- ],
729
- "internalType": "struct IBaseOrderUtils.CreateOrderParams",
730
- "name": "params",
731
- "type": "tuple"
732
- }
733
- ],
734
- "name": "createOrder",
735
- "outputs": [
736
- {
737
- "internalType": "bytes32",
738
- "name": "",
739
- "type": "bytes32"
740
- }
741
- ],
742
- "stateMutability": "payable",
743
- "type": "function"
744
- },
745
- {
746
- "inputs": [
747
- {
748
- "components": [
749
- {
750
- "internalType": "address",
751
- "name": "receiver",
752
- "type": "address"
753
- },
754
- {
755
- "internalType": "address",
756
- "name": "callbackContract",
757
- "type": "address"
758
- },
759
- {
760
- "internalType": "address",
761
- "name": "uiFeeReceiver",
762
- "type": "address"
763
- },
764
- {
765
- "internalType": "address",
766
- "name": "fromMarket",
767
- "type": "address"
768
- },
769
- {
770
- "internalType": "address",
771
- "name": "toMarket",
772
- "type": "address"
773
- },
774
- {
775
- "internalType": "uint256",
776
- "name": "minMarketTokens",
777
- "type": "uint256"
778
- },
779
- {
780
- "internalType": "uint256",
781
- "name": "executionFee",
782
- "type": "uint256"
783
- },
784
- {
785
- "internalType": "uint256",
786
- "name": "callbackGasLimit",
787
- "type": "uint256"
788
- }
789
- ],
790
- "internalType": "struct ShiftUtils.CreateShiftParams",
791
- "name": "params",
792
- "type": "tuple"
793
- }
794
- ],
795
- "name": "createShift",
796
- "outputs": [
797
- {
798
- "internalType": "bytes32",
799
- "name": "",
800
- "type": "bytes32"
801
- }
802
- ],
803
- "stateMutability": "payable",
804
- "type": "function"
805
- },
806
- {
807
- "inputs": [
808
- {
809
- "components": [
810
- {
811
- "internalType": "address",
812
- "name": "receiver",
813
- "type": "address"
814
- },
815
- {
816
- "internalType": "address",
817
- "name": "callbackContract",
818
- "type": "address"
819
- },
820
- {
821
- "internalType": "address",
822
- "name": "uiFeeReceiver",
823
- "type": "address"
824
- },
825
- {
826
- "internalType": "address",
827
- "name": "market",
828
- "type": "address"
829
- },
830
- {
831
- "internalType": "address[]",
832
- "name": "longTokenSwapPath",
833
- "type": "address[]"
834
- },
835
- {
836
- "internalType": "address[]",
837
- "name": "shortTokenSwapPath",
838
- "type": "address[]"
839
- },
840
- {
841
- "internalType": "uint256",
842
- "name": "minLongTokenAmount",
843
- "type": "uint256"
844
- },
845
- {
846
- "internalType": "uint256",
847
- "name": "minShortTokenAmount",
848
- "type": "uint256"
849
- },
850
- {
851
- "internalType": "bool",
852
- "name": "shouldUnwrapNativeToken",
853
- "type": "bool"
854
- },
855
- {
856
- "internalType": "uint256",
857
- "name": "executionFee",
858
- "type": "uint256"
859
- },
860
- {
861
- "internalType": "uint256",
862
- "name": "callbackGasLimit",
863
- "type": "uint256"
864
- }
865
- ],
866
- "internalType": "struct WithdrawalUtils.CreateWithdrawalParams",
867
- "name": "params",
868
- "type": "tuple"
869
- }
870
- ],
871
- "name": "createWithdrawal",
872
- "outputs": [
873
- {
874
- "internalType": "bytes32",
875
- "name": "",
876
- "type": "bytes32"
877
- }
878
- ],
879
- "stateMutability": "payable",
880
- "type": "function"
881
- },
882
- {
883
- "inputs": [],
884
- "name": "dataStore",
885
- "outputs": [
886
- {
887
- "internalType": "contract DataStore",
888
- "name": "",
889
- "type": "address"
890
- }
891
- ],
892
- "stateMutability": "view",
893
- "type": "function"
894
- },
895
- {
896
- "inputs": [],
897
- "name": "depositHandler",
898
- "outputs": [
899
- {
900
- "internalType": "contract IDepositHandler",
901
- "name": "",
902
- "type": "address"
903
- }
904
- ],
905
- "stateMutability": "view",
906
- "type": "function"
907
- },
908
- {
909
- "inputs": [],
910
- "name": "eventEmitter",
911
- "outputs": [
912
- {
913
- "internalType": "contract EventEmitter",
914
- "name": "",
915
- "type": "address"
916
- }
917
- ],
918
- "stateMutability": "view",
919
- "type": "function"
920
- },
921
- {
922
- "inputs": [
923
- {
924
- "components": [
925
- {
926
- "internalType": "address",
927
- "name": "receiver",
928
- "type": "address"
929
- },
930
- {
931
- "internalType": "address",
932
- "name": "callbackContract",
933
- "type": "address"
934
- },
935
- {
936
- "internalType": "address",
937
- "name": "uiFeeReceiver",
938
- "type": "address"
939
- },
940
- {
941
- "internalType": "address",
942
- "name": "market",
943
- "type": "address"
944
- },
945
- {
946
- "internalType": "address[]",
947
- "name": "longTokenSwapPath",
948
- "type": "address[]"
949
- },
950
- {
951
- "internalType": "address[]",
952
- "name": "shortTokenSwapPath",
953
- "type": "address[]"
954
- },
955
- {
956
- "internalType": "uint256",
957
- "name": "minLongTokenAmount",
958
- "type": "uint256"
959
- },
960
- {
961
- "internalType": "uint256",
962
- "name": "minShortTokenAmount",
963
- "type": "uint256"
964
- },
965
- {
966
- "internalType": "bool",
967
- "name": "shouldUnwrapNativeToken",
968
- "type": "bool"
969
- },
970
- {
971
- "internalType": "uint256",
972
- "name": "executionFee",
973
- "type": "uint256"
974
- },
975
- {
976
- "internalType": "uint256",
977
- "name": "callbackGasLimit",
978
- "type": "uint256"
979
- }
980
- ],
981
- "internalType": "struct WithdrawalUtils.CreateWithdrawalParams",
982
- "name": "params",
983
- "type": "tuple"
984
- },
985
- {
986
- "components": [
987
- {
988
- "internalType": "address[]",
989
- "name": "tokens",
990
- "type": "address[]"
991
- },
992
- {
993
- "internalType": "address[]",
994
- "name": "providers",
995
- "type": "address[]"
996
- },
997
- {
998
- "internalType": "bytes[]",
999
- "name": "data",
1000
- "type": "bytes[]"
1001
- }
1002
- ],
1003
- "internalType": "struct OracleUtils.SetPricesParams",
1004
- "name": "oracleParams",
1005
- "type": "tuple"
1006
- }
1007
- ],
1008
- "name": "executeAtomicWithdrawal",
1009
- "outputs": [],
1010
- "stateMutability": "payable",
1011
- "type": "function"
1012
- },
1013
- {
1014
- "inputs": [],
1015
- "name": "externalHandler",
1016
- "outputs": [
1017
- {
1018
- "internalType": "contract IExternalHandler",
1019
- "name": "",
1020
- "type": "address"
1021
- }
1022
- ],
1023
- "stateMutability": "view",
1024
- "type": "function"
1025
- },
1026
- {
1027
- "inputs": [
1028
- {
1029
- "internalType": "address[]",
1030
- "name": "externalCallTargets",
1031
- "type": "address[]"
1032
- },
1033
- {
1034
- "internalType": "bytes[]",
1035
- "name": "externalCallDataList",
1036
- "type": "bytes[]"
1037
- },
1038
- {
1039
- "internalType": "address[]",
1040
- "name": "refundTokens",
1041
- "type": "address[]"
1042
- },
1043
- {
1044
- "internalType": "address[]",
1045
- "name": "refundReceivers",
1046
- "type": "address[]"
1047
- }
1048
- ],
1049
- "name": "makeExternalCalls",
1050
- "outputs": [],
1051
- "stateMutability": "nonpayable",
1052
- "type": "function"
1053
- },
1054
- {
1055
- "inputs": [
1056
- {
1057
- "internalType": "bytes[]",
1058
- "name": "data",
1059
- "type": "bytes[]"
1060
- }
1061
- ],
1062
- "name": "multicall",
1063
- "outputs": [
1064
- {
1065
- "internalType": "bytes[]",
1066
- "name": "results",
1067
- "type": "bytes[]"
1068
- }
1069
- ],
1070
- "stateMutability": "payable",
1071
- "type": "function"
1072
- },
1073
- {
1074
- "inputs": [],
1075
- "name": "orderHandler",
1076
- "outputs": [
1077
- {
1078
- "internalType": "contract IOrderHandler",
1079
- "name": "",
1080
- "type": "address"
1081
- }
1082
- ],
1083
- "stateMutability": "view",
1084
- "type": "function"
1085
- },
1086
- {
1087
- "inputs": [],
1088
- "name": "roleStore",
1089
- "outputs": [
1090
- {
1091
- "internalType": "contract RoleStore",
1092
- "name": "",
1093
- "type": "address"
1094
- }
1095
- ],
1096
- "stateMutability": "view",
1097
- "type": "function"
1098
- },
1099
- {
1100
- "inputs": [],
1101
- "name": "router",
1102
- "outputs": [
1103
- {
1104
- "internalType": "contract Router",
1105
- "name": "",
1106
- "type": "address"
1107
- }
1108
- ],
1109
- "stateMutability": "view",
1110
- "type": "function"
1111
- },
1112
- {
1113
- "inputs": [
1114
- {
1115
- "internalType": "address",
1116
- "name": "receiver",
1117
- "type": "address"
1118
- },
1119
- {
1120
- "internalType": "uint256",
1121
- "name": "amount",
1122
- "type": "uint256"
1123
- }
1124
- ],
1125
- "name": "sendNativeToken",
1126
- "outputs": [],
1127
- "stateMutability": "payable",
1128
- "type": "function"
1129
- },
1130
- {
1131
- "inputs": [
1132
- {
1133
- "internalType": "address",
1134
- "name": "token",
1135
- "type": "address"
1136
- },
1137
- {
1138
- "internalType": "address",
1139
- "name": "receiver",
1140
- "type": "address"
1141
- },
1142
- {
1143
- "internalType": "uint256",
1144
- "name": "amount",
1145
- "type": "uint256"
1146
- }
1147
- ],
1148
- "name": "sendTokens",
1149
- "outputs": [],
1150
- "stateMutability": "payable",
1151
- "type": "function"
1152
- },
1153
- {
1154
- "inputs": [
1155
- {
1156
- "internalType": "address",
1157
- "name": "receiver",
1158
- "type": "address"
1159
- },
1160
- {
1161
- "internalType": "uint256",
1162
- "name": "amount",
1163
- "type": "uint256"
1164
- }
1165
- ],
1166
- "name": "sendWnt",
1167
- "outputs": [],
1168
- "stateMutability": "payable",
1169
- "type": "function"
1170
- },
1171
- {
1172
- "inputs": [
1173
- {
1174
- "internalType": "address",
1175
- "name": "market",
1176
- "type": "address"
1177
- },
1178
- {
1179
- "internalType": "address",
1180
- "name": "callbackContract",
1181
- "type": "address"
1182
- }
1183
- ],
1184
- "name": "setSavedCallbackContract",
1185
- "outputs": [],
1186
- "stateMutability": "payable",
1187
- "type": "function"
1188
- },
1189
- {
1190
- "inputs": [
1191
- {
1192
- "internalType": "uint256",
1193
- "name": "uiFeeFactor",
1194
- "type": "uint256"
1195
- }
1196
- ],
1197
- "name": "setUiFeeFactor",
1198
- "outputs": [],
1199
- "stateMutability": "payable",
1200
- "type": "function"
1201
- },
1202
- {
1203
- "inputs": [],
1204
- "name": "shiftHandler",
1205
- "outputs": [
1206
- {
1207
- "internalType": "contract IShiftHandler",
1208
- "name": "",
1209
- "type": "address"
1210
- }
1211
- ],
1212
- "stateMutability": "view",
1213
- "type": "function"
1214
- },
1215
- {
1216
- "inputs": [
1217
- {
1218
- "internalType": "bytes32",
1219
- "name": "key",
1220
- "type": "bytes32"
1221
- },
1222
- {
1223
- "components": [
1224
- {
1225
- "internalType": "address[]",
1226
- "name": "primaryTokens",
1227
- "type": "address[]"
1228
- },
1229
- {
1230
- "components": [
1231
- {
1232
- "internalType": "uint256",
1233
- "name": "min",
1234
- "type": "uint256"
1235
- },
1236
- {
1237
- "internalType": "uint256",
1238
- "name": "max",
1239
- "type": "uint256"
1240
- }
1241
- ],
1242
- "internalType": "struct Price.Props[]",
1243
- "name": "primaryPrices",
1244
- "type": "tuple[]"
1245
- },
1246
- {
1247
- "internalType": "uint256",
1248
- "name": "minTimestamp",
1249
- "type": "uint256"
1250
- },
1251
- {
1252
- "internalType": "uint256",
1253
- "name": "maxTimestamp",
1254
- "type": "uint256"
1255
- }
1256
- ],
1257
- "internalType": "struct OracleUtils.SimulatePricesParams",
1258
- "name": "simulatedOracleParams",
1259
- "type": "tuple"
1260
- }
1261
- ],
1262
- "name": "simulateExecuteDeposit",
1263
- "outputs": [],
1264
- "stateMutability": "payable",
1265
- "type": "function"
1266
- },
1267
- {
1268
- "inputs": [
1269
- {
1270
- "internalType": "bytes32",
1271
- "name": "key",
1272
- "type": "bytes32"
1273
- },
1274
- {
1275
- "components": [
1276
- {
1277
- "internalType": "address[]",
1278
- "name": "primaryTokens",
1279
- "type": "address[]"
1280
- },
1281
- {
1282
- "components": [
1283
- {
1284
- "internalType": "uint256",
1285
- "name": "min",
1286
- "type": "uint256"
1287
- },
1288
- {
1289
- "internalType": "uint256",
1290
- "name": "max",
1291
- "type": "uint256"
1292
- }
1293
- ],
1294
- "internalType": "struct Price.Props[]",
1295
- "name": "primaryPrices",
1296
- "type": "tuple[]"
1297
- },
1298
- {
1299
- "internalType": "uint256",
1300
- "name": "minTimestamp",
1301
- "type": "uint256"
1302
- },
1303
- {
1304
- "internalType": "uint256",
1305
- "name": "maxTimestamp",
1306
- "type": "uint256"
1307
- }
1308
- ],
1309
- "internalType": "struct OracleUtils.SimulatePricesParams",
1310
- "name": "simulatedOracleParams",
1311
- "type": "tuple"
1312
- }
1313
- ],
1314
- "name": "simulateExecuteOrder",
1315
- "outputs": [],
1316
- "stateMutability": "payable",
1317
- "type": "function"
1318
- },
1319
- {
1320
- "inputs": [
1321
- {
1322
- "internalType": "bytes32",
1323
- "name": "key",
1324
- "type": "bytes32"
1325
- },
1326
- {
1327
- "components": [
1328
- {
1329
- "internalType": "address[]",
1330
- "name": "primaryTokens",
1331
- "type": "address[]"
1332
- },
1333
- {
1334
- "components": [
1335
- {
1336
- "internalType": "uint256",
1337
- "name": "min",
1338
- "type": "uint256"
1339
- },
1340
- {
1341
- "internalType": "uint256",
1342
- "name": "max",
1343
- "type": "uint256"
1344
- }
1345
- ],
1346
- "internalType": "struct Price.Props[]",
1347
- "name": "primaryPrices",
1348
- "type": "tuple[]"
1349
- },
1350
- {
1351
- "internalType": "uint256",
1352
- "name": "minTimestamp",
1353
- "type": "uint256"
1354
- },
1355
- {
1356
- "internalType": "uint256",
1357
- "name": "maxTimestamp",
1358
- "type": "uint256"
1359
- }
1360
- ],
1361
- "internalType": "struct OracleUtils.SimulatePricesParams",
1362
- "name": "simulatedOracleParams",
1363
- "type": "tuple"
1364
- }
1365
- ],
1366
- "name": "simulateExecuteShift",
1367
- "outputs": [],
1368
- "stateMutability": "payable",
1369
- "type": "function"
1370
- },
1371
- {
1372
- "inputs": [
1373
- {
1374
- "internalType": "bytes32",
1375
- "name": "key",
1376
- "type": "bytes32"
1377
- },
1378
- {
1379
- "components": [
1380
- {
1381
- "internalType": "address[]",
1382
- "name": "primaryTokens",
1383
- "type": "address[]"
1384
- },
1385
- {
1386
- "components": [
1387
- {
1388
- "internalType": "uint256",
1389
- "name": "min",
1390
- "type": "uint256"
1391
- },
1392
- {
1393
- "internalType": "uint256",
1394
- "name": "max",
1395
- "type": "uint256"
1396
- }
1397
- ],
1398
- "internalType": "struct Price.Props[]",
1399
- "name": "primaryPrices",
1400
- "type": "tuple[]"
1401
- },
1402
- {
1403
- "internalType": "uint256",
1404
- "name": "minTimestamp",
1405
- "type": "uint256"
1406
- },
1407
- {
1408
- "internalType": "uint256",
1409
- "name": "maxTimestamp",
1410
- "type": "uint256"
1411
- }
1412
- ],
1413
- "internalType": "struct OracleUtils.SimulatePricesParams",
1414
- "name": "simulatedOracleParams",
1415
- "type": "tuple"
1416
- },
1417
- {
1418
- "internalType": "enum ISwapPricingUtils.SwapPricingType",
1419
- "name": "swapPricingType",
1420
- "type": "uint8"
1421
- }
1422
- ],
1423
- "name": "simulateExecuteWithdrawal",
1424
- "outputs": [],
1425
- "stateMutability": "payable",
1426
- "type": "function"
1427
- },
1428
- {
1429
- "inputs": [
1430
- {
1431
- "internalType": "bytes32",
1432
- "name": "key",
1433
- "type": "bytes32"
1434
- },
1435
- {
1436
- "internalType": "uint256",
1437
- "name": "sizeDeltaUsd",
1438
- "type": "uint256"
1439
- },
1440
- {
1441
- "internalType": "uint256",
1442
- "name": "acceptablePrice",
1443
- "type": "uint256"
1444
- },
1445
- {
1446
- "internalType": "uint256",
1447
- "name": "triggerPrice",
1448
- "type": "uint256"
1449
- },
1450
- {
1451
- "internalType": "uint256",
1452
- "name": "minOutputAmount",
1453
- "type": "uint256"
1454
- },
1455
- {
1456
- "internalType": "bool",
1457
- "name": "autoCancel",
1458
- "type": "bool"
1459
- }
1460
- ],
1461
- "name": "updateOrder",
1462
- "outputs": [],
1463
- "stateMutability": "payable",
1464
- "type": "function"
1465
- },
1466
- {
1467
- "inputs": [],
1468
- "name": "withdrawalHandler",
1469
- "outputs": [
1470
- {
1471
- "internalType": "contract IWithdrawalHandler",
1472
- "name": "",
1473
- "type": "address"
1474
- }
1475
- ],
1476
- "stateMutability": "view",
1477
- "type": "function"
1478
- }
1479
- ],
1480
- "transactionHash": "0x723bba33993a46238da285f8900a6c411564432b8af409c3dc8d3b1f6d5c7167",
1481
- "receipt": {
1482
- "to": null,
1483
- "from": "0xE7BfFf2aB721264887230037940490351700a068",
1484
- "contractAddress": "0x69C527fC77291722b52649E45c838e41be8Bf5d5",
1485
- "transactionIndex": 6,
1486
- "gasUsed": "6362339",
1487
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
1488
- "blockHash": "0xd18c90532e420963f4dc93793b032a792fdde7171138710bc41c4088e2aa5d59",
1489
- "transactionHash": "0x723bba33993a46238da285f8900a6c411564432b8af409c3dc8d3b1f6d5c7167",
1490
- "logs": [],
1491
- "blockNumber": 222747030,
1492
- "cumulativeGasUsed": "6942059",
1493
- "status": 1,
1494
- "byzantium": true
1495
- },
1496
- "args": [
1497
- "0x7452c558d45f8afC8c83dAe62C3f8A5BE19c71f6",
1498
- "0x3c3d99FD298f679DBC2CEcd132b4eC4d0F5e6e72",
1499
- "0xFD70de6b91282D8017aA4E741e9Ae325CAb992d8",
1500
- "0xC8ee91A54287DB53897056e12D9819156D3822Fb",
1501
- "0x321f3739983CC3E911fd67a83d1ee76238894Bd0",
1502
- "0xA19fA3F0D8E7b7A8963420De504b624167e709B2",
1503
- "0xEa90EC1228F7D1b3D47D84d1c9D46dBDFEfF7709",
1504
- "0xB0Fc2a48b873da40e7bc25658e5E6137616AC2Ee",
1505
- "0x389CEf541397e872dC04421f166B5Bc2E0b374a5"
1506
- ],
1507
- "numDeployments": 6,
1508
- "solcInputHash": "292dd15f99d7c1e4e4b27476672071d7",
1509
- "libraries": {
1510
- "CallbackUtils": "0x501e34E31f1594ffbd3D0C17634D6de6C6C5c7A3",
1511
- "DepositStoreUtils": "0x3063A99D2df2A871068D47041eB8d089E5DE1Cdc",
1512
- "FeeUtils": "0x7Fd8d13A778a22F5c2acB67226A193C7d0b0a336",
1513
- "MarketEventUtils": "0x1F493E17bcF5390d3e5E49eE0bce17d4d068f90b",
1514
- "MarketStoreUtils": "0xbbf05cF8e1c6548092A6a02c4c5330E76BF0fE2D",
1515
- "OrderStoreUtils": "0x67040c411C1b3195361801E9Ad8a91D1Fe9C0BC2",
1516
- "ReferralUtils": "0x27346Fdab142e2b8B6C6d2ecFe73e75B5e249A57",
1517
- "ShiftStoreUtils": "0xCfad9CB2a681b63884AEf98af28458692137c9E3",
1518
- "WithdrawalStoreUtils": "0xD521Cb31B14bB9F70D9a59b47D8763336CAD0395"
1519
- },
1520
- "devdoc": {
1521
- "details": "Router for exchange functions, supports functions which require token transfers from the user IMPORTANT: PayableMulticall uses delegatecall, msg.value will be the same for each delegatecall extra care should be taken when using msg.value in any of the functions in this contract To avoid front-running issues, most actions require two steps to execute: - User sends transaction with request details, e.g. deposit / withdraw liquidity, swap, increase / decrease position - Keepers listen for the transactions, include the prices for the request then send a transaction to execute the request Prices are provided by an off-chain oracle system: - Oracle keepers continually check the latest blocks - When there is a new block, oracle keepers fetch the latest prices from reference exchanges - Oracle keepers then sign the median price for each token together with the block hash - Oracle keepers then send the data and signature to archive nodes - Archive nodes display this information for anyone to query Example: - Block 100 is finalized on the blockchain - Oracle keepers observe this block - Oracle keepers pull the latest prices from reference exchanges, token A: price 20,000, token B: price 80,000 - Oracle keepers sign [chainId, blockhash(100), 20,000], [chainId, blockhash(100), 80,000] - If in block 100, there was a market order to open a long position for token A, the market order would have a block number of 100 - The prices signed at block 100 can be used to execute this order - Order keepers would bundle the signature and price data for token A then execute the order",
1522
- "kind": "dev",
1523
- "methods": {
1524
- "cancelOrder(bytes32)": {
1525
- "details": "Cancels the given order. The `cancelOrder()` feature must be enabled for the given order type. The caller must be the owner of the order, and the order must not be a market order. The order is cancelled by calling the `cancelOrder()` function in the `OrderUtils` contract. This function also records the starting gas amount and the reason for cancellation, which is passed to the `cancelOrder()` function.",
1526
- "params": {
1527
- "key": "The unique ID of the order to be cancelled"
1528
- }
1529
- },
1530
- "claimAffiliateRewards(address[],address[],address)": {
1531
- "details": "Claims affiliate rewards for the given markets and tokens on behalf of the caller, and sends the rewards to the specified receiver. The length of the `markets` and `tokens` arrays must be the same. For each market-token pair, the `claimAffiliateReward()` function in the `ReferralUtils` contract is called to claim the rewards for the caller.",
1532
- "params": {
1533
- "markets": "An array of market addresses",
1534
- "receiver": "The address to which the claimed rewards should be sent",
1535
- "tokens": "An array of token addresses, corresponding to the given markets"
1536
- }
1537
- },
1538
- "claimFundingFees(address[],address[],address)": {
1539
- "details": "Claims funding fees for the given markets and tokens on behalf of the caller, and sends the fees to the specified receiver. The length of the `markets` and `tokens` arrays must be the same. For each market-token pair, the `claimFundingFees()` function in the `MarketUtils` contract is called to claim the fees for the caller.",
1540
- "params": {
1541
- "markets": "An array of market addresses",
1542
- "receiver": "The address to which the claimed fees should be sent",
1543
- "tokens": "An array of token addresses, corresponding to the given markets"
1544
- }
1545
- },
1546
- "createDeposit((address,address,address,address,address,address,address[],address[],uint256,bool,uint256,uint256))": {
1547
- "details": "Creates a new deposit with the given long token, short token, long token amount, short token amount, and deposit parameters. The deposit is created by transferring the specified amounts of long and short tokens from the caller's account to the deposit store, and then calling the `createDeposit()` function on the deposit handler contract.",
1548
- "params": {
1549
- "params": "The deposit parameters, as specified in the `DepositUtils.CreateDepositParams` struct"
1550
- },
1551
- "returns": {
1552
- "_0": "The unique ID of the newly created deposit"
1553
- }
1554
- },
1555
- "createOrder(((address,address,address,address,address,address,address[]),(uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint8,uint8,bool,bool,bool,bytes32))": {
1556
- "details": "Creates a new order with the given amount, order parameters. The order is created by transferring the specified amount of collateral tokens from the caller's account to the order store, and then calling the `createOrder()` function on the order handler contract. The referral code is also set on the caller's account using the referral storage contract."
1557
- },
1558
- "multicall(bytes[])": {
1559
- "details": "Receives and executes a batch of function calls on this contract."
1560
- },
1561
- "updateOrder(bytes32,uint256,uint256,uint256,uint256,bool)": {
1562
- "details": "Updates the given order with the specified size delta, acceptable price, and trigger price. The `updateOrder()` feature must be enabled for the given order type. The caller must be the owner of the order, and the order must not be a market order. The size delta, trigger price, and acceptable price are updated on the order, and the order is unfrozen. Any additional WNT that is transferred to the contract is added to the order's execution fee. The updated order is then saved in the order store, and an `OrderUpdated` event is emitted.",
1563
- "params": {
1564
- "acceptablePrice": "The new acceptable price for the order",
1565
- "key": "The unique ID of the order to be updated",
1566
- "sizeDeltaUsd": "The new size delta for the order",
1567
- "triggerPrice": "The new trigger price for the order"
1568
- }
1569
- }
1570
- },
1571
- "title": "ExchangeRouter",
1572
- "version": 1
1573
- },
1574
- "userdoc": {
1575
- "kind": "user",
1576
- "methods": {},
1577
- "version": 1
1578
- },
1579
- "storageLayout": {
1580
- "storage": [
1581
- {
1582
- "astId": 115,
1583
- "contract": "contracts/router/ExchangeRouter.sol:ExchangeRouter",
1584
- "label": "_status",
1585
- "offset": 0,
1586
- "slot": "0",
1587
- "type": "t_uint256"
1588
- }
1589
- ],
1590
- "types": {
1591
- "t_uint256": {
1592
- "encoding": "inplace",
1593
- "label": "uint256",
1594
- "numberOfBytes": "32"
1595
- }
1596
- }
1597
- }
1598
- }