nado-protocol 0.1.0__py3-none-any.whl

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 (78) hide show
  1. nado_protocol/__init__.py +0 -0
  2. nado_protocol/client/__init__.py +200 -0
  3. nado_protocol/client/apis/__init__.py +26 -0
  4. nado_protocol/client/apis/base.py +42 -0
  5. nado_protocol/client/apis/market/__init__.py +23 -0
  6. nado_protocol/client/apis/market/execute.py +192 -0
  7. nado_protocol/client/apis/market/query.py +310 -0
  8. nado_protocol/client/apis/perp/__init__.py +18 -0
  9. nado_protocol/client/apis/perp/query.py +30 -0
  10. nado_protocol/client/apis/rewards/__init__.py +6 -0
  11. nado_protocol/client/apis/rewards/execute.py +131 -0
  12. nado_protocol/client/apis/rewards/query.py +12 -0
  13. nado_protocol/client/apis/spot/__init__.py +23 -0
  14. nado_protocol/client/apis/spot/base.py +32 -0
  15. nado_protocol/client/apis/spot/execute.py +117 -0
  16. nado_protocol/client/apis/spot/query.py +79 -0
  17. nado_protocol/client/apis/subaccount/__init__.py +24 -0
  18. nado_protocol/client/apis/subaccount/execute.py +54 -0
  19. nado_protocol/client/apis/subaccount/query.py +145 -0
  20. nado_protocol/client/context.py +90 -0
  21. nado_protocol/contracts/__init__.py +377 -0
  22. nado_protocol/contracts/abis/Endpoint.json +636 -0
  23. nado_protocol/contracts/abis/FQuerier.json +1909 -0
  24. nado_protocol/contracts/abis/IClearinghouse.json +876 -0
  25. nado_protocol/contracts/abis/IERC20.json +185 -0
  26. nado_protocol/contracts/abis/IEndpoint.json +250 -0
  27. nado_protocol/contracts/abis/IFoundationRewardsAirdrop.json +76 -0
  28. nado_protocol/contracts/abis/IOffchainBook.json +536 -0
  29. nado_protocol/contracts/abis/IPerpEngine.json +931 -0
  30. nado_protocol/contracts/abis/IProductEngine.json +352 -0
  31. nado_protocol/contracts/abis/ISpotEngine.json +813 -0
  32. nado_protocol/contracts/abis/IStaking.json +288 -0
  33. nado_protocol/contracts/abis/IVrtxAirdrop.json +138 -0
  34. nado_protocol/contracts/abis/MockERC20.json +311 -0
  35. nado_protocol/contracts/deployments/deployment.test.json +18 -0
  36. nado_protocol/contracts/eip712/__init__.py +16 -0
  37. nado_protocol/contracts/eip712/domain.py +36 -0
  38. nado_protocol/contracts/eip712/sign.py +79 -0
  39. nado_protocol/contracts/eip712/types.py +154 -0
  40. nado_protocol/contracts/loader.py +55 -0
  41. nado_protocol/contracts/types.py +141 -0
  42. nado_protocol/engine_client/__init__.py +35 -0
  43. nado_protocol/engine_client/execute.py +416 -0
  44. nado_protocol/engine_client/query.py +481 -0
  45. nado_protocol/engine_client/types/__init__.py +113 -0
  46. nado_protocol/engine_client/types/execute.py +680 -0
  47. nado_protocol/engine_client/types/models.py +247 -0
  48. nado_protocol/engine_client/types/query.py +516 -0
  49. nado_protocol/engine_client/types/stream.py +6 -0
  50. nado_protocol/indexer_client/__init__.py +28 -0
  51. nado_protocol/indexer_client/query.py +466 -0
  52. nado_protocol/indexer_client/types/__init__.py +122 -0
  53. nado_protocol/indexer_client/types/models.py +364 -0
  54. nado_protocol/indexer_client/types/query.py +819 -0
  55. nado_protocol/trigger_client/__init__.py +17 -0
  56. nado_protocol/trigger_client/execute.py +118 -0
  57. nado_protocol/trigger_client/query.py +61 -0
  58. nado_protocol/trigger_client/types/__init__.py +7 -0
  59. nado_protocol/trigger_client/types/execute.py +89 -0
  60. nado_protocol/trigger_client/types/models.py +44 -0
  61. nado_protocol/trigger_client/types/query.py +77 -0
  62. nado_protocol/utils/__init__.py +37 -0
  63. nado_protocol/utils/backend.py +111 -0
  64. nado_protocol/utils/bytes32.py +159 -0
  65. nado_protocol/utils/enum.py +6 -0
  66. nado_protocol/utils/exceptions.py +58 -0
  67. nado_protocol/utils/execute.py +403 -0
  68. nado_protocol/utils/expiration.py +45 -0
  69. nado_protocol/utils/interest.py +66 -0
  70. nado_protocol/utils/math.py +67 -0
  71. nado_protocol/utils/model.py +79 -0
  72. nado_protocol/utils/nonce.py +33 -0
  73. nado_protocol/utils/subaccount.py +18 -0
  74. nado_protocol/utils/time.py +21 -0
  75. nado_protocol-0.1.0.dist-info/METADATA +157 -0
  76. nado_protocol-0.1.0.dist-info/RECORD +78 -0
  77. nado_protocol-0.1.0.dist-info/WHEEL +4 -0
  78. nado_protocol-0.1.0.dist-info/entry_points.txt +11 -0
