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,876 @@
1
+ [
2
+ {
3
+ "anonymous": false,
4
+ "inputs": [
5
+ {
6
+ "indexed": false,
7
+ "internalType": "address",
8
+ "name": "endpoint",
9
+ "type": "address"
10
+ },
11
+ {
12
+ "indexed": false,
13
+ "internalType": "address",
14
+ "name": "quote",
15
+ "type": "address"
16
+ },
17
+ {
18
+ "indexed": false,
19
+ "internalType": "address",
20
+ "name": "fees",
21
+ "type": "address"
22
+ }
23
+ ],
24
+ "name": "ClearinghouseInitialized",
25
+ "type": "event"
26
+ },
27
+ {
28
+ "anonymous": false,
29
+ "inputs": [
30
+ {
31
+ "indexed": true,
32
+ "internalType": "bytes32",
33
+ "name": "liquidatorSubaccount",
34
+ "type": "bytes32"
35
+ },
36
+ {
37
+ "indexed": true,
38
+ "internalType": "bytes32",
39
+ "name": "liquidateeSubaccount",
40
+ "type": "bytes32"
41
+ },
42
+ {
43
+ "indexed": true,
44
+ "internalType": "uint8",
45
+ "name": "mode",
46
+ "type": "uint8"
47
+ },
48
+ {
49
+ "indexed": false,
50
+ "internalType": "uint32",
51
+ "name": "healthGroup",
52
+ "type": "uint32"
53
+ },
54
+ {
55
+ "indexed": false,
56
+ "internalType": "int128",
57
+ "name": "amount",
58
+ "type": "int128"
59
+ },
60
+ {
61
+ "indexed": false,
62
+ "internalType": "int128",
63
+ "name": "amountQuote",
64
+ "type": "int128"
65
+ },
66
+ {
67
+ "indexed": false,
68
+ "internalType": "int128",
69
+ "name": "insuranceCover",
70
+ "type": "int128"
71
+ }
72
+ ],
73
+ "name": "Liquidation",
74
+ "type": "event"
75
+ },
76
+ {
77
+ "anonymous": false,
78
+ "inputs": [
79
+ {
80
+ "indexed": false,
81
+ "internalType": "int128",
82
+ "name": "amount",
83
+ "type": "int128"
84
+ },
85
+ {
86
+ "indexed": true,
87
+ "internalType": "bytes32",
88
+ "name": "subaccount",
89
+ "type": "bytes32"
90
+ },
91
+ {
92
+ "indexed": false,
93
+ "internalType": "uint32",
94
+ "name": "productId",
95
+ "type": "uint32"
96
+ }
97
+ ],
98
+ "name": "ModifyCollateral",
99
+ "type": "event"
100
+ },
101
+ {
102
+ "inputs": [
103
+ {
104
+ "internalType": "address",
105
+ "name": "engine",
106
+ "type": "address"
107
+ },
108
+ {
109
+ "internalType": "enum IProductEngine.EngineType",
110
+ "name": "engineType",
111
+ "type": "uint8"
112
+ }
113
+ ],
114
+ "name": "addEngine",
115
+ "outputs": [],
116
+ "stateMutability": "nonpayable",
117
+ "type": "function"
118
+ },
119
+ {
120
+ "inputs": [
121
+ {
122
+ "components": [
123
+ {
124
+ "internalType": "bytes32",
125
+ "name": "sender",
126
+ "type": "bytes32"
127
+ },
128
+ {
129
+ "internalType": "uint32",
130
+ "name": "productId",
131
+ "type": "uint32"
132
+ },
133
+ {
134
+ "internalType": "uint128",
135
+ "name": "amount",
136
+ "type": "uint128"
137
+ },
138
+ {
139
+ "internalType": "uint64",
140
+ "name": "nonce",
141
+ "type": "uint64"
142
+ }
143
+ ],
144
+ "internalType": "struct IEndpoint.BurnLp",
145
+ "name": "tx",
146
+ "type": "tuple"
147
+ }
148
+ ],
149
+ "name": "burnLp",
150
+ "outputs": [],
151
+ "stateMutability": "nonpayable",
152
+ "type": "function"
153
+ },
154
+ {
155
+ "inputs": [
156
+ {
157
+ "components": [
158
+ {
159
+ "internalType": "bytes32",
160
+ "name": "sender",
161
+ "type": "bytes32"
162
+ },
163
+ {
164
+ "internalType": "uint32",
165
+ "name": "productId",
166
+ "type": "uint32"
167
+ },
168
+ {
169
+ "internalType": "uint128",
170
+ "name": "amount",
171
+ "type": "uint128"
172
+ },
173
+ {
174
+ "internalType": "bytes32",
175
+ "name": "recipient",
176
+ "type": "bytes32"
177
+ }
178
+ ],
179
+ "internalType": "struct IEndpoint.BurnLpAndTransfer",
180
+ "name": "tx",
181
+ "type": "tuple"
182
+ }
183
+ ],
184
+ "name": "burnLpAndTransfer",
185
+ "outputs": [],
186
+ "stateMutability": "nonpayable",
187
+ "type": "function"
188
+ },
189
+ {
190
+ "inputs": [
191
+ {
192
+ "components": [
193
+ {
194
+ "internalType": "bytes32",
195
+ "name": "subaccount",
196
+ "type": "bytes32"
197
+ }
198
+ ],
199
+ "internalType": "struct IEndpoint.ClaimSequencerFees",
200
+ "name": "tx",
201
+ "type": "tuple"
202
+ },
203
+ {
204
+ "internalType": "int128[]",
205
+ "name": "fees",
206
+ "type": "int128[]"
207
+ }
208
+ ],
209
+ "name": "claimSequencerFees",
210
+ "outputs": [],
211
+ "stateMutability": "nonpayable",
212
+ "type": "function"
213
+ },
214
+ {
215
+ "inputs": [
216
+ {
217
+ "components": [
218
+ {
219
+ "internalType": "bytes32",
220
+ "name": "sender",
221
+ "type": "bytes32"
222
+ },
223
+ {
224
+ "internalType": "uint32",
225
+ "name": "productId",
226
+ "type": "uint32"
227
+ },
228
+ {
229
+ "internalType": "uint128",
230
+ "name": "amount",
231
+ "type": "uint128"
232
+ }
233
+ ],
234
+ "internalType": "struct IEndpoint.DepositCollateral",
235
+ "name": "tx",
236
+ "type": "tuple"
237
+ }
238
+ ],
239
+ "name": "depositCollateral",
240
+ "outputs": [],
241
+ "stateMutability": "nonpayable",
242
+ "type": "function"
243
+ },
244
+ {
245
+ "inputs": [
246
+ {
247
+ "components": [
248
+ {
249
+ "internalType": "uint128",
250
+ "name": "amount",
251
+ "type": "uint128"
252
+ }
253
+ ],
254
+ "internalType": "struct IEndpoint.DepositInsurance",
255
+ "name": "tx",
256
+ "type": "tuple"
257
+ }
258
+ ],
259
+ "name": "depositInsurance",
260
+ "outputs": [],
261
+ "stateMutability": "nonpayable",
262
+ "type": "function"
263
+ },
264
+ {
265
+ "inputs": [],
266
+ "name": "getAllBooks",
267
+ "outputs": [
268
+ {
269
+ "internalType": "address[]",
270
+ "name": "",
271
+ "type": "address[]"
272
+ }
273
+ ],
274
+ "stateMutability": "view",
275
+ "type": "function"
276
+ },
277
+ {
278
+ "inputs": [],
279
+ "name": "getEndpoint",
280
+ "outputs": [
281
+ {
282
+ "internalType": "address",
283
+ "name": "endpoint",
284
+ "type": "address"
285
+ }
286
+ ],
287
+ "stateMutability": "view",
288
+ "type": "function"
289
+ },
290
+ {
291
+ "inputs": [
292
+ {
293
+ "internalType": "uint32",
294
+ "name": "productId",
295
+ "type": "uint32"
296
+ }
297
+ ],
298
+ "name": "getEngineByProduct",
299
+ "outputs": [
300
+ {
301
+ "internalType": "address",
302
+ "name": "",
303
+ "type": "address"
304
+ }
305
+ ],
306
+ "stateMutability": "view",
307
+ "type": "function"
308
+ },
309
+ {
310
+ "inputs": [
311
+ {
312
+ "internalType": "enum IProductEngine.EngineType",
313
+ "name": "engineType",
314
+ "type": "uint8"
315
+ }
316
+ ],
317
+ "name": "getEngineByType",
318
+ "outputs": [
319
+ {
320
+ "internalType": "address",
321
+ "name": "",
322
+ "type": "address"
323
+ }
324
+ ],
325
+ "stateMutability": "view",
326
+ "type": "function"
327
+ },
328
+ {
329
+ "inputs": [
330
+ {
331
+ "internalType": "bytes32",
332
+ "name": "subaccount",
333
+ "type": "bytes32"
334
+ },
335
+ {
336
+ "internalType": "enum IProductEngine.HealthType",
337
+ "name": "healthType",
338
+ "type": "uint8"
339
+ }
340
+ ],
341
+ "name": "getHealth",
342
+ "outputs": [
343
+ {
344
+ "internalType": "int128",
345
+ "name": "",
346
+ "type": "int128"
347
+ }
348
+ ],
349
+ "stateMutability": "view",
350
+ "type": "function"
351
+ },
352
+ {
353
+ "inputs": [],
354
+ "name": "getInsurance",
355
+ "outputs": [
356
+ {
357
+ "internalType": "int128",
358
+ "name": "",
359
+ "type": "int128"
360
+ }
361
+ ],
362
+ "stateMutability": "view",
363
+ "type": "function"
364
+ },
365
+ {
366
+ "inputs": [],
367
+ "name": "getMaxHealthGroup",
368
+ "outputs": [
369
+ {
370
+ "internalType": "uint32",
371
+ "name": "",
372
+ "type": "uint32"
373
+ }
374
+ ],
375
+ "stateMutability": "view",
376
+ "type": "function"
377
+ },
378
+ {
379
+ "inputs": [],
380
+ "name": "getNumProducts",
381
+ "outputs": [
382
+ {
383
+ "internalType": "uint32",
384
+ "name": "",
385
+ "type": "uint32"
386
+ }
387
+ ],
388
+ "stateMutability": "view",
389
+ "type": "function"
390
+ },
391
+ {
392
+ "inputs": [
393
+ {
394
+ "internalType": "uint32",
395
+ "name": "productId",
396
+ "type": "uint32"
397
+ }
398
+ ],
399
+ "name": "getOraclePriceX18",
400
+ "outputs": [
401
+ {
402
+ "internalType": "int128",
403
+ "name": "",
404
+ "type": "int128"
405
+ }
406
+ ],
407
+ "stateMutability": "view",
408
+ "type": "function"
409
+ },
410
+ {
411
+ "inputs": [
412
+ {
413
+ "internalType": "uint32",
414
+ "name": "healthGroup",
415
+ "type": "uint32"
416
+ }
417
+ ],
418
+ "name": "getOraclePricesX18",
419
+ "outputs": [
420
+ {
421
+ "components": [
422
+ {
423
+ "internalType": "int128",
424
+ "name": "spotPriceX18",
425
+ "type": "int128"
426
+ },
427
+ {
428
+ "internalType": "int128",
429
+ "name": "perpPriceX18",
430
+ "type": "int128"
431
+ }
432
+ ],
433
+ "internalType": "struct IEndpoint.Prices",
434
+ "name": "",
435
+ "type": "tuple"
436
+ }
437
+ ],
438
+ "stateMutability": "view",
439
+ "type": "function"
440
+ },
441
+ {
442
+ "inputs": [
443
+ {
444
+ "internalType": "uint32",
445
+ "name": "productId",
446
+ "type": "uint32"
447
+ }
448
+ ],
449
+ "name": "getOrderbook",
450
+ "outputs": [
451
+ {
452
+ "internalType": "address",
453
+ "name": "",
454
+ "type": "address"
455
+ }
456
+ ],
457
+ "stateMutability": "view",
458
+ "type": "function"
459
+ },
460
+ {
461
+ "inputs": [],
462
+ "name": "getQuote",
463
+ "outputs": [
464
+ {
465
+ "internalType": "address",
466
+ "name": "",
467
+ "type": "address"
468
+ }
469
+ ],
470
+ "stateMutability": "view",
471
+ "type": "function"
472
+ },
473
+ {
474
+ "inputs": [
475
+ {
476
+ "internalType": "uint32",
477
+ "name": "productId",
478
+ "type": "uint32"
479
+ }
480
+ ],
481
+ "name": "getRisk",
482
+ "outputs": [
483
+ {
484
+ "components": [
485
+ {
486
+ "internalType": "int128",
487
+ "name": "longWeightInitialX18",
488
+ "type": "int128"
489
+ },
490
+ {
491
+ "internalType": "int128",
492
+ "name": "shortWeightInitialX18",
493
+ "type": "int128"
494
+ },
495
+ {
496
+ "internalType": "int128",
497
+ "name": "longWeightMaintenanceX18",
498
+ "type": "int128"
499
+ },
500
+ {
501
+ "internalType": "int128",
502
+ "name": "shortWeightMaintenanceX18",
503
+ "type": "int128"
504
+ },
505
+ {
506
+ "internalType": "int128",
507
+ "name": "largePositionPenaltyX18",
508
+ "type": "int128"
509
+ }
510
+ ],
511
+ "internalType": "struct RiskHelper.Risk",
512
+ "name": "",
513
+ "type": "tuple"
514
+ }
515
+ ],
516
+ "stateMutability": "view",
517
+ "type": "function"
518
+ },
519
+ {
520
+ "inputs": [],
521
+ "name": "getSupportedEngines",
522
+ "outputs": [
523
+ {
524
+ "internalType": "enum IProductEngine.EngineType[]",
525
+ "name": "",
526
+ "type": "uint8[]"
527
+ }
528
+ ],
529
+ "stateMutability": "view",
530
+ "type": "function"
531
+ },
532
+ {
533
+ "inputs": [],
534
+ "name": "getVersion",
535
+ "outputs": [
536
+ {
537
+ "internalType": "uint64",
538
+ "name": "",
539
+ "type": "uint64"
540
+ }
541
+ ],
542
+ "stateMutability": "nonpayable",
543
+ "type": "function"
544
+ },
545
+ {
546
+ "inputs": [
547
+ {
548
+ "components": [
549
+ {
550
+ "internalType": "bytes32",
551
+ "name": "sender",
552
+ "type": "bytes32"
553
+ },
554
+ {
555
+ "internalType": "bytes32",
556
+ "name": "liquidatee",
557
+ "type": "bytes32"
558
+ },
559
+ {
560
+ "internalType": "uint8",
561
+ "name": "mode",
562
+ "type": "uint8"
563
+ },
564
+ {
565
+ "internalType": "uint32",
566
+ "name": "healthGroup",
567
+ "type": "uint32"
568
+ },
569
+ {
570
+ "internalType": "int128",
571
+ "name": "amount",
572
+ "type": "int128"
573
+ },
574
+ {
575
+ "internalType": "uint64",
576
+ "name": "nonce",
577
+ "type": "uint64"
578
+ }
579
+ ],
580
+ "internalType": "struct IEndpoint.LiquidateSubaccount",
581
+ "name": "tx",
582
+ "type": "tuple"
583
+ }
584
+ ],
585
+ "name": "liquidateSubaccount",
586
+ "outputs": [],
587
+ "stateMutability": "nonpayable",
588
+ "type": "function"
589
+ },
590
+ {
591
+ "inputs": [
592
+ {
593
+ "components": [
594
+ {
595
+ "internalType": "bytes32",
596
+ "name": "sender",
597
+ "type": "bytes32"
598
+ },
599
+ {
600
+ "internalType": "uint32",
601
+ "name": "productId",
602
+ "type": "uint32"
603
+ },
604
+ {
605
+ "internalType": "uint128",
606
+ "name": "amountBase",
607
+ "type": "uint128"
608
+ },
609
+ {
610
+ "internalType": "uint128",
611
+ "name": "quoteAmountLow",
612
+ "type": "uint128"
613
+ },
614
+ {
615
+ "internalType": "uint128",
616
+ "name": "quoteAmountHigh",
617
+ "type": "uint128"
618
+ },
619
+ {
620
+ "internalType": "uint64",
621
+ "name": "nonce",
622
+ "type": "uint64"
623
+ }
624
+ ],
625
+ "internalType": "struct IEndpoint.MintLp",
626
+ "name": "tx",
627
+ "type": "tuple"
628
+ }
629
+ ],
630
+ "name": "mintLp",
631
+ "outputs": [],
632
+ "stateMutability": "nonpayable",
633
+ "type": "function"
634
+ },
635
+ {
636
+ "inputs": [
637
+ {
638
+ "components": [
639
+ {
640
+ "internalType": "bytes32",
641
+ "name": "sender",
642
+ "type": "bytes32"
643
+ },
644
+ {
645
+ "internalType": "uint32",
646
+ "name": "productId",
647
+ "type": "uint32"
648
+ },
649
+ {
650
+ "internalType": "uint128",
651
+ "name": "amountBase",
652
+ "type": "uint128"
653
+ },
654
+ {
655
+ "internalType": "uint128",
656
+ "name": "quoteAmountLow",
657
+ "type": "uint128"
658
+ },
659
+ {
660
+ "internalType": "uint128",
661
+ "name": "quoteAmountHigh",
662
+ "type": "uint128"
663
+ },
664
+ {
665
+ "internalType": "uint64",
666
+ "name": "nonce",
667
+ "type": "uint64"
668
+ }
669
+ ],
670
+ "internalType": "struct IEndpoint.MintLp",
671
+ "name": "tx",
672
+ "type": "tuple"
673
+ }
674
+ ],
675
+ "name": "mintLpSlowMode",
676
+ "outputs": [],
677
+ "stateMutability": "nonpayable",
678
+ "type": "function"
679
+ },
680
+ {
681
+ "inputs": [
682
+ {
683
+ "internalType": "uint32",
684
+ "name": "productId",
685
+ "type": "uint32"
686
+ },
687
+ {
688
+ "components": [
689
+ {
690
+ "internalType": "int32",
691
+ "name": "longWeightInitial",
692
+ "type": "int32"
693
+ },
694
+ {
695
+ "internalType": "int32",
696
+ "name": "shortWeightInitial",
697
+ "type": "int32"
698
+ },
699
+ {
700
+ "internalType": "int32",
701
+ "name": "longWeightMaintenance",
702
+ "type": "int32"
703
+ },
704
+ {
705
+ "internalType": "int32",
706
+ "name": "shortWeightMaintenance",
707
+ "type": "int32"
708
+ },
709
+ {
710
+ "internalType": "int32",
711
+ "name": "largePositionPenalty",
712
+ "type": "int32"
713
+ }
714
+ ],
715
+ "internalType": "struct IClearinghouseState.RiskStore",
716
+ "name": "riskStore",
717
+ "type": "tuple"
718
+ }
719
+ ],
720
+ "name": "modifyProductConfig",
721
+ "outputs": [],
722
+ "stateMutability": "nonpayable",
723
+ "type": "function"
724
+ },
725
+ {
726
+ "inputs": [
727
+ {
728
+ "internalType": "address",
729
+ "name": "book",
730
+ "type": "address"
731
+ },
732
+ {
733
+ "components": [
734
+ {
735
+ "internalType": "int32",
736
+ "name": "longWeightInitial",
737
+ "type": "int32"
738
+ },
739
+ {
740
+ "internalType": "int32",
741
+ "name": "shortWeightInitial",
742
+ "type": "int32"
743
+ },
744
+ {
745
+ "internalType": "int32",
746
+ "name": "longWeightMaintenance",
747
+ "type": "int32"
748
+ },
749
+ {
750
+ "internalType": "int32",
751
+ "name": "shortWeightMaintenance",
752
+ "type": "int32"
753
+ },
754
+ {
755
+ "internalType": "int32",
756
+ "name": "largePositionPenalty",
757
+ "type": "int32"
758
+ }
759
+ ],
760
+ "internalType": "struct IClearinghouseState.RiskStore",
761
+ "name": "riskStore",
762
+ "type": "tuple"
763
+ },
764
+ {
765
+ "internalType": "uint32",
766
+ "name": "healthGroup",
767
+ "type": "uint32"
768
+ }
769
+ ],
770
+ "name": "registerProductForId",
771
+ "outputs": [
772
+ {
773
+ "internalType": "uint32",
774
+ "name": "",
775
+ "type": "uint32"
776
+ }
777
+ ],
778
+ "stateMutability": "nonpayable",
779
+ "type": "function"
780
+ },
781
+ {
782
+ "inputs": [
783
+ {
784
+ "components": [
785
+ {
786
+ "internalType": "bytes32[]",
787
+ "name": "subaccounts",
788
+ "type": "bytes32[]"
789
+ },
790
+ {
791
+ "internalType": "uint256[]",
792
+ "name": "productIds",
793
+ "type": "uint256[]"
794
+ }
795
+ ],
796
+ "internalType": "struct IEndpoint.SettlePnl",
797
+ "name": "tx",
798
+ "type": "tuple"
799
+ }
800
+ ],
801
+ "name": "settlePnl",
802
+ "outputs": [],
803
+ "stateMutability": "nonpayable",
804
+ "type": "function"
805
+ },
806
+ {
807
+ "inputs": [
808
+ {
809
+ "components": [
810
+ {
811
+ "internalType": "address",
812
+ "name": "user",
813
+ "type": "address"
814
+ },
815
+ {
816
+ "internalType": "uint32",
817
+ "name": "productId",
818
+ "type": "uint32"
819
+ },
820
+ {
821
+ "internalType": "int64",
822
+ "name": "makerRateX18",
823
+ "type": "int64"
824
+ },
825
+ {
826
+ "internalType": "int64",
827
+ "name": "takerRateX18",
828
+ "type": "int64"
829
+ }
830
+ ],
831
+ "internalType": "struct IEndpoint.UpdateFeeRates",
832
+ "name": "tx",
833
+ "type": "tuple"
834
+ }
835
+ ],
836
+ "name": "updateFeeRates",
837
+ "outputs": [],
838
+ "stateMutability": "nonpayable",
839
+ "type": "function"
840
+ },
841
+ {
842
+ "inputs": [
843
+ {
844
+ "components": [
845
+ {
846
+ "internalType": "bytes32",
847
+ "name": "sender",
848
+ "type": "bytes32"
849
+ },
850
+ {
851
+ "internalType": "uint32",
852
+ "name": "productId",
853
+ "type": "uint32"
854
+ },
855
+ {
856
+ "internalType": "uint128",
857
+ "name": "amount",
858
+ "type": "uint128"
859
+ },
860
+ {
861
+ "internalType": "uint64",
862
+ "name": "nonce",
863
+ "type": "uint64"
864
+ }
865
+ ],
866
+ "internalType": "struct IEndpoint.WithdrawCollateral",
867
+ "name": "tx",
868
+ "type": "tuple"
869
+ }
870
+ ],
871
+ "name": "withdrawCollateral",
872
+ "outputs": [],
873
+ "stateMutability": "nonpayable",
874
+ "type": "function"
875
+ }
876
+ ]