@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,648 +0,0 @@
1
- {
2
- "address": "0xe5485a4fD6527911e9b82A75A1bFEd6e47BE2241",
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 IOrderHandler",
28
- "name": "_orderHandler",
29
- "type": "address"
30
- },
31
- {
32
- "internalType": "contract OrderVault",
33
- "name": "_orderVault",
34
- "type": "address"
35
- }
36
- ],
37
- "stateMutability": "nonpayable",
38
- "type": "constructor"
39
- },
40
- {
41
- "inputs": [
42
- {
43
- "internalType": "bytes32",
44
- "name": "key",
45
- "type": "bytes32"
46
- }
47
- ],
48
- "name": "DisabledFeature",
49
- "type": "error"
50
- },
51
- {
52
- "inputs": [],
53
- "name": "EmptyHoldingAddress",
54
- "type": "error"
55
- },
56
- {
57
- "inputs": [],
58
- "name": "EmptyOrder",
59
- "type": "error"
60
- },
61
- {
62
- "inputs": [],
63
- "name": "EmptyReceiver",
64
- "type": "error"
65
- },
66
- {
67
- "inputs": [
68
- {
69
- "internalType": "address",
70
- "name": "token",
71
- "type": "address"
72
- }
73
- ],
74
- "name": "EmptyTokenTranferGasLimit",
75
- "type": "error"
76
- },
77
- {
78
- "inputs": [
79
- {
80
- "internalType": "address",
81
- "name": "msgSender",
82
- "type": "address"
83
- }
84
- ],
85
- "name": "InvalidNativeTokenSender",
86
- "type": "error"
87
- },
88
- {
89
- "inputs": [
90
- {
91
- "internalType": "address",
92
- "name": "receiver",
93
- "type": "address"
94
- },
95
- {
96
- "internalType": "address",
97
- "name": "expectedReceiver",
98
- "type": "address"
99
- }
100
- ],
101
- "name": "InvalidReceiverForSubaccountOrder",
102
- "type": "error"
103
- },
104
- {
105
- "inputs": [
106
- {
107
- "internalType": "address",
108
- "name": "account",
109
- "type": "address"
110
- },
111
- {
112
- "internalType": "address",
113
- "name": "subaccount",
114
- "type": "address"
115
- },
116
- {
117
- "internalType": "uint256",
118
- "name": "count",
119
- "type": "uint256"
120
- },
121
- {
122
- "internalType": "uint256",
123
- "name": "maxCount",
124
- "type": "uint256"
125
- }
126
- ],
127
- "name": "MaxSubaccountActionCountExceeded",
128
- "type": "error"
129
- },
130
- {
131
- "inputs": [
132
- {
133
- "internalType": "address",
134
- "name": "account",
135
- "type": "address"
136
- },
137
- {
138
- "internalType": "address",
139
- "name": "subaccount",
140
- "type": "address"
141
- }
142
- ],
143
- "name": "SubaccountNotAuthorized",
144
- "type": "error"
145
- },
146
- {
147
- "inputs": [
148
- {
149
- "internalType": "address",
150
- "name": "token",
151
- "type": "address"
152
- },
153
- {
154
- "internalType": "address",
155
- "name": "receiver",
156
- "type": "address"
157
- },
158
- {
159
- "internalType": "uint256",
160
- "name": "amount",
161
- "type": "uint256"
162
- }
163
- ],
164
- "name": "TokenTransferError",
165
- "type": "error"
166
- },
167
- {
168
- "inputs": [
169
- {
170
- "internalType": "address",
171
- "name": "subaccount",
172
- "type": "address"
173
- }
174
- ],
175
- "name": "addSubaccount",
176
- "outputs": [],
177
- "stateMutability": "payable",
178
- "type": "function"
179
- },
180
- {
181
- "inputs": [
182
- {
183
- "internalType": "bytes32",
184
- "name": "key",
185
- "type": "bytes32"
186
- }
187
- ],
188
- "name": "cancelOrder",
189
- "outputs": [],
190
- "stateMutability": "payable",
191
- "type": "function"
192
- },
193
- {
194
- "inputs": [
195
- {
196
- "internalType": "address",
197
- "name": "account",
198
- "type": "address"
199
- },
200
- {
201
- "components": [
202
- {
203
- "components": [
204
- {
205
- "internalType": "address",
206
- "name": "receiver",
207
- "type": "address"
208
- },
209
- {
210
- "internalType": "address",
211
- "name": "cancellationReceiver",
212
- "type": "address"
213
- },
214
- {
215
- "internalType": "address",
216
- "name": "callbackContract",
217
- "type": "address"
218
- },
219
- {
220
- "internalType": "address",
221
- "name": "uiFeeReceiver",
222
- "type": "address"
223
- },
224
- {
225
- "internalType": "address",
226
- "name": "market",
227
- "type": "address"
228
- },
229
- {
230
- "internalType": "address",
231
- "name": "initialCollateralToken",
232
- "type": "address"
233
- },
234
- {
235
- "internalType": "address[]",
236
- "name": "swapPath",
237
- "type": "address[]"
238
- }
239
- ],
240
- "internalType": "struct IBaseOrderUtils.CreateOrderParamsAddresses",
241
- "name": "addresses",
242
- "type": "tuple"
243
- },
244
- {
245
- "components": [
246
- {
247
- "internalType": "uint256",
248
- "name": "sizeDeltaUsd",
249
- "type": "uint256"
250
- },
251
- {
252
- "internalType": "uint256",
253
- "name": "initialCollateralDeltaAmount",
254
- "type": "uint256"
255
- },
256
- {
257
- "internalType": "uint256",
258
- "name": "triggerPrice",
259
- "type": "uint256"
260
- },
261
- {
262
- "internalType": "uint256",
263
- "name": "acceptablePrice",
264
- "type": "uint256"
265
- },
266
- {
267
- "internalType": "uint256",
268
- "name": "executionFee",
269
- "type": "uint256"
270
- },
271
- {
272
- "internalType": "uint256",
273
- "name": "callbackGasLimit",
274
- "type": "uint256"
275
- },
276
- {
277
- "internalType": "uint256",
278
- "name": "minOutputAmount",
279
- "type": "uint256"
280
- }
281
- ],
282
- "internalType": "struct IBaseOrderUtils.CreateOrderParamsNumbers",
283
- "name": "numbers",
284
- "type": "tuple"
285
- },
286
- {
287
- "internalType": "enum Order.OrderType",
288
- "name": "orderType",
289
- "type": "uint8"
290
- },
291
- {
292
- "internalType": "enum Order.DecreasePositionSwapType",
293
- "name": "decreasePositionSwapType",
294
- "type": "uint8"
295
- },
296
- {
297
- "internalType": "bool",
298
- "name": "isLong",
299
- "type": "bool"
300
- },
301
- {
302
- "internalType": "bool",
303
- "name": "shouldUnwrapNativeToken",
304
- "type": "bool"
305
- },
306
- {
307
- "internalType": "bool",
308
- "name": "autoCancel",
309
- "type": "bool"
310
- },
311
- {
312
- "internalType": "bytes32",
313
- "name": "referralCode",
314
- "type": "bytes32"
315
- }
316
- ],
317
- "internalType": "struct IBaseOrderUtils.CreateOrderParams",
318
- "name": "params",
319
- "type": "tuple"
320
- }
321
- ],
322
- "name": "createOrder",
323
- "outputs": [
324
- {
325
- "internalType": "bytes32",
326
- "name": "",
327
- "type": "bytes32"
328
- }
329
- ],
330
- "stateMutability": "payable",
331
- "type": "function"
332
- },
333
- {
334
- "inputs": [],
335
- "name": "dataStore",
336
- "outputs": [
337
- {
338
- "internalType": "contract DataStore",
339
- "name": "",
340
- "type": "address"
341
- }
342
- ],
343
- "stateMutability": "view",
344
- "type": "function"
345
- },
346
- {
347
- "inputs": [],
348
- "name": "eventEmitter",
349
- "outputs": [
350
- {
351
- "internalType": "contract EventEmitter",
352
- "name": "",
353
- "type": "address"
354
- }
355
- ],
356
- "stateMutability": "view",
357
- "type": "function"
358
- },
359
- {
360
- "inputs": [
361
- {
362
- "internalType": "bytes[]",
363
- "name": "data",
364
- "type": "bytes[]"
365
- }
366
- ],
367
- "name": "multicall",
368
- "outputs": [
369
- {
370
- "internalType": "bytes[]",
371
- "name": "results",
372
- "type": "bytes[]"
373
- }
374
- ],
375
- "stateMutability": "payable",
376
- "type": "function"
377
- },
378
- {
379
- "inputs": [],
380
- "name": "orderHandler",
381
- "outputs": [
382
- {
383
- "internalType": "contract IOrderHandler",
384
- "name": "",
385
- "type": "address"
386
- }
387
- ],
388
- "stateMutability": "view",
389
- "type": "function"
390
- },
391
- {
392
- "inputs": [],
393
- "name": "orderVault",
394
- "outputs": [
395
- {
396
- "internalType": "contract OrderVault",
397
- "name": "",
398
- "type": "address"
399
- }
400
- ],
401
- "stateMutability": "view",
402
- "type": "function"
403
- },
404
- {
405
- "inputs": [
406
- {
407
- "internalType": "address",
408
- "name": "subaccount",
409
- "type": "address"
410
- }
411
- ],
412
- "name": "removeSubaccount",
413
- "outputs": [],
414
- "stateMutability": "payable",
415
- "type": "function"
416
- },
417
- {
418
- "inputs": [],
419
- "name": "roleStore",
420
- "outputs": [
421
- {
422
- "internalType": "contract RoleStore",
423
- "name": "",
424
- "type": "address"
425
- }
426
- ],
427
- "stateMutability": "view",
428
- "type": "function"
429
- },
430
- {
431
- "inputs": [],
432
- "name": "router",
433
- "outputs": [
434
- {
435
- "internalType": "contract Router",
436
- "name": "",
437
- "type": "address"
438
- }
439
- ],
440
- "stateMutability": "view",
441
- "type": "function"
442
- },
443
- {
444
- "inputs": [
445
- {
446
- "internalType": "address",
447
- "name": "receiver",
448
- "type": "address"
449
- },
450
- {
451
- "internalType": "uint256",
452
- "name": "amount",
453
- "type": "uint256"
454
- }
455
- ],
456
- "name": "sendNativeToken",
457
- "outputs": [],
458
- "stateMutability": "payable",
459
- "type": "function"
460
- },
461
- {
462
- "inputs": [
463
- {
464
- "internalType": "address",
465
- "name": "token",
466
- "type": "address"
467
- },
468
- {
469
- "internalType": "address",
470
- "name": "receiver",
471
- "type": "address"
472
- },
473
- {
474
- "internalType": "uint256",
475
- "name": "amount",
476
- "type": "uint256"
477
- }
478
- ],
479
- "name": "sendTokens",
480
- "outputs": [],
481
- "stateMutability": "payable",
482
- "type": "function"
483
- },
484
- {
485
- "inputs": [
486
- {
487
- "internalType": "address",
488
- "name": "receiver",
489
- "type": "address"
490
- },
491
- {
492
- "internalType": "uint256",
493
- "name": "amount",
494
- "type": "uint256"
495
- }
496
- ],
497
- "name": "sendWnt",
498
- "outputs": [],
499
- "stateMutability": "payable",
500
- "type": "function"
501
- },
502
- {
503
- "inputs": [
504
- {
505
- "internalType": "address",
506
- "name": "subaccount",
507
- "type": "address"
508
- },
509
- {
510
- "internalType": "bytes32",
511
- "name": "actionType",
512
- "type": "bytes32"
513
- },
514
- {
515
- "internalType": "uint256",
516
- "name": "maxAllowedCount",
517
- "type": "uint256"
518
- }
519
- ],
520
- "name": "setMaxAllowedSubaccountActionCount",
521
- "outputs": [],
522
- "stateMutability": "payable",
523
- "type": "function"
524
- },
525
- {
526
- "inputs": [
527
- {
528
- "internalType": "address",
529
- "name": "subaccount",
530
- "type": "address"
531
- },
532
- {
533
- "internalType": "uint256",
534
- "name": "amount",
535
- "type": "uint256"
536
- }
537
- ],
538
- "name": "setSubaccountAutoTopUpAmount",
539
- "outputs": [],
540
- "stateMutability": "payable",
541
- "type": "function"
542
- },
543
- {
544
- "inputs": [
545
- {
546
- "internalType": "bytes32",
547
- "name": "key",
548
- "type": "bytes32"
549
- },
550
- {
551
- "internalType": "uint256",
552
- "name": "sizeDeltaUsd",
553
- "type": "uint256"
554
- },
555
- {
556
- "internalType": "uint256",
557
- "name": "acceptablePrice",
558
- "type": "uint256"
559
- },
560
- {
561
- "internalType": "uint256",
562
- "name": "triggerPrice",
563
- "type": "uint256"
564
- },
565
- {
566
- "internalType": "uint256",
567
- "name": "minOutputAmount",
568
- "type": "uint256"
569
- },
570
- {
571
- "internalType": "bool",
572
- "name": "autoCancel",
573
- "type": "bool"
574
- }
575
- ],
576
- "name": "updateOrder",
577
- "outputs": [],
578
- "stateMutability": "payable",
579
- "type": "function"
580
- },
581
- {
582
- "stateMutability": "payable",
583
- "type": "receive"
584
- }
585
- ],
586
- "transactionHash": "0xe5b71c86f938f547820ca3262678fb70c379c15ef02430fbb773ee4d37e86e09",
587
- "receipt": {
588
- "to": null,
589
- "from": "0xE7BfFf2aB721264887230037940490351700a068",
590
- "contractAddress": "0xe5485a4fD6527911e9b82A75A1bFEd6e47BE2241",
591
- "transactionIndex": 0,
592
- "gasUsed": "3707710",
593
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
594
- "blockHash": "0x00c9beda5865106776abea90f56310f05628852d29d91b7c235c44a20123b601",
595
- "transactionHash": "0xe5b71c86f938f547820ca3262678fb70c379c15ef02430fbb773ee4d37e86e09",
596
- "logs": [],
597
- "blockNumber": 46822607,
598
- "cumulativeGasUsed": "3707710",
599
- "status": 1,
600
- "byzantium": true
601
- },
602
- "args": [
603
- "0x820F5FfC5b525cD4d88Cd91aCf2c28F16530Cc68",
604
- "0xA44F830B6a2B6fa76657a3B92C1fe74fcB7C6AfD",
605
- "0x2F0b22339414ADeD7D5F06f9D604c7fF5b2fe3f6",
606
- "0xDb17B211c34240B014ab6d61d4A31FA0C0e20c26",
607
- "0x32A0258007a6ea78265a5AE4DBb28f176be4a8EB",
608
- "0xD3D60D22d415aD43b7e64b510D86A30f19B1B12C"
609
- ],
610
- "numDeployments": 3,
611
- "solcInputHash": "95ed34927f843d6700c121bcc6faf594",
612
- "libraries": {
613
- "OrderStoreUtils": "0x805a15bf16582eC8d76841062A47dFfEa7903131"
614
- },
615
- "devdoc": {
616
- "kind": "dev",
617
- "methods": {
618
- "multicall(bytes[])": {
619
- "details": "Receives and executes a batch of function calls on this contract."
620
- }
621
- },
622
- "version": 1
623
- },
624
- "userdoc": {
625
- "kind": "user",
626
- "methods": {},
627
- "version": 1
628
- },
629
- "storageLayout": {
630
- "storage": [
631
- {
632
- "astId": 115,
633
- "contract": "contracts/router/SubaccountRouter.sol:SubaccountRouter",
634
- "label": "_status",
635
- "offset": 0,
636
- "slot": "0",
637
- "type": "t_uint256"
638
- }
639
- ],
640
- "types": {
641
- "t_uint256": {
642
- "encoding": "inplace",
643
- "label": "uint256",
644
- "numberOfBytes": "32"
645
- }
646
- }
647
- }
648
- }