@@ -0,0 +1,1909 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "int256",
6
+ "name": "x",
7
+ "type": "int256"
8
+ }
9
+ ],
10
+ "name": "PRBMathSD59x18__SqrtNegativeInput",
11
+ "type": "error"
12
+ },
13
+ {
14
+ "inputs": [
15
+ {
16
+ "internalType": "int256",
17
+ "name": "x",
18
+ "type": "int256"
19
+ }
20
+ ],
21
+ "name": "PRBMathSD59x18__SqrtOverflow",
22
+ "type": "error"
23
+ },
24
+ {
25
+ "inputs": [],
26
+ "name": "getAllProducts",
27
+ "outputs": [
28
+ {
29
+ "components": [
30
+ {
31
+ "components": [
32
+ {
33
+ "internalType": "uint32",
34
+ "name": "productId",
35
+ "type": "uint32"
36
+ },
37
+ {
38
+ "internalType": "int128",
39
+ "name": "oraclePriceX18",
40
+ "type": "int128"
41
+ },
42
+ {
43
+ "components": [
44
+ {
45
+ "internalType": "int128",
46
+ "name": "longWeightInitialX18",
47
+ "type": "int128"
48
+ },
49
+ {
50
+ "internalType": "int128",
51
+ "name": "shortWeightInitialX18",
52
+ "type": "int128"
53
+ },
54
+ {
55
+ "internalType": "int128",
56
+ "name": "longWeightMaintenanceX18",
57
+ "type": "int128"
58
+ },
59
+ {
60
+ "internalType": "int128",
61
+ "name": "shortWeightMaintenanceX18",
62
+ "type": "int128"
63
+ },
64
+ {
65
+ "internalType": "int128",
66
+ "name": "largePositionPenaltyX18",
67
+ "type": "int128"
68
+ }
69
+ ],
70
+ "internalType": "struct RiskHelper.Risk",
71
+ "name": "risk",
72
+ "type": "tuple"
73
+ },
74
+ {
75
+ "components": [
76
+ {
77
+ "internalType": "address",
78
+ "name": "token",
79
+ "type": "address"
80
+ },
81
+ {
82
+ "internalType": "int128",
83
+ "name": "interestInflectionUtilX18",
84
+ "type": "int128"
85
+ },
86
+ {
87
+ "internalType": "int128",
88
+ "name": "interestFloorX18",
89
+ "type": "int128"
90
+ },
91
+ {
92
+ "internalType": "int128",
93
+ "name": "interestSmallCapX18",
94
+ "type": "int128"
95
+ },
96
+ {
97
+ "internalType": "int128",
98
+ "name": "interestLargeCapX18",
99
+ "type": "int128"
100
+ }
101
+ ],
102
+ "internalType": "struct ISpotEngine.Config",
103
+ "name": "config",
104
+ "type": "tuple"
105
+ },
106
+ {
107
+ "components": [
108
+ {
109
+ "internalType": "int128",
110
+ "name": "cumulativeDepositsMultiplierX18",
111
+ "type": "int128"
112
+ },
113
+ {
114
+ "internalType": "int128",
115
+ "name": "cumulativeBorrowsMultiplierX18",
116
+ "type": "int128"
117
+ },
118
+ {
119
+ "internalType": "int128",
120
+ "name": "totalDepositsNormalized",
121
+ "type": "int128"
122
+ },
123
+ {
124
+ "internalType": "int128",
125
+ "name": "totalBorrowsNormalized",
126
+ "type": "int128"
127
+ }
128
+ ],
129
+ "internalType": "struct ISpotEngine.State",
130
+ "name": "state",
131
+ "type": "tuple"
132
+ },
133
+ {
134
+ "components": [
135
+ {
136
+ "internalType": "int128",
137
+ "name": "supply",
138
+ "type": "int128"
139
+ },
140
+ {
141
+ "components": [
142
+ {
143
+ "internalType": "int128",
144
+ "name": "amount",
145
+ "type": "int128"
146
+ },
147
+ {
148
+ "internalType": "int128",
149
+ "name": "lastCumulativeMultiplierX18",
150
+ "type": "int128"
151
+ }
152
+ ],
153
+ "internalType": "struct ISpotEngine.Balance",
154
+ "name": "quote",
155
+ "type": "tuple"
156
+ },
157
+ {
158
+ "components": [
159
+ {
160
+ "internalType": "int128",
161
+ "name": "amount",
162
+ "type": "int128"
163
+ },
164
+ {
165
+ "internalType": "int128",
166
+ "name": "lastCumulativeMultiplierX18",
167
+ "type": "int128"
168
+ }
169
+ ],
170
+ "internalType": "struct ISpotEngine.Balance",
171
+ "name": "base",
172
+ "type": "tuple"
173
+ }
174
+ ],
175
+ "internalType": "struct ISpotEngine.LpState",
176
+ "name": "lpState",
177
+ "type": "tuple"
178
+ },
179
+ {
180
+ "components": [
181
+ {
182
+ "internalType": "int128",
183
+ "name": "sizeIncrement",
184
+ "type": "int128"
185
+ },
186
+ {
187
+ "internalType": "int128",
188
+ "name": "priceIncrementX18",
189
+ "type": "int128"
190
+ },
191
+ {
192
+ "internalType": "int128",
193
+ "name": "minSize",
194
+ "type": "int128"
195
+ },
196
+ {
197
+ "internalType": "int128",
198
+ "name": "collectedFees",
199
+ "type": "int128"
200
+ },
201
+ {
202
+ "internalType": "int128",
203
+ "name": "lpSpreadX18",
204
+ "type": "int128"
205
+ }
206
+ ],
207
+ "internalType": "struct FQuerier.BookInfo",
208
+ "name": "bookInfo",
209
+ "type": "tuple"
210
+ }
211
+ ],
212
+ "internalType": "struct FQuerier.SpotProduct[]",
213
+ "name": "spotProducts",
214
+ "type": "tuple[]"
215
+ },
216
+ {
217
+ "components": [
218
+ {
219
+ "internalType": "uint32",
220
+ "name": "productId",
221
+ "type": "uint32"
222
+ },
223
+ {
224
+ "internalType": "int128",
225
+ "name": "oraclePriceX18",
226
+ "type": "int128"
227
+ },
228
+ {
229
+ "components": [
230
+ {
231
+ "internalType": "int128",
232
+ "name": "longWeightInitialX18",
233
+ "type": "int128"
234
+ },
235
+ {
236
+ "internalType": "int128",
237
+ "name": "shortWeightInitialX18",
238
+ "type": "int128"
239
+ },
240
+ {
241
+ "internalType": "int128",
242
+ "name": "longWeightMaintenanceX18",
243
+ "type": "int128"
244
+ },
245
+ {
246
+ "internalType": "int128",
247
+ "name": "shortWeightMaintenanceX18",
248
+ "type": "int128"
249
+ },
250
+ {
251
+ "internalType": "int128",
252
+ "name": "largePositionPenaltyX18",
253
+ "type": "int128"
254
+ }
255
+ ],
256
+ "internalType": "struct RiskHelper.Risk",
257
+ "name": "risk",
258
+ "type": "tuple"
259
+ },
260
+ {
261
+ "components": [
262
+ {
263
+ "internalType": "int128",
264
+ "name": "cumulativeFundingLongX18",
265
+ "type": "int128"
266
+ },
267
+ {
268
+ "internalType": "int128",
269
+ "name": "cumulativeFundingShortX18",
270
+ "type": "int128"
271
+ },
272
+ {
273
+ "internalType": "int128",
274
+ "name": "availableSettle",
275
+ "type": "int128"
276
+ },
277
+ {
278
+ "internalType": "int128",
279
+ "name": "openInterest",
280
+ "type": "int128"
281
+ }
282
+ ],
283
+ "internalType": "struct IPerpEngine.State",
284
+ "name": "state",
285
+ "type": "tuple"
286
+ },
287
+ {
288
+ "components": [
289
+ {
290
+ "internalType": "int128",
291
+ "name": "supply",
292
+ "type": "int128"
293
+ },
294
+ {
295
+ "internalType": "int128",
296
+ "name": "lastCumulativeFundingX18",
297
+ "type": "int128"
298
+ },
299
+ {
300
+ "internalType": "int128",
301
+ "name": "cumulativeFundingPerLpX18",
302
+ "type": "int128"
303
+ },
304
+ {
305
+ "internalType": "int128",
306
+ "name": "base",
307
+ "type": "int128"
308
+ },
309
+ {
310
+ "internalType": "int128",
311
+ "name": "quote",
312
+ "type": "int128"
313
+ }
314
+ ],
315
+ "internalType": "struct IPerpEngine.LpState",
316
+ "name": "lpState",
317
+ "type": "tuple"
318
+ },
319
+ {
320
+ "components": [
321
+ {
322
+ "internalType": "int128",
323
+ "name": "sizeIncrement",
324
+ "type": "int128"
325
+ },
326
+ {
327
+ "internalType": "int128",
328
+ "name": "priceIncrementX18",
329
+ "type": "int128"
330
+ },
331
+ {
332
+ "internalType": "int128",
333
+ "name": "minSize",
334
+ "type": "int128"
335
+ },
336
+ {
337
+ "internalType": "int128",
338
+ "name": "collectedFees",
339
+ "type": "int128"
340
+ },
341
+ {
342
+ "internalType": "int128",
343
+ "name": "lpSpreadX18",
344
+ "type": "int128"
345
+ }
346
+ ],
347
+ "internalType": "struct FQuerier.BookInfo",
348
+ "name": "bookInfo",
349
+ "type": "tuple"
350
+ }
351
+ ],
352
+ "internalType": "struct FQuerier.PerpProduct[]",
353
+ "name": "perpProducts",
354
+ "type": "tuple[]"
355
+ }
356
+ ],
357
+ "internalType": "struct FQuerier.ProductInfo",
358
+ "name": "",
359
+ "type": "tuple"
360
+ }
361
+ ],
362
+ "stateMutability": "view",
363
+ "type": "function"
364
+ },
365
+ {
366
+ "inputs": [
367
+ {
368
+ "internalType": "uint32",
369
+ "name": "productId",
370
+ "type": "uint32"
371
+ },
372
+ {
373
+ "internalType": "contract IProductEngine",
374
+ "name": "engine",
375
+ "type": "address"
376
+ }
377
+ ],
378
+ "name": "getBookInfo",
379
+ "outputs": [
380
+ {
381
+ "components": [
382
+ {
383
+ "internalType": "int128",
384
+ "name": "sizeIncrement",
385
+ "type": "int128"
386
+ },
387
+ {
388
+ "internalType": "int128",
389
+ "name": "priceIncrementX18",
390
+ "type": "int128"
391
+ },
392
+ {
393
+ "internalType": "int128",
394
+ "name": "minSize",
395
+ "type": "int128"
396
+ },
397
+ {
398
+ "internalType": "int128",
399
+ "name": "collectedFees",
400
+ "type": "int128"
401
+ },
402
+ {
403
+ "internalType": "int128",
404
+ "name": "lpSpreadX18",
405
+ "type": "int128"
406
+ }
407
+ ],
408
+ "internalType": "struct FQuerier.BookInfo",
409
+ "name": "bookInfo",
410
+ "type": "tuple"
411
+ }
412
+ ],
413
+ "stateMutability": "view",
414
+ "type": "function"
415
+ },
416
+ {
417
+ "inputs": [],
418
+ "name": "getClearinghouse",
419
+ "outputs": [
420
+ {
421
+ "internalType": "address",
422
+ "name": "",
423
+ "type": "address"
424
+ }
425
+ ],
426
+ "stateMutability": "view",
427
+ "type": "function"
428
+ },
429
+ {
430
+ "inputs": [
431
+ {
432
+ "internalType": "bytes32",
433
+ "name": "subaccount",
434
+ "type": "bytes32"
435
+ },
436
+ {
437
+ "internalType": "uint32",
438
+ "name": "productId",
439
+ "type": "uint32"
440
+ }
441
+ ],
442
+ "name": "getPerpBalance",
443
+ "outputs": [
444
+ {
445
+ "components": [
446
+ {
447
+ "internalType": "uint32",
448
+ "name": "productId",
449
+ "type": "uint32"
450
+ },
451
+ {
452
+ "components": [
453
+ {
454
+ "internalType": "int128",
455
+ "name": "amount",
456
+ "type": "int128"
457
+ },
458
+ {
459
+ "internalType": "int128",
460
+ "name": "lastCumulativeFundingX18",
461
+ "type": "int128"
462
+ }
463
+ ],
464
+ "internalType": "struct IPerpEngine.LpBalance",
465
+ "name": "lpBalance",
466
+ "type": "tuple"
467
+ },
468
+ {
469
+ "components": [
470
+ {
471
+ "internalType": "int128",
472
+ "name": "amount",
473
+ "type": "int128"
474
+ },
475
+ {
476
+ "internalType": "int128",
477
+ "name": "vQuoteBalance",
478
+ "type": "int128"
479
+ },
480
+ {
481
+ "internalType": "int128",
482
+ "name": "lastCumulativeFundingX18",
483
+ "type": "int128"
484
+ }
485
+ ],
486
+ "internalType": "struct IPerpEngine.Balance",
487
+ "name": "balance",
488
+ "type": "tuple"
489
+ }
490
+ ],
491
+ "internalType": "struct FQuerier.PerpBalance",
492
+ "name": "",
493
+ "type": "tuple"
494
+ }
495
+ ],
496
+ "stateMutability": "view",
497
+ "type": "function"
498
+ },
499
+ {
500
+ "inputs": [
501
+ {
502
+ "internalType": "bytes32",
503
+ "name": "subaccount",
504
+ "type": "bytes32"
505
+ },
506
+ {
507
+ "internalType": "uint32[]",
508
+ "name": "productIds",
509
+ "type": "uint32[]"
510
+ }
511
+ ],
512
+ "name": "getPerpBalances",
513
+ "outputs": [
514
+ {
515
+ "components": [
516
+ {
517
+ "internalType": "uint32",
518
+ "name": "productId",
519
+ "type": "uint32"
520
+ },
521
+ {
522
+ "components": [
523
+ {
524
+ "internalType": "int128",
525
+ "name": "amount",
526
+ "type": "int128"
527
+ },
528
+ {
529
+ "internalType": "int128",
530
+ "name": "lastCumulativeFundingX18",
531
+ "type": "int128"
532
+ }
533
+ ],
534
+ "internalType": "struct IPerpEngine.LpBalance",
535
+ "name": "lpBalance",
536
+ "type": "tuple"
537
+ },
538
+ {
539
+ "components": [
540
+ {
541
+ "internalType": "int128",
542
+ "name": "amount",
543
+ "type": "int128"
544
+ },
545
+ {
546
+ "internalType": "int128",
547
+ "name": "vQuoteBalance",
548
+ "type": "int128"
549
+ },
550
+ {
551
+ "internalType": "int128",
552
+ "name": "lastCumulativeFundingX18",
553
+ "type": "int128"
554
+ }
555
+ ],
556
+ "internalType": "struct IPerpEngine.Balance",
557
+ "name": "balance",
558
+ "type": "tuple"
559
+ }
560
+ ],
561
+ "internalType": "struct FQuerier.PerpBalance[]",
562
+ "name": "perpBalances",
563
+ "type": "tuple[]"
564
+ }
565
+ ],
566
+ "stateMutability": "view",
567
+ "type": "function"
568
+ },
569
+ {
570
+ "inputs": [
571
+ {
572
+ "internalType": "uint32",
573
+ "name": "productId",
574
+ "type": "uint32"
575
+ }
576
+ ],
577
+ "name": "getPerpProduct",
578
+ "outputs": [
579
+ {
580
+ "components": [
581
+ {
582
+ "internalType": "uint32",
583
+ "name": "productId",
584
+ "type": "uint32"
585
+ },
586
+ {
587
+ "internalType": "int128",
588
+ "name": "oraclePriceX18",
589
+ "type": "int128"
590
+ },
591
+ {
592
+ "components": [
593
+ {
594
+ "internalType": "int128",
595
+ "name": "longWeightInitialX18",
596
+ "type": "int128"
597
+ },
598
+ {
599
+ "internalType": "int128",
600
+ "name": "shortWeightInitialX18",
601
+ "type": "int128"
602
+ },
603
+ {
604
+ "internalType": "int128",
605
+ "name": "longWeightMaintenanceX18",
606
+ "type": "int128"
607
+ },
608
+ {
609
+ "internalType": "int128",
610
+ "name": "shortWeightMaintenanceX18",
611
+ "type": "int128"
612
+ },
613
+ {
614
+ "internalType": "int128",
615
+ "name": "largePositionPenaltyX18",
616
+ "type": "int128"
617
+ }
618
+ ],
619
+ "internalType": "struct RiskHelper.Risk",
620
+ "name": "risk",
621
+ "type": "tuple"
622
+ },
623
+ {
624
+ "components": [
625
+ {
626
+ "internalType": "int128",
627
+ "name": "cumulativeFundingLongX18",
628
+ "type": "int128"
629
+ },
630
+ {
631
+ "internalType": "int128",
632
+ "name": "cumulativeFundingShortX18",
633
+ "type": "int128"
634
+ },
635
+ {
636
+ "internalType": "int128",
637
+ "name": "availableSettle",
638
+ "type": "int128"
639
+ },
640
+ {
641
+ "internalType": "int128",
642
+ "name": "openInterest",
643
+ "type": "int128"
644
+ }
645
+ ],
646
+ "internalType": "struct IPerpEngine.State",
647
+ "name": "state",
648
+ "type": "tuple"
649
+ },
650
+ {
651
+ "components": [
652
+ {
653
+ "internalType": "int128",
654
+ "name": "supply",
655
+ "type": "int128"
656
+ },
657
+ {
658
+ "internalType": "int128",
659
+ "name": "lastCumulativeFundingX18",
660
+ "type": "int128"
661
+ },
662
+ {
663
+ "internalType": "int128",
664
+ "name": "cumulativeFundingPerLpX18",
665
+ "type": "int128"
666
+ },
667
+ {
668
+ "internalType": "int128",
669
+ "name": "base",
670
+ "type": "int128"
671
+ },
672
+ {
673
+ "internalType": "int128",
674
+ "name": "quote",
675
+ "type": "int128"
676
+ }
677
+ ],
678
+ "internalType": "struct IPerpEngine.LpState",
679
+ "name": "lpState",
680
+ "type": "tuple"
681
+ },
682
+ {
683
+ "components": [
684
+ {
685
+ "internalType": "int128",
686
+ "name": "sizeIncrement",
687
+ "type": "int128"
688
+ },
689
+ {
690
+ "internalType": "int128",
691
+ "name": "priceIncrementX18",
692
+ "type": "int128"
693
+ },
694
+ {
695
+ "internalType": "int128",
696
+ "name": "minSize",
697
+ "type": "int128"
698
+ },
699
+ {
700
+ "internalType": "int128",
701
+ "name": "collectedFees",
702
+ "type": "int128"
703
+ },
704
+ {
705
+ "internalType": "int128",
706
+ "name": "lpSpreadX18",
707
+ "type": "int128"
708
+ }
709
+ ],
710
+ "internalType": "struct FQuerier.BookInfo",
711
+ "name": "bookInfo",
712
+ "type": "tuple"
713
+ }
714
+ ],
715
+ "internalType": "struct FQuerier.PerpProduct",
716
+ "name": "",
717
+ "type": "tuple"
718
+ }
719
+ ],
720
+ "stateMutability": "view",
721
+ "type": "function"
722
+ },
723
+ {
724
+ "inputs": [
725
+ {
726
+ "internalType": "uint32[]",
727
+ "name": "productIds",
728
+ "type": "uint32[]"
729
+ }
730
+ ],
731
+ "name": "getPerpProducts",
732
+ "outputs": [
733
+ {
734
+ "components": [
735
+ {
736
+ "internalType": "uint32",
737
+ "name": "productId",
738
+ "type": "uint32"
739
+ },
740
+ {
741
+ "internalType": "int128",
742
+ "name": "oraclePriceX18",
743
+ "type": "int128"
744
+ },
745
+ {
746
+ "components": [
747
+ {
748
+ "internalType": "int128",
749
+ "name": "longWeightInitialX18",
750
+ "type": "int128"
751
+ },
752
+ {
753
+ "internalType": "int128",
754
+ "name": "shortWeightInitialX18",
755
+ "type": "int128"
756
+ },
757
+ {
758
+ "internalType": "int128",
759
+ "name": "longWeightMaintenanceX18",
760
+ "type": "int128"
761
+ },
762
+ {
763
+ "internalType": "int128",
764
+ "name": "shortWeightMaintenanceX18",
765
+ "type": "int128"
766
+ },
767
+ {
768
+ "internalType": "int128",
769
+ "name": "largePositionPenaltyX18",
770
+ "type": "int128"
771
+ }
772
+ ],
773
+ "internalType": "struct RiskHelper.Risk",
774
+ "name": "risk",
775
+ "type": "tuple"
776
+ },
777
+ {
778
+ "components": [
779
+ {
780
+ "internalType": "int128",
781
+ "name": "cumulativeFundingLongX18",
782
+ "type": "int128"
783
+ },
784
+ {
785
+ "internalType": "int128",
786
+ "name": "cumulativeFundingShortX18",
787
+ "type": "int128"
788
+ },
789
+ {
790
+ "internalType": "int128",
791
+ "name": "availableSettle",
792
+ "type": "int128"
793
+ },
794
+ {
795
+ "internalType": "int128",
796
+ "name": "openInterest",
797
+ "type": "int128"
798
+ }
799
+ ],
800
+ "internalType": "struct IPerpEngine.State",
801
+ "name": "state",
802
+ "type": "tuple"
803
+ },
804
+ {
805
+ "components": [
806
+ {
807
+ "internalType": "int128",
808
+ "name": "supply",
809
+ "type": "int128"
810
+ },
811
+ {
812
+ "internalType": "int128",
813
+ "name": "lastCumulativeFundingX18",
814
+ "type": "int128"
815
+ },
816
+ {
817
+ "internalType": "int128",
818
+ "name": "cumulativeFundingPerLpX18",
819
+ "type": "int128"
820
+ },
821
+ {
822
+ "internalType": "int128",
823
+ "name": "base",
824
+ "type": "int128"
825
+ },
826
+ {
827
+ "internalType": "int128",
828
+ "name": "quote",
829
+ "type": "int128"
830
+ }
831
+ ],
832
+ "internalType": "struct IPerpEngine.LpState",
833
+ "name": "lpState",
834
+ "type": "tuple"
835
+ },
836
+ {
837
+ "components": [
838
+ {
839
+ "internalType": "int128",
840
+ "name": "sizeIncrement",
841
+ "type": "int128"
842
+ },
843
+ {
844
+ "internalType": "int128",
845
+ "name": "priceIncrementX18",
846
+ "type": "int128"
847
+ },
848
+ {
849
+ "internalType": "int128",
850
+ "name": "minSize",
851
+ "type": "int128"
852
+ },
853
+ {
854
+ "internalType": "int128",
855
+ "name": "collectedFees",
856
+ "type": "int128"
857
+ },
858
+ {
859
+ "internalType": "int128",
860
+ "name": "lpSpreadX18",
861
+ "type": "int128"
862
+ }
863
+ ],
864
+ "internalType": "struct FQuerier.BookInfo",
865
+ "name": "bookInfo",
866
+ "type": "tuple"
867
+ }
868
+ ],
869
+ "internalType": "struct FQuerier.PerpProduct[]",
870
+ "name": "perpProducts",
871
+ "type": "tuple[]"
872
+ }
873
+ ],
874
+ "stateMutability": "view",
875
+ "type": "function"
876
+ },
877
+ {
878
+ "inputs": [
879
+ {
880
+ "internalType": "bytes32",
881
+ "name": "subaccount",
882
+ "type": "bytes32"
883
+ },
884
+ {
885
+ "internalType": "uint32",
886
+ "name": "productId",
887
+ "type": "uint32"
888
+ }
889
+ ],
890
+ "name": "getSpotBalance",
891
+ "outputs": [
892
+ {
893
+ "components": [
894
+ {
895
+ "internalType": "uint32",
896
+ "name": "productId",
897
+ "type": "uint32"
898
+ },
899
+ {
900
+ "components": [
901
+ {
902
+ "internalType": "int128",
903
+ "name": "amount",
904
+ "type": "int128"
905
+ }
906
+ ],
907
+ "internalType": "struct ISpotEngine.LpBalance",
908
+ "name": "lpBalance",
909
+ "type": "tuple"
910
+ },
911
+ {
912
+ "components": [
913
+ {
914
+ "internalType": "int128",
915
+ "name": "amount",
916
+ "type": "int128"
917
+ },
918
+ {
919
+ "internalType": "int128",
920
+ "name": "lastCumulativeMultiplierX18",
921
+ "type": "int128"
922
+ }
923
+ ],
924
+ "internalType": "struct ISpotEngine.Balance",
925
+ "name": "balance",
926
+ "type": "tuple"
927
+ }
928
+ ],
929
+ "internalType": "struct FQuerier.SpotBalance",
930
+ "name": "",
931
+ "type": "tuple"
932
+ }
933
+ ],
934
+ "stateMutability": "view",
935
+ "type": "function"
936
+ },
937
+ {
938
+ "inputs": [
939
+ {
940
+ "internalType": "bytes32",
941
+ "name": "subaccount",
942
+ "type": "bytes32"
943
+ },
944
+ {
945
+ "internalType": "uint32[]",
946
+ "name": "productIds",
947
+ "type": "uint32[]"
948
+ }
949
+ ],
950
+ "name": "getSpotBalances",
951
+ "outputs": [
952
+ {
953
+ "components": [
954
+ {
955
+ "internalType": "uint32",
956
+ "name": "productId",
957
+ "type": "uint32"
958
+ },
959
+ {
960
+ "components": [
961
+ {
962
+ "internalType": "int128",
963
+ "name": "amount",
964
+ "type": "int128"
965
+ }
966
+ ],
967
+ "internalType": "struct ISpotEngine.LpBalance",
968
+ "name": "lpBalance",
969
+ "type": "tuple"
970
+ },
971
+ {
972
+ "components": [
973
+ {
974
+ "internalType": "int128",
975
+ "name": "amount",
976
+ "type": "int128"
977
+ },
978
+ {
979
+ "internalType": "int128",
980
+ "name": "lastCumulativeMultiplierX18",
981
+ "type": "int128"
982
+ }
983
+ ],
984
+ "internalType": "struct ISpotEngine.Balance",
985
+ "name": "balance",
986
+ "type": "tuple"
987
+ }
988
+ ],
989
+ "internalType": "struct FQuerier.SpotBalance[]",
990
+ "name": "spotBalances",
991
+ "type": "tuple[]"
992
+ }
993
+ ],
994
+ "stateMutability": "view",
995
+ "type": "function"
996
+ },
997
+ {
998
+ "inputs": [
999
+ {
1000
+ "internalType": "uint32",
1001
+ "name": "productId",
1002
+ "type": "uint32"
1003
+ }
1004
+ ],
1005
+ "name": "getSpotProduct",
1006
+ "outputs": [
1007
+ {
1008
+ "components": [
1009
+ {
1010
+ "internalType": "uint32",
1011
+ "name": "productId",
1012
+ "type": "uint32"
1013
+ },
1014
+ {
1015
+ "internalType": "int128",
1016
+ "name": "oraclePriceX18",
1017
+ "type": "int128"
1018
+ },
1019
+ {
1020
+ "components": [
1021
+ {
1022
+ "internalType": "int128",
1023
+ "name": "longWeightInitialX18",
1024
+ "type": "int128"
1025
+ },
1026
+ {
1027
+ "internalType": "int128",
1028
+ "name": "shortWeightInitialX18",
1029
+ "type": "int128"
1030
+ },
1031
+ {
1032
+ "internalType": "int128",
1033
+ "name": "longWeightMaintenanceX18",
1034
+ "type": "int128"
1035
+ },
1036
+ {
1037
+ "internalType": "int128",
1038
+ "name": "shortWeightMaintenanceX18",
1039
+ "type": "int128"
1040
+ },
1041
+ {
1042
+ "internalType": "int128",
1043
+ "name": "largePositionPenaltyX18",
1044
+ "type": "int128"
1045
+ }
1046
+ ],
1047
+ "internalType": "struct RiskHelper.Risk",
1048
+ "name": "risk",
1049
+ "type": "tuple"
1050
+ },
1051
+ {
1052
+ "components": [
1053
+ {
1054
+ "internalType": "address",
1055
+ "name": "token",
1056
+ "type": "address"
1057
+ },
1058
+ {
1059
+ "internalType": "int128",
1060
+ "name": "interestInflectionUtilX18",
1061
+ "type": "int128"
1062
+ },
1063
+ {
1064
+ "internalType": "int128",
1065
+ "name": "interestFloorX18",
1066
+ "type": "int128"
1067
+ },
1068
+ {
1069
+ "internalType": "int128",
1070
+ "name": "interestSmallCapX18",
1071
+ "type": "int128"
1072
+ },
1073
+ {
1074
+ "internalType": "int128",
1075
+ "name": "interestLargeCapX18",
1076
+ "type": "int128"
1077
+ }
1078
+ ],
1079
+ "internalType": "struct ISpotEngine.Config",
1080
+ "name": "config",
1081
+ "type": "tuple"
1082
+ },
1083
+ {
1084
+ "components": [
1085
+ {
1086
+ "internalType": "int128",
1087
+ "name": "cumulativeDepositsMultiplierX18",
1088
+ "type": "int128"
1089
+ },
1090
+ {
1091
+ "internalType": "int128",
1092
+ "name": "cumulativeBorrowsMultiplierX18",
1093
+ "type": "int128"
1094
+ },
1095
+ {
1096
+ "internalType": "int128",
1097
+ "name": "totalDepositsNormalized",
1098
+ "type": "int128"
1099
+ },
1100
+ {
1101
+ "internalType": "int128",
1102
+ "name": "totalBorrowsNormalized",
1103
+ "type": "int128"
1104
+ }
1105
+ ],
1106
+ "internalType": "struct ISpotEngine.State",
1107
+ "name": "state",
1108
+ "type": "tuple"
1109
+ },
1110
+ {
1111
+ "components": [
1112
+ {
1113
+ "internalType": "int128",
1114
+ "name": "supply",
1115
+ "type": "int128"
1116
+ },
1117
+ {
1118
+ "components": [
1119
+ {
1120
+ "internalType": "int128",
1121
+ "name": "amount",
1122
+ "type": "int128"
1123
+ },
1124
+ {
1125
+ "internalType": "int128",
1126
+ "name": "lastCumulativeMultiplierX18",
1127
+ "type": "int128"
1128
+ }
1129
+ ],
1130
+ "internalType": "struct ISpotEngine.Balance",
1131
+ "name": "quote",
1132
+ "type": "tuple"
1133
+ },
1134
+ {
1135
+ "components": [
1136
+ {
1137
+ "internalType": "int128",
1138
+ "name": "amount",
1139
+ "type": "int128"
1140
+ },
1141
+ {
1142
+ "internalType": "int128",
1143
+ "name": "lastCumulativeMultiplierX18",
1144
+ "type": "int128"
1145
+ }
1146
+ ],
1147
+ "internalType": "struct ISpotEngine.Balance",
1148
+ "name": "base",
1149
+ "type": "tuple"
1150
+ }
1151
+ ],
1152
+ "internalType": "struct ISpotEngine.LpState",
1153
+ "name": "lpState",
1154
+ "type": "tuple"
1155
+ },
1156
+ {
1157
+ "components": [
1158
+ {
1159
+ "internalType": "int128",
1160
+ "name": "sizeIncrement",
1161
+ "type": "int128"
1162
+ },
1163
+ {
1164
+ "internalType": "int128",
1165
+ "name": "priceIncrementX18",
1166
+ "type": "int128"
1167
+ },
1168
+ {
1169
+ "internalType": "int128",
1170
+ "name": "minSize",
1171
+ "type": "int128"
1172
+ },
1173
+ {
1174
+ "internalType": "int128",
1175
+ "name": "collectedFees",
1176
+ "type": "int128"
1177
+ },
1178
+ {
1179
+ "internalType": "int128",
1180
+ "name": "lpSpreadX18",
1181
+ "type": "int128"
1182
+ }
1183
+ ],
1184
+ "internalType": "struct FQuerier.BookInfo",
1185
+ "name": "bookInfo",
1186
+ "type": "tuple"
1187
+ }
1188
+ ],
1189
+ "internalType": "struct FQuerier.SpotProduct",
1190
+ "name": "",
1191
+ "type": "tuple"
1192
+ }
1193
+ ],
1194
+ "stateMutability": "view",
1195
+ "type": "function"
1196
+ },
1197
+ {
1198
+ "inputs": [
1199
+ {
1200
+ "internalType": "uint32[]",
1201
+ "name": "productIds",
1202
+ "type": "uint32[]"
1203
+ }
1204
+ ],
1205
+ "name": "getSpotProducts",
1206
+ "outputs": [
1207
+ {
1208
+ "components": [
1209
+ {
1210
+ "internalType": "uint32",
1211
+ "name": "productId",
1212
+ "type": "uint32"
1213
+ },
1214
+ {
1215
+ "internalType": "int128",
1216
+ "name": "oraclePriceX18",
1217
+ "type": "int128"
1218
+ },
1219
+ {
1220
+ "components": [
1221
+ {
1222
+ "internalType": "int128",
1223
+ "name": "longWeightInitialX18",
1224
+ "type": "int128"
1225
+ },
1226
+ {
1227
+ "internalType": "int128",
1228
+ "name": "shortWeightInitialX18",
1229
+ "type": "int128"
1230
+ },
1231
+ {
1232
+ "internalType": "int128",
1233
+ "name": "longWeightMaintenanceX18",
1234
+ "type": "int128"
1235
+ },
1236
+ {
1237
+ "internalType": "int128",
1238
+ "name": "shortWeightMaintenanceX18",
1239
+ "type": "int128"
1240
+ },
1241
+ {
1242
+ "internalType": "int128",
1243
+ "name": "largePositionPenaltyX18",
1244
+ "type": "int128"
1245
+ }
1246
+ ],
1247
+ "internalType": "struct RiskHelper.Risk",
1248
+ "name": "risk",
1249
+ "type": "tuple"
1250
+ },
1251
+ {
1252
+ "components": [
1253
+ {
1254
+ "internalType": "address",
1255
+ "name": "token",
1256
+ "type": "address"
1257
+ },
1258
+ {
1259
+ "internalType": "int128",
1260
+ "name": "interestInflectionUtilX18",
1261
+ "type": "int128"
1262
+ },
1263
+ {
1264
+ "internalType": "int128",
1265
+ "name": "interestFloorX18",
1266
+ "type": "int128"
1267
+ },
1268
+ {
1269
+ "internalType": "int128",
1270
+ "name": "interestSmallCapX18",
1271
+ "type": "int128"
1272
+ },
1273
+ {
1274
+ "internalType": "int128",
1275
+ "name": "interestLargeCapX18",
1276
+ "type": "int128"
1277
+ }
1278
+ ],
1279
+ "internalType": "struct ISpotEngine.Config",
1280
+ "name": "config",
1281
+ "type": "tuple"
1282
+ },
1283
+ {
1284
+ "components": [
1285
+ {
1286
+ "internalType": "int128",
1287
+ "name": "cumulativeDepositsMultiplierX18",
1288
+ "type": "int128"
1289
+ },
1290
+ {
1291
+ "internalType": "int128",
1292
+ "name": "cumulativeBorrowsMultiplierX18",
1293
+ "type": "int128"
1294
+ },
1295
+ {
1296
+ "internalType": "int128",
1297
+ "name": "totalDepositsNormalized",
1298
+ "type": "int128"
1299
+ },
1300
+ {
1301
+ "internalType": "int128",
1302
+ "name": "totalBorrowsNormalized",
1303
+ "type": "int128"
1304
+ }
1305
+ ],
1306
+ "internalType": "struct ISpotEngine.State",
1307
+ "name": "state",
1308
+ "type": "tuple"
1309
+ },
1310
+ {
1311
+ "components": [
1312
+ {
1313
+ "internalType": "int128",
1314
+ "name": "supply",
1315
+ "type": "int128"
1316
+ },
1317
+ {
1318
+ "components": [
1319
+ {
1320
+ "internalType": "int128",
1321
+ "name": "amount",
1322
+ "type": "int128"
1323
+ },
1324
+ {
1325
+ "internalType": "int128",
1326
+ "name": "lastCumulativeMultiplierX18",
1327
+ "type": "int128"
1328
+ }
1329
+ ],
1330
+ "internalType": "struct ISpotEngine.Balance",
1331
+ "name": "quote",
1332
+ "type": "tuple"
1333
+ },
1334
+ {
1335
+ "components": [
1336
+ {
1337
+ "internalType": "int128",
1338
+ "name": "amount",
1339
+ "type": "int128"
1340
+ },
1341
+ {
1342
+ "internalType": "int128",
1343
+ "name": "lastCumulativeMultiplierX18",
1344
+ "type": "int128"
1345
+ }
1346
+ ],
1347
+ "internalType": "struct ISpotEngine.Balance",
1348
+ "name": "base",
1349
+ "type": "tuple"
1350
+ }
1351
+ ],
1352
+ "internalType": "struct ISpotEngine.LpState",
1353
+ "name": "lpState",
1354
+ "type": "tuple"
1355
+ },
1356
+ {
1357
+ "components": [
1358
+ {
1359
+ "internalType": "int128",
1360
+ "name": "sizeIncrement",
1361
+ "type": "int128"
1362
+ },
1363
+ {
1364
+ "internalType": "int128",
1365
+ "name": "priceIncrementX18",
1366
+ "type": "int128"
1367
+ },
1368
+ {
1369
+ "internalType": "int128",
1370
+ "name": "minSize",
1371
+ "type": "int128"
1372
+ },
1373
+ {
1374
+ "internalType": "int128",
1375
+ "name": "collectedFees",
1376
+ "type": "int128"
1377
+ },
1378
+ {
1379
+ "internalType": "int128",
1380
+ "name": "lpSpreadX18",
1381
+ "type": "int128"
1382
+ }
1383
+ ],
1384
+ "internalType": "struct FQuerier.BookInfo",
1385
+ "name": "bookInfo",
1386
+ "type": "tuple"
1387
+ }
1388
+ ],
1389
+ "internalType": "struct FQuerier.SpotProduct[]",
1390
+ "name": "spotProducts",
1391
+ "type": "tuple[]"
1392
+ }
1393
+ ],
1394
+ "stateMutability": "view",
1395
+ "type": "function"
1396
+ },
1397
+ {
1398
+ "inputs": [
1399
+ {
1400
+ "internalType": "bytes32",
1401
+ "name": "subaccount",
1402
+ "type": "bytes32"
1403
+ }
1404
+ ],
1405
+ "name": "getSubaccountInfo",
1406
+ "outputs": [
1407
+ {
1408
+ "components": [
1409
+ {
1410
+ "internalType": "bytes32",
1411
+ "name": "subaccount",
1412
+ "type": "bytes32"
1413
+ },
1414
+ {
1415
+ "internalType": "bool",
1416
+ "name": "exists",
1417
+ "type": "bool"
1418
+ },
1419
+ {
1420
+ "components": [
1421
+ {
1422
+ "internalType": "int128",
1423
+ "name": "assets",
1424
+ "type": "int128"
1425
+ },
1426
+ {
1427
+ "internalType": "int128",
1428
+ "name": "liabilities",
1429
+ "type": "int128"
1430
+ },
1431
+ {
1432
+ "internalType": "int128",
1433
+ "name": "health",
1434
+ "type": "int128"
1435
+ }
1436
+ ],
1437
+ "internalType": "struct FQuerier.HealthInfo[]",
1438
+ "name": "healths",
1439
+ "type": "tuple[]"
1440
+ },
1441
+ {
1442
+ "internalType": "int128[][]",
1443
+ "name": "healthContributions",
1444
+ "type": "int128[][]"
1445
+ },
1446
+ {
1447
+ "internalType": "uint32",
1448
+ "name": "spotCount",
1449
+ "type": "uint32"
1450
+ },
1451
+ {
1452
+ "internalType": "uint32",
1453
+ "name": "perpCount",
1454
+ "type": "uint32"
1455
+ },
1456
+ {
1457
+ "components": [
1458
+ {
1459
+ "internalType": "uint32",
1460
+ "name": "productId",
1461
+ "type": "uint32"
1462
+ },
1463
+ {
1464
+ "components": [
1465
+ {
1466
+ "internalType": "int128",
1467
+ "name": "amount",
1468
+ "type": "int128"
1469
+ }
1470
+ ],
1471
+ "internalType": "struct ISpotEngine.LpBalance",
1472
+ "name": "lpBalance",
1473
+ "type": "tuple"
1474
+ },
1475
+ {
1476
+ "components": [
1477
+ {
1478
+ "internalType": "int128",
1479
+ "name": "amount",
1480
+ "type": "int128"
1481
+ },
1482
+ {
1483
+ "internalType": "int128",
1484
+ "name": "lastCumulativeMultiplierX18",
1485
+ "type": "int128"
1486
+ }
1487
+ ],
1488
+ "internalType": "struct ISpotEngine.Balance",
1489
+ "name": "balance",
1490
+ "type": "tuple"
1491
+ }
1492
+ ],
1493
+ "internalType": "struct FQuerier.SpotBalance[]",
1494
+ "name": "spotBalances",
1495
+ "type": "tuple[]"
1496
+ },
1497
+ {
1498
+ "components": [
1499
+ {
1500
+ "internalType": "uint32",
1501
+ "name": "productId",
1502
+ "type": "uint32"
1503
+ },
1504
+ {
1505
+ "components": [
1506
+ {
1507
+ "internalType": "int128",
1508
+ "name": "amount",
1509
+ "type": "int128"
1510
+ },
1511
+ {
1512
+ "internalType": "int128",
1513
+ "name": "lastCumulativeFundingX18",
1514
+ "type": "int128"
1515
+ }
1516
+ ],
1517
+ "internalType": "struct IPerpEngine.LpBalance",
1518
+ "name": "lpBalance",
1519
+ "type": "tuple"
1520
+ },
1521
+ {
1522
+ "components": [
1523
+ {
1524
+ "internalType": "int128",
1525
+ "name": "amount",
1526
+ "type": "int128"
1527
+ },
1528
+ {
1529
+ "internalType": "int128",
1530
+ "name": "vQuoteBalance",
1531
+ "type": "int128"
1532
+ },
1533
+ {
1534
+ "internalType": "int128",
1535
+ "name": "lastCumulativeFundingX18",
1536
+ "type": "int128"
1537
+ }
1538
+ ],
1539
+ "internalType": "struct IPerpEngine.Balance",
1540
+ "name": "balance",
1541
+ "type": "tuple"
1542
+ }
1543
+ ],
1544
+ "internalType": "struct FQuerier.PerpBalance[]",
1545
+ "name": "perpBalances",
1546
+ "type": "tuple[]"
1547
+ },
1548
+ {
1549
+ "components": [
1550
+ {
1551
+ "internalType": "uint32",
1552
+ "name": "productId",
1553
+ "type": "uint32"
1554
+ },
1555
+ {
1556
+ "internalType": "int128",
1557
+ "name": "oraclePriceX18",
1558
+ "type": "int128"
1559
+ },
1560
+ {
1561
+ "components": [
1562
+ {
1563
+ "internalType": "int128",
1564
+ "name": "longWeightInitialX18",
1565
+ "type": "int128"
1566
+ },
1567
+ {
1568
+ "internalType": "int128",
1569
+ "name": "shortWeightInitialX18",
1570
+ "type": "int128"
1571
+ },
1572
+ {
1573
+ "internalType": "int128",
1574
+ "name": "longWeightMaintenanceX18",
1575
+ "type": "int128"
1576
+ },
1577
+ {
1578
+ "internalType": "int128",
1579
+ "name": "shortWeightMaintenanceX18",
1580
+ "type": "int128"
1581
+ },
1582
+ {
1583
+ "internalType": "int128",
1584
+ "name": "largePositionPenaltyX18",
1585
+ "type": "int128"
1586
+ }
1587
+ ],
1588
+ "internalType": "struct RiskHelper.Risk",
1589
+ "name": "risk",
1590
+ "type": "tuple"
1591
+ },
1592
+ {
1593
+ "components": [
1594
+ {
1595
+ "internalType": "address",
1596
+ "name": "token",
1597
+ "type": "address"
1598
+ },
1599
+ {
1600
+ "internalType": "int128",
1601
+ "name": "interestInflectionUtilX18",
1602
+ "type": "int128"
1603
+ },
1604
+ {
1605
+ "internalType": "int128",
1606
+ "name": "interestFloorX18",
1607
+ "type": "int128"
1608
+ },
1609
+ {
1610
+ "internalType": "int128",
1611
+ "name": "interestSmallCapX18",
1612
+ "type": "int128"
1613
+ },
1614
+ {
1615
+ "internalType": "int128",
1616
+ "name": "interestLargeCapX18",
1617
+ "type": "int128"
1618
+ }
1619
+ ],
1620
+ "internalType": "struct ISpotEngine.Config",
1621
+ "name": "config",
1622
+ "type": "tuple"
1623
+ },
1624
+ {
1625
+ "components": [
1626
+ {
1627
+ "internalType": "int128",
1628
+ "name": "cumulativeDepositsMultiplierX18",
1629
+ "type": "int128"
1630
+ },
1631
+ {
1632
+ "internalType": "int128",
1633
+ "name": "cumulativeBorrowsMultiplierX18",
1634
+ "type": "int128"
1635
+ },
1636
+ {
1637
+ "internalType": "int128",
1638
+ "name": "totalDepositsNormalized",
1639
+ "type": "int128"
1640
+ },
1641
+ {
1642
+ "internalType": "int128",
1643
+ "name": "totalBorrowsNormalized",
1644
+ "type": "int128"
1645
+ }
1646
+ ],
1647
+ "internalType": "struct ISpotEngine.State",
1648
+ "name": "state",
1649
+ "type": "tuple"
1650
+ },
1651
+ {
1652
+ "components": [
1653
+ {
1654
+ "internalType": "int128",
1655
+ "name": "supply",
1656
+ "type": "int128"
1657
+ },
1658
+ {
1659
+ "components": [
1660
+ {
1661
+ "internalType": "int128",
1662
+ "name": "amount",
1663
+ "type": "int128"
1664
+ },
1665
+ {
1666
+ "internalType": "int128",
1667
+ "name": "lastCumulativeMultiplierX18",
1668
+ "type": "int128"
1669
+ }
1670
+ ],
1671
+ "internalType": "struct ISpotEngine.Balance",
1672
+ "name": "quote",
1673
+ "type": "tuple"
1674
+ },
1675
+ {
1676
+ "components": [
1677
+ {
1678
+ "internalType": "int128",
1679
+ "name": "amount",
1680
+ "type": "int128"
1681
+ },
1682
+ {
1683
+ "internalType": "int128",
1684
+ "name": "lastCumulativeMultiplierX18",
1685
+ "type": "int128"
1686
+ }
1687
+ ],
1688
+ "internalType": "struct ISpotEngine.Balance",
1689
+ "name": "base",
1690
+ "type": "tuple"
1691
+ }
1692
+ ],
1693
+ "internalType": "struct ISpotEngine.LpState",
1694
+ "name": "lpState",
1695
+ "type": "tuple"
1696
+ },
1697
+ {
1698
+ "components": [
1699
+ {
1700
+ "internalType": "int128",
1701
+ "name": "sizeIncrement",
1702
+ "type": "int128"
1703
+ },
1704
+ {
1705
+ "internalType": "int128",
1706
+ "name": "priceIncrementX18",
1707
+ "type": "int128"
1708
+ },
1709
+ {
1710
+ "internalType": "int128",
1711
+ "name": "minSize",
1712
+ "type": "int128"
1713
+ },
1714
+ {
1715
+ "internalType": "int128",
1716
+ "name": "collectedFees",
1717
+ "type": "int128"
1718
+ },
1719
+ {
1720
+ "internalType": "int128",
1721
+ "name": "lpSpreadX18",
1722
+ "type": "int128"
1723
+ }
1724
+ ],
1725
+ "internalType": "struct FQuerier.BookInfo",
1726
+ "name": "bookInfo",
1727
+ "type": "tuple"
1728
+ }
1729
+ ],
1730
+ "internalType": "struct FQuerier.SpotProduct[]",
1731
+ "name": "spotProducts",
1732
+ "type": "tuple[]"
1733
+ },
1734
+ {
1735
+ "components": [
1736
+ {
1737
+ "internalType": "uint32",
1738
+ "name": "productId",
1739
+ "type": "uint32"
1740
+ },
1741
+ {
1742
+ "internalType": "int128",
1743
+ "name": "oraclePriceX18",
1744
+ "type": "int128"
1745
+ },
1746
+ {
1747
+ "components": [
1748
+ {
1749
+ "internalType": "int128",
1750
+ "name": "longWeightInitialX18",
1751
+ "type": "int128"
1752
+ },
1753
+ {
1754
+ "internalType": "int128",
1755
+ "name": "shortWeightInitialX18",
1756
+ "type": "int128"
1757
+ },
1758
+ {
1759
+ "internalType": "int128",
1760
+ "name": "longWeightMaintenanceX18",
1761
+ "type": "int128"
1762
+ },
1763
+ {
1764
+ "internalType": "int128",
1765
+ "name": "shortWeightMaintenanceX18",
1766
+ "type": "int128"
1767
+ },
1768
+ {
1769
+ "internalType": "int128",
1770
+ "name": "largePositionPenaltyX18",
1771
+ "type": "int128"
1772
+ }
1773
+ ],
1774
+ "internalType": "struct RiskHelper.Risk",
1775
+ "name": "risk",
1776
+ "type": "tuple"
1777
+ },
1778
+ {
1779
+ "components": [
1780
+ {
1781
+ "internalType": "int128",
1782
+ "name": "cumulativeFundingLongX18",
1783
+ "type": "int128"
1784
+ },
1785
+ {
1786
+ "internalType": "int128",
1787
+ "name": "cumulativeFundingShortX18",
1788
+ "type": "int128"
1789
+ },
1790
+ {
1791
+ "internalType": "int128",
1792
+ "name": "availableSettle",
1793
+ "type": "int128"
1794
+ },
1795
+ {
1796
+ "internalType": "int128",
1797
+ "name": "openInterest",
1798
+ "type": "int128"
1799
+ }
1800
+ ],
1801
+ "internalType": "struct IPerpEngine.State",
1802
+ "name": "state",
1803
+ "type": "tuple"
1804
+ },
1805
+ {
1806
+ "components": [
1807
+ {
1808
+ "internalType": "int128",
1809
+ "name": "supply",
1810
+ "type": "int128"
1811
+ },
1812
+ {
1813
+ "internalType": "int128",
1814
+ "name": "lastCumulativeFundingX18",
1815
+ "type": "int128"
1816
+ },
1817
+ {
1818
+ "internalType": "int128",
1819
+ "name": "cumulativeFundingPerLpX18",
1820
+ "type": "int128"
1821
+ },
1822
+ {
1823
+ "internalType": "int128",
1824
+ "name": "base",
1825
+ "type": "int128"
1826
+ },
1827
+ {
1828
+ "internalType": "int128",
1829
+ "name": "quote",
1830
+ "type": "int128"
1831
+ }
1832
+ ],
1833
+ "internalType": "struct IPerpEngine.LpState",
1834
+ "name": "lpState",
1835
+ "type": "tuple"
1836
+ },
1837
+ {
1838
+ "components": [
1839
+ {
1840
+ "internalType": "int128",
1841
+ "name": "sizeIncrement",
1842
+ "type": "int128"
1843
+ },
1844
+ {
1845
+ "internalType": "int128",
1846
+ "name": "priceIncrementX18",
1847
+ "type": "int128"
1848
+ },
1849
+ {
1850
+ "internalType": "int128",
1851
+ "name": "minSize",
1852
+ "type": "int128"
1853
+ },
1854
+ {
1855
+ "internalType": "int128",
1856
+ "name": "collectedFees",
1857
+ "type": "int128"
1858
+ },
1859
+ {
1860
+ "internalType": "int128",
1861
+ "name": "lpSpreadX18",
1862
+ "type": "int128"
1863
+ }
1864
+ ],
1865
+ "internalType": "struct FQuerier.BookInfo",
1866
+ "name": "bookInfo",
1867
+ "type": "tuple"
1868
+ }
1869
+ ],
1870
+ "internalType": "struct FQuerier.PerpProduct[]",
1871
+ "name": "perpProducts",
1872
+ "type": "tuple[]"
1873
+ }
1874
+ ],
1875
+ "internalType": "struct FQuerier.SubaccountInfo",
1876
+ "name": "",
1877
+ "type": "tuple"
1878
+ }
1879
+ ],
1880
+ "stateMutability": "view",
1881
+ "type": "function"
1882
+ },
1883
+ {
1884
+ "inputs": [],
1885
+ "name": "getVersion",
1886
+ "outputs": [
1887
+ {
1888
+ "internalType": "uint64",
1889
+ "name": "",
1890
+ "type": "uint64"
1891
+ }
1892
+ ],
1893
+ "stateMutability": "pure",
1894
+ "type": "function"
1895
+ },
1896
+ {
1897
+ "inputs": [
1898
+ {
1899
+ "internalType": "address",
1900
+ "name": "_clearinghouse",
1901
+ "type": "address"
1902
+ }
1903
+ ],
1904
+ "name": "initialize",
1905
+ "outputs": [],
1906
+ "stateMutability": "nonpayable",
1907
+ "type": "function"
1908
+ }
1909
+ ]