@strkfarm/sdk 1.1.70 → 2.0.0-dev.1

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 (53) hide show
  1. package/dist/cli.js +2 -2
  2. package/dist/cli.mjs +2 -2
  3. package/dist/index.browser.global.js +66861 -59746
  4. package/dist/index.browser.mjs +24970 -18579
  5. package/dist/index.d.ts +1969 -776
  6. package/dist/index.js +25264 -18850
  7. package/dist/index.mjs +25463 -19089
  8. package/package.json +80 -76
  9. package/src/data/extended-deposit.abi.json +3613 -0
  10. package/src/data/universal-vault.abi.json +135 -20
  11. package/src/dataTypes/address.ts +8 -1
  12. package/src/global.ts +240 -193
  13. package/src/interfaces/common.tsx +26 -2
  14. package/src/modules/ExtendedWrapperSDk/index.ts +62 -0
  15. package/src/modules/ExtendedWrapperSDk/types.ts +311 -0
  16. package/src/modules/ExtendedWrapperSDk/wrapper.ts +395 -0
  17. package/src/modules/avnu.ts +17 -4
  18. package/src/modules/ekubo-quoter.ts +98 -10
  19. package/src/modules/erc20.ts +67 -21
  20. package/src/modules/harvests.ts +16 -29
  21. package/src/modules/index.ts +5 -1
  22. package/src/modules/lst-apr.ts +36 -0
  23. package/src/modules/midas.ts +159 -0
  24. package/src/modules/pricer-from-api.ts +2 -2
  25. package/src/modules/pricer-lst.ts +1 -1
  26. package/src/modules/pricer.ts +3 -38
  27. package/src/modules/token-market-data.ts +202 -0
  28. package/src/node/deployer.ts +1 -36
  29. package/src/strategies/autoCompounderStrk.ts +1 -1
  30. package/src/strategies/base-strategy.ts +20 -3
  31. package/src/strategies/ekubo-cl-vault.tsx +123 -306
  32. package/src/strategies/index.ts +4 -1
  33. package/src/strategies/svk-strategy.ts +247 -0
  34. package/src/strategies/universal-adapters/adapter-optimizer.ts +65 -0
  35. package/src/strategies/universal-adapters/adapter-utils.ts +5 -1
  36. package/src/strategies/universal-adapters/avnu-adapter.ts +418 -0
  37. package/src/strategies/universal-adapters/baseAdapter.ts +181 -153
  38. package/src/strategies/universal-adapters/common-adapter.ts +98 -77
  39. package/src/strategies/universal-adapters/extended-adapter.ts +544 -0
  40. package/src/strategies/universal-adapters/index.ts +5 -1
  41. package/src/strategies/universal-adapters/unused-balance-adapter.ts +109 -0
  42. package/src/strategies/universal-adapters/vesu-adapter.ts +220 -218
  43. package/src/strategies/universal-adapters/vesu-multiply-adapter.ts +924 -0
  44. package/src/strategies/universal-adapters/vesu-supply-only-adapter.ts +58 -51
  45. package/src/strategies/universal-lst-muliplier-strategy.tsx +707 -774
  46. package/src/strategies/universal-strategy.tsx +1098 -1180
  47. package/src/strategies/vesu-extended-strategy/services/operationService.ts +28 -0
  48. package/src/strategies/vesu-extended-strategy/utils/config.runtime.ts +77 -0
  49. package/src/strategies/vesu-extended-strategy/utils/constants.ts +48 -0
  50. package/src/strategies/vesu-extended-strategy/utils/helper.ts +374 -0
  51. package/src/strategies/vesu-extended-strategy/vesu-extended-strategy.tsx +992 -0
  52. package/src/strategies/vesu-rebalance.tsx +16 -19
  53. package/src/utils/health-factor-math.ts +11 -5
@@ -0,0 +1,3613 @@
1
+ [
2
+ {
3
+ "type": "impl",
4
+ "name": "CoreImpl",
5
+ "interface_name": "perpetuals::core::interface::ICore"
6
+ },
7
+ {
8
+ "type": "struct",
9
+ "name": "core::array::Span::<core::felt252>",
10
+ "members": [
11
+ {
12
+ "name": "snapshot",
13
+ "type": "@core::array::Array::<core::felt252>"
14
+ }
15
+ ]
16
+ },
17
+ {
18
+ "type": "struct",
19
+ "name": "perpetuals::core::types::position::PositionId",
20
+ "members": [
21
+ {
22
+ "name": "value",
23
+ "type": "core::integer::u32"
24
+ }
25
+ ]
26
+ },
27
+ {
28
+ "type": "struct",
29
+ "name": "starkware_utils::time::time::Timestamp",
30
+ "members": [
31
+ {
32
+ "name": "seconds",
33
+ "type": "core::integer::u64"
34
+ }
35
+ ]
36
+ },
37
+ {
38
+ "type": "struct",
39
+ "name": "perpetuals::core::types::asset::AssetId",
40
+ "members": [
41
+ {
42
+ "name": "value",
43
+ "type": "core::felt252"
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "type": "struct",
49
+ "name": "perpetuals::core::types::order::Order",
50
+ "members": [
51
+ {
52
+ "name": "position_id",
53
+ "type": "perpetuals::core::types::position::PositionId"
54
+ },
55
+ {
56
+ "name": "base_asset_id",
57
+ "type": "perpetuals::core::types::asset::AssetId"
58
+ },
59
+ {
60
+ "name": "base_amount",
61
+ "type": "core::integer::i64"
62
+ },
63
+ {
64
+ "name": "quote_asset_id",
65
+ "type": "perpetuals::core::types::asset::AssetId"
66
+ },
67
+ {
68
+ "name": "quote_amount",
69
+ "type": "core::integer::i64"
70
+ },
71
+ {
72
+ "name": "fee_asset_id",
73
+ "type": "perpetuals::core::types::asset::AssetId"
74
+ },
75
+ {
76
+ "name": "fee_amount",
77
+ "type": "core::integer::u64"
78
+ },
79
+ {
80
+ "name": "expiration",
81
+ "type": "starkware_utils::time::time::Timestamp"
82
+ },
83
+ {
84
+ "name": "salt",
85
+ "type": "core::felt252"
86
+ }
87
+ ]
88
+ },
89
+ {
90
+ "type": "interface",
91
+ "name": "perpetuals::core::interface::ICore",
92
+ "items": [
93
+ {
94
+ "type": "function",
95
+ "name": "withdraw_request",
96
+ "inputs": [
97
+ {
98
+ "name": "signature",
99
+ "type": "core::array::Span::<core::felt252>"
100
+ },
101
+ {
102
+ "name": "recipient",
103
+ "type": "core::starknet::contract_address::ContractAddress"
104
+ },
105
+ {
106
+ "name": "position_id",
107
+ "type": "perpetuals::core::types::position::PositionId"
108
+ },
109
+ {
110
+ "name": "amount",
111
+ "type": "core::integer::u64"
112
+ },
113
+ {
114
+ "name": "expiration",
115
+ "type": "starkware_utils::time::time::Timestamp"
116
+ },
117
+ {
118
+ "name": "salt",
119
+ "type": "core::felt252"
120
+ }
121
+ ],
122
+ "outputs": [],
123
+ "state_mutability": "external"
124
+ },
125
+ {
126
+ "type": "function",
127
+ "name": "withdraw",
128
+ "inputs": [
129
+ {
130
+ "name": "operator_nonce",
131
+ "type": "core::integer::u64"
132
+ },
133
+ {
134
+ "name": "recipient",
135
+ "type": "core::starknet::contract_address::ContractAddress"
136
+ },
137
+ {
138
+ "name": "position_id",
139
+ "type": "perpetuals::core::types::position::PositionId"
140
+ },
141
+ {
142
+ "name": "amount",
143
+ "type": "core::integer::u64"
144
+ },
145
+ {
146
+ "name": "expiration",
147
+ "type": "starkware_utils::time::time::Timestamp"
148
+ },
149
+ {
150
+ "name": "salt",
151
+ "type": "core::felt252"
152
+ }
153
+ ],
154
+ "outputs": [],
155
+ "state_mutability": "external"
156
+ },
157
+ {
158
+ "type": "function",
159
+ "name": "transfer_request",
160
+ "inputs": [
161
+ {
162
+ "name": "signature",
163
+ "type": "core::array::Span::<core::felt252>"
164
+ },
165
+ {
166
+ "name": "recipient",
167
+ "type": "perpetuals::core::types::position::PositionId"
168
+ },
169
+ {
170
+ "name": "position_id",
171
+ "type": "perpetuals::core::types::position::PositionId"
172
+ },
173
+ {
174
+ "name": "amount",
175
+ "type": "core::integer::u64"
176
+ },
177
+ {
178
+ "name": "expiration",
179
+ "type": "starkware_utils::time::time::Timestamp"
180
+ },
181
+ {
182
+ "name": "salt",
183
+ "type": "core::felt252"
184
+ }
185
+ ],
186
+ "outputs": [],
187
+ "state_mutability": "external"
188
+ },
189
+ {
190
+ "type": "function",
191
+ "name": "transfer",
192
+ "inputs": [
193
+ {
194
+ "name": "operator_nonce",
195
+ "type": "core::integer::u64"
196
+ },
197
+ {
198
+ "name": "recipient",
199
+ "type": "perpetuals::core::types::position::PositionId"
200
+ },
201
+ {
202
+ "name": "position_id",
203
+ "type": "perpetuals::core::types::position::PositionId"
204
+ },
205
+ {
206
+ "name": "amount",
207
+ "type": "core::integer::u64"
208
+ },
209
+ {
210
+ "name": "expiration",
211
+ "type": "starkware_utils::time::time::Timestamp"
212
+ },
213
+ {
214
+ "name": "salt",
215
+ "type": "core::felt252"
216
+ }
217
+ ],
218
+ "outputs": [],
219
+ "state_mutability": "external"
220
+ },
221
+ {
222
+ "type": "function",
223
+ "name": "trade",
224
+ "inputs": [
225
+ {
226
+ "name": "operator_nonce",
227
+ "type": "core::integer::u64"
228
+ },
229
+ {
230
+ "name": "signature_a",
231
+ "type": "core::array::Span::<core::felt252>"
232
+ },
233
+ {
234
+ "name": "signature_b",
235
+ "type": "core::array::Span::<core::felt252>"
236
+ },
237
+ {
238
+ "name": "order_a",
239
+ "type": "perpetuals::core::types::order::Order"
240
+ },
241
+ {
242
+ "name": "order_b",
243
+ "type": "perpetuals::core::types::order::Order"
244
+ },
245
+ {
246
+ "name": "actual_amount_base_a",
247
+ "type": "core::integer::i64"
248
+ },
249
+ {
250
+ "name": "actual_amount_quote_a",
251
+ "type": "core::integer::i64"
252
+ },
253
+ {
254
+ "name": "actual_fee_a",
255
+ "type": "core::integer::u64"
256
+ },
257
+ {
258
+ "name": "actual_fee_b",
259
+ "type": "core::integer::u64"
260
+ }
261
+ ],
262
+ "outputs": [],
263
+ "state_mutability": "external"
264
+ },
265
+ {
266
+ "type": "function",
267
+ "name": "liquidate",
268
+ "inputs": [
269
+ {
270
+ "name": "operator_nonce",
271
+ "type": "core::integer::u64"
272
+ },
273
+ {
274
+ "name": "liquidator_signature",
275
+ "type": "core::array::Span::<core::felt252>"
276
+ },
277
+ {
278
+ "name": "liquidated_position_id",
279
+ "type": "perpetuals::core::types::position::PositionId"
280
+ },
281
+ {
282
+ "name": "liquidator_order",
283
+ "type": "perpetuals::core::types::order::Order"
284
+ },
285
+ {
286
+ "name": "actual_amount_base_liquidated",
287
+ "type": "core::integer::i64"
288
+ },
289
+ {
290
+ "name": "actual_amount_quote_liquidated",
291
+ "type": "core::integer::i64"
292
+ },
293
+ {
294
+ "name": "actual_liquidator_fee",
295
+ "type": "core::integer::u64"
296
+ },
297
+ {
298
+ "name": "liquidated_fee_amount",
299
+ "type": "core::integer::u64"
300
+ }
301
+ ],
302
+ "outputs": [],
303
+ "state_mutability": "external"
304
+ },
305
+ {
306
+ "type": "function",
307
+ "name": "deleverage",
308
+ "inputs": [
309
+ {
310
+ "name": "operator_nonce",
311
+ "type": "core::integer::u64"
312
+ },
313
+ {
314
+ "name": "deleveraged_position_id",
315
+ "type": "perpetuals::core::types::position::PositionId"
316
+ },
317
+ {
318
+ "name": "deleverager_position_id",
319
+ "type": "perpetuals::core::types::position::PositionId"
320
+ },
321
+ {
322
+ "name": "base_asset_id",
323
+ "type": "perpetuals::core::types::asset::AssetId"
324
+ },
325
+ {
326
+ "name": "deleveraged_base_amount",
327
+ "type": "core::integer::i64"
328
+ },
329
+ {
330
+ "name": "deleveraged_quote_amount",
331
+ "type": "core::integer::i64"
332
+ }
333
+ ],
334
+ "outputs": [],
335
+ "state_mutability": "external"
336
+ },
337
+ {
338
+ "type": "function",
339
+ "name": "reduce_inactive_asset_position",
340
+ "inputs": [
341
+ {
342
+ "name": "operator_nonce",
343
+ "type": "core::integer::u64"
344
+ },
345
+ {
346
+ "name": "position_id_a",
347
+ "type": "perpetuals::core::types::position::PositionId"
348
+ },
349
+ {
350
+ "name": "position_id_b",
351
+ "type": "perpetuals::core::types::position::PositionId"
352
+ },
353
+ {
354
+ "name": "base_asset_id",
355
+ "type": "perpetuals::core::types::asset::AssetId"
356
+ },
357
+ {
358
+ "name": "base_amount_a",
359
+ "type": "core::integer::i64"
360
+ }
361
+ ],
362
+ "outputs": [],
363
+ "state_mutability": "external"
364
+ }
365
+ ]
366
+ },
367
+ {
368
+ "type": "impl",
369
+ "name": "OperatorNonceImpl",
370
+ "interface_name":
371
+ "perpetuals::core::components::operator_nonce::interface::IOperatorNonce"
372
+ },
373
+ {
374
+ "type": "interface",
375
+ "name": "perpetuals::core::components::operator_nonce::interface::IOperatorNonce",
376
+ "items": [
377
+ {
378
+ "type": "function",
379
+ "name": "get_operator_nonce",
380
+ "inputs": [],
381
+ "outputs": [
382
+ {
383
+ "type": "core::integer::u64"
384
+ }
385
+ ],
386
+ "state_mutability": "view"
387
+ }
388
+ ]
389
+ },
390
+ {
391
+ "type": "impl",
392
+ "name": "DepositImpl",
393
+ "interface_name":
394
+ "perpetuals::core::components::deposit::interface::IDeposit"
395
+ },
396
+ {
397
+ "type": "enum",
398
+ "name": "perpetuals::core::components::deposit::interface::DepositStatus",
399
+ "variants": [
400
+ {
401
+ "name": "NOT_REGISTERED",
402
+ "type": "()"
403
+ },
404
+ {
405
+ "name": "PROCESSED",
406
+ "type": "()"
407
+ },
408
+ {
409
+ "name": "CANCELED",
410
+ "type": "()"
411
+ },
412
+ {
413
+ "name": "PENDING",
414
+ "type": "starkware_utils::time::time::Timestamp"
415
+ }
416
+ ]
417
+ },
418
+ {
419
+ "type": "struct",
420
+ "name": "starkware_utils::time::time::TimeDelta",
421
+ "members": [
422
+ {
423
+ "name": "seconds",
424
+ "type": "core::integer::u64"
425
+ }
426
+ ]
427
+ },
428
+ {
429
+ "type": "interface",
430
+ "name": "perpetuals::core::components::deposit::interface::IDeposit",
431
+ "items": [
432
+ {
433
+ "type": "function",
434
+ "name": "deposit",
435
+ "inputs": [
436
+ {
437
+ "name": "position_id",
438
+ "type": "perpetuals::core::types::position::PositionId"
439
+ },
440
+ {
441
+ "name": "quantized_amount",
442
+ "type": "core::integer::u64"
443
+ },
444
+ {
445
+ "name": "salt",
446
+ "type": "core::felt252"
447
+ }
448
+ ],
449
+ "outputs": [],
450
+ "state_mutability": "external"
451
+ },
452
+ {
453
+ "type": "function",
454
+ "name": "cancel_deposit",
455
+ "inputs": [
456
+ {
457
+ "name": "position_id",
458
+ "type": "perpetuals::core::types::position::PositionId"
459
+ },
460
+ {
461
+ "name": "quantized_amount",
462
+ "type": "core::integer::u64"
463
+ },
464
+ {
465
+ "name": "salt",
466
+ "type": "core::felt252"
467
+ }
468
+ ],
469
+ "outputs": [],
470
+ "state_mutability": "external"
471
+ },
472
+ {
473
+ "type": "function",
474
+ "name": "reject_deposit",
475
+ "inputs": [
476
+ {
477
+ "name": "operator_nonce",
478
+ "type": "core::integer::u64"
479
+ },
480
+ {
481
+ "name": "depositor",
482
+ "type": "core::starknet::contract_address::ContractAddress"
483
+ },
484
+ {
485
+ "name": "position_id",
486
+ "type": "perpetuals::core::types::position::PositionId"
487
+ },
488
+ {
489
+ "name": "quantized_amount",
490
+ "type": "core::integer::u64"
491
+ },
492
+ {
493
+ "name": "salt",
494
+ "type": "core::felt252"
495
+ }
496
+ ],
497
+ "outputs": [],
498
+ "state_mutability": "external"
499
+ },
500
+ {
501
+ "type": "function",
502
+ "name": "process_deposit",
503
+ "inputs": [
504
+ {
505
+ "name": "operator_nonce",
506
+ "type": "core::integer::u64"
507
+ },
508
+ {
509
+ "name": "depositor",
510
+ "type": "core::starknet::contract_address::ContractAddress"
511
+ },
512
+ {
513
+ "name": "position_id",
514
+ "type": "perpetuals::core::types::position::PositionId"
515
+ },
516
+ {
517
+ "name": "quantized_amount",
518
+ "type": "core::integer::u64"
519
+ },
520
+ {
521
+ "name": "salt",
522
+ "type": "core::felt252"
523
+ }
524
+ ],
525
+ "outputs": [],
526
+ "state_mutability": "external"
527
+ },
528
+ {
529
+ "type": "function",
530
+ "name": "get_deposit_status",
531
+ "inputs": [
532
+ {
533
+ "name": "deposit_hash",
534
+ "type": "core::felt252"
535
+ }
536
+ ],
537
+ "outputs": [
538
+ {
539
+ "type": "perpetuals::core::components::deposit::interface::DepositStatus"
540
+ }
541
+ ],
542
+ "state_mutability": "view"
543
+ },
544
+ {
545
+ "type": "function",
546
+ "name": "get_cancel_delay",
547
+ "inputs": [],
548
+ "outputs": [
549
+ {
550
+ "type": "starkware_utils::time::time::TimeDelta"
551
+ }
552
+ ],
553
+ "state_mutability": "view"
554
+ }
555
+ ]
556
+ },
557
+ {
558
+ "type": "impl",
559
+ "name": "RequestApprovalsImpl",
560
+ "interface_name":
561
+ "starkware_utils::components::request_approvals::interface::IRequestApprovals"
562
+ },
563
+ {
564
+ "type": "enum",
565
+ "name": "starkware_utils::components::request_approvals::interface::RequestStatus",
566
+ "variants": [
567
+ {
568
+ "name": "NOT_REGISTERED",
569
+ "type": "()"
570
+ },
571
+ {
572
+ "name": "PROCESSED",
573
+ "type": "()"
574
+ },
575
+ {
576
+ "name": "PENDING",
577
+ "type": "()"
578
+ }
579
+ ]
580
+ },
581
+ {
582
+ "type": "interface",
583
+ "name": "starkware_utils::components::request_approvals::interface::IRequestApprovals",
584
+ "items": [
585
+ {
586
+ "type": "function",
587
+ "name": "get_request_status",
588
+ "inputs": [
589
+ {
590
+ "name": "request_hash",
591
+ "type": "core::felt252"
592
+ }
593
+ ],
594
+ "outputs": [
595
+ {
596
+ "type": "starkware_utils::components::request_approvals::interface::RequestStatus"
597
+ }
598
+ ],
599
+ "state_mutability": "view"
600
+ }
601
+ ]
602
+ },
603
+ {
604
+ "type": "impl",
605
+ "name": "AssetsImpl",
606
+ "interface_name": "perpetuals::core::components::assets::interface::IAssets"
607
+ },
608
+ {
609
+ "type": "struct",
610
+ "name": "core::array::Span::<core::integer::u16>",
611
+ "members": [
612
+ {
613
+ "name": "snapshot",
614
+ "type": "@core::array::Array::<core::integer::u16>"
615
+ }
616
+ ]
617
+ },
618
+ {
619
+ "type": "struct",
620
+ "name": "perpetuals::core::types::funding::FundingIndex",
621
+ "members": [
622
+ {
623
+ "name": "value",
624
+ "type": "core::integer::i64"
625
+ }
626
+ ]
627
+ },
628
+ {
629
+ "type": "struct",
630
+ "name": "perpetuals::core::types::funding::FundingTick",
631
+ "members": [
632
+ {
633
+ "name": "asset_id",
634
+ "type": "perpetuals::core::types::asset::AssetId"
635
+ },
636
+ {
637
+ "name": "funding_index",
638
+ "type": "perpetuals::core::types::funding::FundingIndex"
639
+ }
640
+ ]
641
+ },
642
+ {
643
+ "type": "struct",
644
+ "name": "core::array::Span::<perpetuals::core::types::funding::FundingTick>",
645
+ "members": [
646
+ {
647
+ "name": "snapshot",
648
+ "type": "@core::array::Array::<perpetuals::core::types::funding::FundingTick>"
649
+ }
650
+ ]
651
+ },
652
+ {
653
+ "type": "struct",
654
+ "name": "perpetuals::core::types::price::SignedPrice",
655
+ "members": [
656
+ {
657
+ "name": "signature",
658
+ "type": "core::array::Span::<core::felt252>"
659
+ },
660
+ {
661
+ "name": "signer_public_key",
662
+ "type": "core::felt252"
663
+ },
664
+ {
665
+ "name": "timestamp",
666
+ "type": "core::integer::u32"
667
+ },
668
+ {
669
+ "name": "oracle_price",
670
+ "type": "core::integer::u128"
671
+ }
672
+ ]
673
+ },
674
+ {
675
+ "type": "struct",
676
+ "name": "core::array::Span::<perpetuals::core::types::price::SignedPrice>",
677
+ "members": [
678
+ {
679
+ "name": "snapshot",
680
+ "type": "@core::array::Array::<perpetuals::core::types::price::SignedPrice>"
681
+ }
682
+ ]
683
+ },
684
+ {
685
+ "type": "struct",
686
+ "name": "openzeppelin_token::erc20::interface::IERC20Dispatcher",
687
+ "members": [
688
+ {
689
+ "name": "contract_address",
690
+ "type": "core::starknet::contract_address::ContractAddress"
691
+ }
692
+ ]
693
+ },
694
+ {
695
+ "type": "enum",
696
+ "name": "perpetuals::core::types::asset::AssetStatus",
697
+ "variants": [
698
+ {
699
+ "name": "PENDING",
700
+ "type": "()"
701
+ },
702
+ {
703
+ "name": "ACTIVE",
704
+ "type": "()"
705
+ },
706
+ {
707
+ "name": "INACTIVE",
708
+ "type": "()"
709
+ }
710
+ ]
711
+ },
712
+ {
713
+ "type": "struct",
714
+ "name": "perpetuals::core::types::asset::synthetic::SyntheticConfig",
715
+ "members": [
716
+ {
717
+ "name": "version",
718
+ "type": "core::integer::u8"
719
+ },
720
+ {
721
+ "name": "status",
722
+ "type": "perpetuals::core::types::asset::AssetStatus"
723
+ },
724
+ {
725
+ "name": "risk_factor_first_tier_boundary",
726
+ "type": "core::integer::u128"
727
+ },
728
+ {
729
+ "name": "risk_factor_tier_size",
730
+ "type": "core::integer::u128"
731
+ },
732
+ {
733
+ "name": "quorum",
734
+ "type": "core::integer::u8"
735
+ },
736
+ {
737
+ "name": "resolution_factor",
738
+ "type": "core::integer::u64"
739
+ }
740
+ ]
741
+ },
742
+ {
743
+ "type": "struct",
744
+ "name": "perpetuals::core::types::price::Price",
745
+ "members": [
746
+ {
747
+ "name": "value",
748
+ "type": "core::integer::u64"
749
+ }
750
+ ]
751
+ },
752
+ {
753
+ "type": "struct",
754
+ "name": "perpetuals::core::types::asset::synthetic::SyntheticTimelyData",
755
+ "members": [
756
+ {
757
+ "name": "version",
758
+ "type": "core::integer::u8"
759
+ },
760
+ {
761
+ "name": "price",
762
+ "type": "perpetuals::core::types::price::Price"
763
+ },
764
+ {
765
+ "name": "last_price_update",
766
+ "type": "starkware_utils::time::time::Timestamp"
767
+ },
768
+ {
769
+ "name": "funding_index",
770
+ "type": "perpetuals::core::types::funding::FundingIndex"
771
+ }
772
+ ]
773
+ },
774
+ {
775
+ "type": "struct",
776
+ "name": "perpetuals::core::types::risk_factor::RiskFactor",
777
+ "members": [
778
+ {
779
+ "name": "value",
780
+ "type": "core::integer::u16"
781
+ }
782
+ ]
783
+ },
784
+ {
785
+ "type": "struct",
786
+ "name": "core::array::Span::<perpetuals::core::types::risk_factor::RiskFactor>",
787
+ "members": [
788
+ {
789
+ "name": "snapshot",
790
+ "type": "@core::array::Array::<perpetuals::core::types::risk_factor::RiskFactor>"
791
+ }
792
+ ]
793
+ },
794
+ {
795
+ "type": "interface",
796
+ "name": "perpetuals::core::components::assets::interface::IAssets",
797
+ "items": [
798
+ {
799
+ "type": "function",
800
+ "name": "add_oracle_to_asset",
801
+ "inputs": [
802
+ {
803
+ "name": "asset_id",
804
+ "type": "perpetuals::core::types::asset::AssetId"
805
+ },
806
+ {
807
+ "name": "oracle_public_key",
808
+ "type": "core::felt252"
809
+ },
810
+ {
811
+ "name": "oracle_name",
812
+ "type": "core::felt252"
813
+ },
814
+ {
815
+ "name": "asset_name",
816
+ "type": "core::felt252"
817
+ }
818
+ ],
819
+ "outputs": [],
820
+ "state_mutability": "external"
821
+ },
822
+ {
823
+ "type": "function",
824
+ "name": "add_synthetic_asset",
825
+ "inputs": [
826
+ {
827
+ "name": "asset_id",
828
+ "type": "perpetuals::core::types::asset::AssetId"
829
+ },
830
+ {
831
+ "name": "risk_factor_tiers",
832
+ "type": "core::array::Span::<core::integer::u16>"
833
+ },
834
+ {
835
+ "name": "risk_factor_first_tier_boundary",
836
+ "type": "core::integer::u128"
837
+ },
838
+ {
839
+ "name": "risk_factor_tier_size",
840
+ "type": "core::integer::u128"
841
+ },
842
+ {
843
+ "name": "quorum",
844
+ "type": "core::integer::u8"
845
+ },
846
+ {
847
+ "name": "resolution_factor",
848
+ "type": "core::integer::u64"
849
+ }
850
+ ],
851
+ "outputs": [],
852
+ "state_mutability": "external"
853
+ },
854
+ {
855
+ "type": "function",
856
+ "name": "deactivate_synthetic",
857
+ "inputs": [
858
+ {
859
+ "name": "synthetic_id",
860
+ "type": "perpetuals::core::types::asset::AssetId"
861
+ }
862
+ ],
863
+ "outputs": [],
864
+ "state_mutability": "external"
865
+ },
866
+ {
867
+ "type": "function",
868
+ "name": "funding_tick",
869
+ "inputs": [
870
+ {
871
+ "name": "operator_nonce",
872
+ "type": "core::integer::u64"
873
+ },
874
+ {
875
+ "name": "funding_ticks",
876
+ "type": "core::array::Span::<perpetuals::core::types::funding::FundingTick>"
877
+ },
878
+ {
879
+ "name": "timestamp",
880
+ "type": "starkware_utils::time::time::Timestamp"
881
+ }
882
+ ],
883
+ "outputs": [],
884
+ "state_mutability": "external"
885
+ },
886
+ {
887
+ "type": "function",
888
+ "name": "price_tick",
889
+ "inputs": [
890
+ {
891
+ "name": "operator_nonce",
892
+ "type": "core::integer::u64"
893
+ },
894
+ {
895
+ "name": "asset_id",
896
+ "type": "perpetuals::core::types::asset::AssetId"
897
+ },
898
+ {
899
+ "name": "oracle_price",
900
+ "type": "core::integer::u128"
901
+ },
902
+ {
903
+ "name": "signed_prices",
904
+ "type": "core::array::Span::<perpetuals::core::types::price::SignedPrice>"
905
+ }
906
+ ],
907
+ "outputs": [],
908
+ "state_mutability": "external"
909
+ },
910
+ {
911
+ "type": "function",
912
+ "name": "remove_oracle_from_asset",
913
+ "inputs": [
914
+ {
915
+ "name": "asset_id",
916
+ "type": "perpetuals::core::types::asset::AssetId"
917
+ },
918
+ {
919
+ "name": "oracle_public_key",
920
+ "type": "core::felt252"
921
+ }
922
+ ],
923
+ "outputs": [],
924
+ "state_mutability": "external"
925
+ },
926
+ {
927
+ "type": "function",
928
+ "name": "update_synthetic_quorum",
929
+ "inputs": [
930
+ {
931
+ "name": "synthetic_id",
932
+ "type": "perpetuals::core::types::asset::AssetId"
933
+ },
934
+ {
935
+ "name": "quorum",
936
+ "type": "core::integer::u8"
937
+ }
938
+ ],
939
+ "outputs": [],
940
+ "state_mutability": "external"
941
+ },
942
+ {
943
+ "type": "function",
944
+ "name": "get_collateral_token_contract",
945
+ "inputs": [],
946
+ "outputs": [
947
+ {
948
+ "type": "openzeppelin_token::erc20::interface::IERC20Dispatcher"
949
+ }
950
+ ],
951
+ "state_mutability": "view"
952
+ },
953
+ {
954
+ "type": "function",
955
+ "name": "get_collateral_quantum",
956
+ "inputs": [],
957
+ "outputs": [
958
+ {
959
+ "type": "core::integer::u64"
960
+ }
961
+ ],
962
+ "state_mutability": "view"
963
+ },
964
+ {
965
+ "type": "function",
966
+ "name": "get_last_funding_tick",
967
+ "inputs": [],
968
+ "outputs": [
969
+ {
970
+ "type": "starkware_utils::time::time::Timestamp"
971
+ }
972
+ ],
973
+ "state_mutability": "view"
974
+ },
975
+ {
976
+ "type": "function",
977
+ "name": "get_last_price_validation",
978
+ "inputs": [],
979
+ "outputs": [
980
+ {
981
+ "type": "starkware_utils::time::time::Timestamp"
982
+ }
983
+ ],
984
+ "state_mutability": "view"
985
+ },
986
+ {
987
+ "type": "function",
988
+ "name": "get_max_funding_interval",
989
+ "inputs": [],
990
+ "outputs": [
991
+ {
992
+ "type": "starkware_utils::time::time::TimeDelta"
993
+ }
994
+ ],
995
+ "state_mutability": "view"
996
+ },
997
+ {
998
+ "type": "function",
999
+ "name": "get_max_funding_rate",
1000
+ "inputs": [],
1001
+ "outputs": [
1002
+ {
1003
+ "type": "core::integer::u32"
1004
+ }
1005
+ ],
1006
+ "state_mutability": "view"
1007
+ },
1008
+ {
1009
+ "type": "function",
1010
+ "name": "get_max_price_interval",
1011
+ "inputs": [],
1012
+ "outputs": [
1013
+ {
1014
+ "type": "starkware_utils::time::time::TimeDelta"
1015
+ }
1016
+ ],
1017
+ "state_mutability": "view"
1018
+ },
1019
+ {
1020
+ "type": "function",
1021
+ "name": "get_max_oracle_price_validity",
1022
+ "inputs": [],
1023
+ "outputs": [
1024
+ {
1025
+ "type": "starkware_utils::time::time::TimeDelta"
1026
+ }
1027
+ ],
1028
+ "state_mutability": "view"
1029
+ },
1030
+ {
1031
+ "type": "function",
1032
+ "name": "get_num_of_active_synthetic_assets",
1033
+ "inputs": [],
1034
+ "outputs": [
1035
+ {
1036
+ "type": "core::integer::u32"
1037
+ }
1038
+ ],
1039
+ "state_mutability": "view"
1040
+ },
1041
+ {
1042
+ "type": "function",
1043
+ "name": "get_collateral_id",
1044
+ "inputs": [],
1045
+ "outputs": [
1046
+ {
1047
+ "type": "perpetuals::core::types::asset::AssetId"
1048
+ }
1049
+ ],
1050
+ "state_mutability": "view"
1051
+ },
1052
+ {
1053
+ "type": "function",
1054
+ "name": "get_synthetic_config",
1055
+ "inputs": [
1056
+ {
1057
+ "name": "synthetic_id",
1058
+ "type": "perpetuals::core::types::asset::AssetId"
1059
+ }
1060
+ ],
1061
+ "outputs": [
1062
+ {
1063
+ "type": "perpetuals::core::types::asset::synthetic::SyntheticConfig"
1064
+ }
1065
+ ],
1066
+ "state_mutability": "view"
1067
+ },
1068
+ {
1069
+ "type": "function",
1070
+ "name": "get_synthetic_timely_data",
1071
+ "inputs": [
1072
+ {
1073
+ "name": "synthetic_id",
1074
+ "type": "perpetuals::core::types::asset::AssetId"
1075
+ }
1076
+ ],
1077
+ "outputs": [
1078
+ {
1079
+ "type": "perpetuals::core::types::asset::synthetic::SyntheticTimelyData"
1080
+ }
1081
+ ],
1082
+ "state_mutability": "view"
1083
+ },
1084
+ {
1085
+ "type": "function",
1086
+ "name": "get_risk_factor_tiers",
1087
+ "inputs": [
1088
+ {
1089
+ "name": "asset_id",
1090
+ "type": "perpetuals::core::types::asset::AssetId"
1091
+ }
1092
+ ],
1093
+ "outputs": [
1094
+ {
1095
+ "type": "core::array::Span::<perpetuals::core::types::risk_factor::RiskFactor>"
1096
+ }
1097
+ ],
1098
+ "state_mutability": "view"
1099
+ }
1100
+ ]
1101
+ },
1102
+ {
1103
+ "type": "impl",
1104
+ "name": "ReplaceabilityImpl",
1105
+ "interface_name":
1106
+ "starkware_utils::components::replaceability::interface::IReplaceable"
1107
+ },
1108
+ {
1109
+ "type": "struct",
1110
+ "name": "starkware_utils::components::replaceability::interface::EICData",
1111
+ "members": [
1112
+ {
1113
+ "name": "eic_hash",
1114
+ "type": "core::starknet::class_hash::ClassHash"
1115
+ },
1116
+ {
1117
+ "name": "eic_init_data",
1118
+ "type": "core::array::Span::<core::felt252>"
1119
+ }
1120
+ ]
1121
+ },
1122
+ {
1123
+ "type": "enum",
1124
+ "name": "core::option::Option::<starkware_utils::components::replaceability::interface::EICData>",
1125
+ "variants": [
1126
+ {
1127
+ "name": "Some",
1128
+ "type": "starkware_utils::components::replaceability::interface::EICData"
1129
+ },
1130
+ {
1131
+ "name": "None",
1132
+ "type": "()"
1133
+ }
1134
+ ]
1135
+ },
1136
+ {
1137
+ "type": "enum",
1138
+ "name": "core::bool",
1139
+ "variants": [
1140
+ {
1141
+ "name": "False",
1142
+ "type": "()"
1143
+ },
1144
+ {
1145
+ "name": "True",
1146
+ "type": "()"
1147
+ }
1148
+ ]
1149
+ },
1150
+ {
1151
+ "type": "struct",
1152
+ "name": "starkware_utils::components::replaceability::interface::ImplementationData",
1153
+ "members": [
1154
+ {
1155
+ "name": "impl_hash",
1156
+ "type": "core::starknet::class_hash::ClassHash"
1157
+ },
1158
+ {
1159
+ "name": "eic_data",
1160
+ "type": "core::option::Option::<starkware_utils::components::replaceability::interface::EICData>"
1161
+ },
1162
+ {
1163
+ "name": "final",
1164
+ "type": "core::bool"
1165
+ }
1166
+ ]
1167
+ },
1168
+ {
1169
+ "type": "interface",
1170
+ "name": "starkware_utils::components::replaceability::interface::IReplaceable",
1171
+ "items": [
1172
+ {
1173
+ "type": "function",
1174
+ "name": "get_upgrade_delay",
1175
+ "inputs": [],
1176
+ "outputs": [
1177
+ {
1178
+ "type": "core::integer::u64"
1179
+ }
1180
+ ],
1181
+ "state_mutability": "view"
1182
+ },
1183
+ {
1184
+ "type": "function",
1185
+ "name": "get_impl_activation_time",
1186
+ "inputs": [
1187
+ {
1188
+ "name": "implementation_data",
1189
+ "type": "starkware_utils::components::replaceability::interface::ImplementationData"
1190
+ }
1191
+ ],
1192
+ "outputs": [
1193
+ {
1194
+ "type": "core::integer::u64"
1195
+ }
1196
+ ],
1197
+ "state_mutability": "view"
1198
+ },
1199
+ {
1200
+ "type": "function",
1201
+ "name": "add_new_implementation",
1202
+ "inputs": [
1203
+ {
1204
+ "name": "implementation_data",
1205
+ "type": "starkware_utils::components::replaceability::interface::ImplementationData"
1206
+ }
1207
+ ],
1208
+ "outputs": [],
1209
+ "state_mutability": "external"
1210
+ },
1211
+ {
1212
+ "type": "function",
1213
+ "name": "remove_implementation",
1214
+ "inputs": [
1215
+ {
1216
+ "name": "implementation_data",
1217
+ "type": "starkware_utils::components::replaceability::interface::ImplementationData"
1218
+ }
1219
+ ],
1220
+ "outputs": [],
1221
+ "state_mutability": "external"
1222
+ },
1223
+ {
1224
+ "type": "function",
1225
+ "name": "replace_to",
1226
+ "inputs": [
1227
+ {
1228
+ "name": "implementation_data",
1229
+ "type": "starkware_utils::components::replaceability::interface::ImplementationData"
1230
+ }
1231
+ ],
1232
+ "outputs": [],
1233
+ "state_mutability": "external"
1234
+ }
1235
+ ]
1236
+ },
1237
+ {
1238
+ "type": "impl",
1239
+ "name": "RolesImpl",
1240
+ "interface_name": "starkware_utils::components::roles::interface::IRoles"
1241
+ },
1242
+ {
1243
+ "type": "interface",
1244
+ "name": "starkware_utils::components::roles::interface::IRoles",
1245
+ "items": [
1246
+ {
1247
+ "type": "function",
1248
+ "name": "is_app_governor",
1249
+ "inputs": [
1250
+ {
1251
+ "name": "account",
1252
+ "type": "core::starknet::contract_address::ContractAddress"
1253
+ }
1254
+ ],
1255
+ "outputs": [
1256
+ {
1257
+ "type": "core::bool"
1258
+ }
1259
+ ],
1260
+ "state_mutability": "view"
1261
+ },
1262
+ {
1263
+ "type": "function",
1264
+ "name": "is_app_role_admin",
1265
+ "inputs": [
1266
+ {
1267
+ "name": "account",
1268
+ "type": "core::starknet::contract_address::ContractAddress"
1269
+ }
1270
+ ],
1271
+ "outputs": [
1272
+ {
1273
+ "type": "core::bool"
1274
+ }
1275
+ ],
1276
+ "state_mutability": "view"
1277
+ },
1278
+ {
1279
+ "type": "function",
1280
+ "name": "is_governance_admin",
1281
+ "inputs": [
1282
+ {
1283
+ "name": "account",
1284
+ "type": "core::starknet::contract_address::ContractAddress"
1285
+ }
1286
+ ],
1287
+ "outputs": [
1288
+ {
1289
+ "type": "core::bool"
1290
+ }
1291
+ ],
1292
+ "state_mutability": "view"
1293
+ },
1294
+ {
1295
+ "type": "function",
1296
+ "name": "is_operator",
1297
+ "inputs": [
1298
+ {
1299
+ "name": "account",
1300
+ "type": "core::starknet::contract_address::ContractAddress"
1301
+ }
1302
+ ],
1303
+ "outputs": [
1304
+ {
1305
+ "type": "core::bool"
1306
+ }
1307
+ ],
1308
+ "state_mutability": "view"
1309
+ },
1310
+ {
1311
+ "type": "function",
1312
+ "name": "is_token_admin",
1313
+ "inputs": [
1314
+ {
1315
+ "name": "account",
1316
+ "type": "core::starknet::contract_address::ContractAddress"
1317
+ }
1318
+ ],
1319
+ "outputs": [
1320
+ {
1321
+ "type": "core::bool"
1322
+ }
1323
+ ],
1324
+ "state_mutability": "view"
1325
+ },
1326
+ {
1327
+ "type": "function",
1328
+ "name": "is_upgrade_governor",
1329
+ "inputs": [
1330
+ {
1331
+ "name": "account",
1332
+ "type": "core::starknet::contract_address::ContractAddress"
1333
+ }
1334
+ ],
1335
+ "outputs": [
1336
+ {
1337
+ "type": "core::bool"
1338
+ }
1339
+ ],
1340
+ "state_mutability": "view"
1341
+ },
1342
+ {
1343
+ "type": "function",
1344
+ "name": "is_security_admin",
1345
+ "inputs": [
1346
+ {
1347
+ "name": "account",
1348
+ "type": "core::starknet::contract_address::ContractAddress"
1349
+ }
1350
+ ],
1351
+ "outputs": [
1352
+ {
1353
+ "type": "core::bool"
1354
+ }
1355
+ ],
1356
+ "state_mutability": "view"
1357
+ },
1358
+ {
1359
+ "type": "function",
1360
+ "name": "is_security_agent",
1361
+ "inputs": [
1362
+ {
1363
+ "name": "account",
1364
+ "type": "core::starknet::contract_address::ContractAddress"
1365
+ }
1366
+ ],
1367
+ "outputs": [
1368
+ {
1369
+ "type": "core::bool"
1370
+ }
1371
+ ],
1372
+ "state_mutability": "view"
1373
+ },
1374
+ {
1375
+ "type": "function",
1376
+ "name": "register_app_governor",
1377
+ "inputs": [
1378
+ {
1379
+ "name": "account",
1380
+ "type": "core::starknet::contract_address::ContractAddress"
1381
+ }
1382
+ ],
1383
+ "outputs": [],
1384
+ "state_mutability": "external"
1385
+ },
1386
+ {
1387
+ "type": "function",
1388
+ "name": "remove_app_governor",
1389
+ "inputs": [
1390
+ {
1391
+ "name": "account",
1392
+ "type": "core::starknet::contract_address::ContractAddress"
1393
+ }
1394
+ ],
1395
+ "outputs": [],
1396
+ "state_mutability": "external"
1397
+ },
1398
+ {
1399
+ "type": "function",
1400
+ "name": "register_app_role_admin",
1401
+ "inputs": [
1402
+ {
1403
+ "name": "account",
1404
+ "type": "core::starknet::contract_address::ContractAddress"
1405
+ }
1406
+ ],
1407
+ "outputs": [],
1408
+ "state_mutability": "external"
1409
+ },
1410
+ {
1411
+ "type": "function",
1412
+ "name": "remove_app_role_admin",
1413
+ "inputs": [
1414
+ {
1415
+ "name": "account",
1416
+ "type": "core::starknet::contract_address::ContractAddress"
1417
+ }
1418
+ ],
1419
+ "outputs": [],
1420
+ "state_mutability": "external"
1421
+ },
1422
+ {
1423
+ "type": "function",
1424
+ "name": "register_governance_admin",
1425
+ "inputs": [
1426
+ {
1427
+ "name": "account",
1428
+ "type": "core::starknet::contract_address::ContractAddress"
1429
+ }
1430
+ ],
1431
+ "outputs": [],
1432
+ "state_mutability": "external"
1433
+ },
1434
+ {
1435
+ "type": "function",
1436
+ "name": "remove_governance_admin",
1437
+ "inputs": [
1438
+ {
1439
+ "name": "account",
1440
+ "type": "core::starknet::contract_address::ContractAddress"
1441
+ }
1442
+ ],
1443
+ "outputs": [],
1444
+ "state_mutability": "external"
1445
+ },
1446
+ {
1447
+ "type": "function",
1448
+ "name": "register_operator",
1449
+ "inputs": [
1450
+ {
1451
+ "name": "account",
1452
+ "type": "core::starknet::contract_address::ContractAddress"
1453
+ }
1454
+ ],
1455
+ "outputs": [],
1456
+ "state_mutability": "external"
1457
+ },
1458
+ {
1459
+ "type": "function",
1460
+ "name": "remove_operator",
1461
+ "inputs": [
1462
+ {
1463
+ "name": "account",
1464
+ "type": "core::starknet::contract_address::ContractAddress"
1465
+ }
1466
+ ],
1467
+ "outputs": [],
1468
+ "state_mutability": "external"
1469
+ },
1470
+ {
1471
+ "type": "function",
1472
+ "name": "register_token_admin",
1473
+ "inputs": [
1474
+ {
1475
+ "name": "account",
1476
+ "type": "core::starknet::contract_address::ContractAddress"
1477
+ }
1478
+ ],
1479
+ "outputs": [],
1480
+ "state_mutability": "external"
1481
+ },
1482
+ {
1483
+ "type": "function",
1484
+ "name": "remove_token_admin",
1485
+ "inputs": [
1486
+ {
1487
+ "name": "account",
1488
+ "type": "core::starknet::contract_address::ContractAddress"
1489
+ }
1490
+ ],
1491
+ "outputs": [],
1492
+ "state_mutability": "external"
1493
+ },
1494
+ {
1495
+ "type": "function",
1496
+ "name": "register_upgrade_governor",
1497
+ "inputs": [
1498
+ {
1499
+ "name": "account",
1500
+ "type": "core::starknet::contract_address::ContractAddress"
1501
+ }
1502
+ ],
1503
+ "outputs": [],
1504
+ "state_mutability": "external"
1505
+ },
1506
+ {
1507
+ "type": "function",
1508
+ "name": "remove_upgrade_governor",
1509
+ "inputs": [
1510
+ {
1511
+ "name": "account",
1512
+ "type": "core::starknet::contract_address::ContractAddress"
1513
+ }
1514
+ ],
1515
+ "outputs": [],
1516
+ "state_mutability": "external"
1517
+ },
1518
+ {
1519
+ "type": "function",
1520
+ "name": "renounce",
1521
+ "inputs": [
1522
+ {
1523
+ "name": "role",
1524
+ "type": "core::felt252"
1525
+ }
1526
+ ],
1527
+ "outputs": [],
1528
+ "state_mutability": "external"
1529
+ },
1530
+ {
1531
+ "type": "function",
1532
+ "name": "register_security_admin",
1533
+ "inputs": [
1534
+ {
1535
+ "name": "account",
1536
+ "type": "core::starknet::contract_address::ContractAddress"
1537
+ }
1538
+ ],
1539
+ "outputs": [],
1540
+ "state_mutability": "external"
1541
+ },
1542
+ {
1543
+ "type": "function",
1544
+ "name": "remove_security_admin",
1545
+ "inputs": [
1546
+ {
1547
+ "name": "account",
1548
+ "type": "core::starknet::contract_address::ContractAddress"
1549
+ }
1550
+ ],
1551
+ "outputs": [],
1552
+ "state_mutability": "external"
1553
+ },
1554
+ {
1555
+ "type": "function",
1556
+ "name": "register_security_agent",
1557
+ "inputs": [
1558
+ {
1559
+ "name": "account",
1560
+ "type": "core::starknet::contract_address::ContractAddress"
1561
+ }
1562
+ ],
1563
+ "outputs": [],
1564
+ "state_mutability": "external"
1565
+ },
1566
+ {
1567
+ "type": "function",
1568
+ "name": "remove_security_agent",
1569
+ "inputs": [
1570
+ {
1571
+ "name": "account",
1572
+ "type": "core::starknet::contract_address::ContractAddress"
1573
+ }
1574
+ ],
1575
+ "outputs": [],
1576
+ "state_mutability": "external"
1577
+ }
1578
+ ]
1579
+ },
1580
+ {
1581
+ "type": "impl",
1582
+ "name": "PausableImpl",
1583
+ "interface_name":
1584
+ "starkware_utils::components::pausable::interface::IPausable"
1585
+ },
1586
+ {
1587
+ "type": "interface",
1588
+ "name": "starkware_utils::components::pausable::interface::IPausable",
1589
+ "items": [
1590
+ {
1591
+ "type": "function",
1592
+ "name": "is_paused",
1593
+ "inputs": [],
1594
+ "outputs": [
1595
+ {
1596
+ "type": "core::bool"
1597
+ }
1598
+ ],
1599
+ "state_mutability": "view"
1600
+ },
1601
+ {
1602
+ "type": "function",
1603
+ "name": "pause",
1604
+ "inputs": [],
1605
+ "outputs": [],
1606
+ "state_mutability": "external"
1607
+ },
1608
+ {
1609
+ "type": "function",
1610
+ "name": "unpause",
1611
+ "inputs": [],
1612
+ "outputs": [],
1613
+ "state_mutability": "external"
1614
+ }
1615
+ ]
1616
+ },
1617
+ {
1618
+ "type": "impl",
1619
+ "name": "PositionsImpl",
1620
+ "interface_name":
1621
+ "perpetuals::core::components::positions::interface::IPositions"
1622
+ },
1623
+ {
1624
+ "type": "struct",
1625
+ "name": "perpetuals::core::types::balance::Balance",
1626
+ "members": [
1627
+ {
1628
+ "name": "value",
1629
+ "type": "core::integer::i64"
1630
+ }
1631
+ ]
1632
+ },
1633
+ {
1634
+ "type": "struct",
1635
+ "name": "perpetuals::core::types::asset::synthetic::SyntheticAsset",
1636
+ "members": [
1637
+ {
1638
+ "name": "id",
1639
+ "type": "perpetuals::core::types::asset::AssetId"
1640
+ },
1641
+ {
1642
+ "name": "balance",
1643
+ "type": "perpetuals::core::types::balance::Balance"
1644
+ },
1645
+ {
1646
+ "name": "price",
1647
+ "type": "perpetuals::core::types::price::Price"
1648
+ },
1649
+ {
1650
+ "name": "risk_factor",
1651
+ "type": "perpetuals::core::types::risk_factor::RiskFactor"
1652
+ },
1653
+ {
1654
+ "name": "cached_funding_index",
1655
+ "type": "perpetuals::core::types::funding::FundingIndex"
1656
+ }
1657
+ ]
1658
+ },
1659
+ {
1660
+ "type": "struct",
1661
+ "name": "core::array::Span::<perpetuals::core::types::asset::synthetic::SyntheticAsset>",
1662
+ "members": [
1663
+ {
1664
+ "name": "snapshot",
1665
+ "type": "@core::array::Array::<perpetuals::core::types::asset::synthetic::SyntheticAsset>"
1666
+ }
1667
+ ]
1668
+ },
1669
+ {
1670
+ "type": "struct",
1671
+ "name": "perpetuals::core::types::position::PositionData",
1672
+ "members": [
1673
+ {
1674
+ "name": "synthetics",
1675
+ "type": "core::array::Span::<perpetuals::core::types::asset::synthetic::SyntheticAsset>"
1676
+ },
1677
+ {
1678
+ "name": "collateral_balance",
1679
+ "type": "perpetuals::core::types::balance::Balance"
1680
+ }
1681
+ ]
1682
+ },
1683
+ {
1684
+ "type": "struct",
1685
+ "name": "perpetuals::core::value_risk_calculator::PositionTVTR",
1686
+ "members": [
1687
+ {
1688
+ "name": "total_value",
1689
+ "type": "core::integer::i128"
1690
+ },
1691
+ {
1692
+ "name": "total_risk",
1693
+ "type": "core::integer::u128"
1694
+ }
1695
+ ]
1696
+ },
1697
+ {
1698
+ "type": "interface",
1699
+ "name": "perpetuals::core::components::positions::interface::IPositions",
1700
+ "items": [
1701
+ {
1702
+ "type": "function",
1703
+ "name": "get_position_assets",
1704
+ "inputs": [
1705
+ {
1706
+ "name": "position_id",
1707
+ "type": "perpetuals::core::types::position::PositionId"
1708
+ }
1709
+ ],
1710
+ "outputs": [
1711
+ {
1712
+ "type": "perpetuals::core::types::position::PositionData"
1713
+ }
1714
+ ],
1715
+ "state_mutability": "view"
1716
+ },
1717
+ {
1718
+ "type": "function",
1719
+ "name": "get_position_tv_tr",
1720
+ "inputs": [
1721
+ {
1722
+ "name": "position_id",
1723
+ "type": "perpetuals::core::types::position::PositionId"
1724
+ }
1725
+ ],
1726
+ "outputs": [
1727
+ {
1728
+ "type": "perpetuals::core::value_risk_calculator::PositionTVTR"
1729
+ }
1730
+ ],
1731
+ "state_mutability": "view"
1732
+ },
1733
+ {
1734
+ "type": "function",
1735
+ "name": "is_deleveragable",
1736
+ "inputs": [
1737
+ {
1738
+ "name": "position_id",
1739
+ "type": "perpetuals::core::types::position::PositionId"
1740
+ }
1741
+ ],
1742
+ "outputs": [
1743
+ {
1744
+ "type": "core::bool"
1745
+ }
1746
+ ],
1747
+ "state_mutability": "view"
1748
+ },
1749
+ {
1750
+ "type": "function",
1751
+ "name": "is_healthy",
1752
+ "inputs": [
1753
+ {
1754
+ "name": "position_id",
1755
+ "type": "perpetuals::core::types::position::PositionId"
1756
+ }
1757
+ ],
1758
+ "outputs": [
1759
+ {
1760
+ "type": "core::bool"
1761
+ }
1762
+ ],
1763
+ "state_mutability": "view"
1764
+ },
1765
+ {
1766
+ "type": "function",
1767
+ "name": "is_liquidatable",
1768
+ "inputs": [
1769
+ {
1770
+ "name": "position_id",
1771
+ "type": "perpetuals::core::types::position::PositionId"
1772
+ }
1773
+ ],
1774
+ "outputs": [
1775
+ {
1776
+ "type": "core::bool"
1777
+ }
1778
+ ],
1779
+ "state_mutability": "view"
1780
+ },
1781
+ {
1782
+ "type": "function",
1783
+ "name": "new_position",
1784
+ "inputs": [
1785
+ {
1786
+ "name": "operator_nonce",
1787
+ "type": "core::integer::u64"
1788
+ },
1789
+ {
1790
+ "name": "position_id",
1791
+ "type": "perpetuals::core::types::position::PositionId"
1792
+ },
1793
+ {
1794
+ "name": "owner_public_key",
1795
+ "type": "core::felt252"
1796
+ },
1797
+ {
1798
+ "name": "owner_account",
1799
+ "type": "core::starknet::contract_address::ContractAddress"
1800
+ },
1801
+ {
1802
+ "name": "owner_protection_enabled",
1803
+ "type": "core::bool"
1804
+ }
1805
+ ],
1806
+ "outputs": [],
1807
+ "state_mutability": "external"
1808
+ },
1809
+ {
1810
+ "type": "function",
1811
+ "name": "set_owner_account_request",
1812
+ "inputs": [
1813
+ {
1814
+ "name": "signature",
1815
+ "type": "core::array::Span::<core::felt252>"
1816
+ },
1817
+ {
1818
+ "name": "position_id",
1819
+ "type": "perpetuals::core::types::position::PositionId"
1820
+ },
1821
+ {
1822
+ "name": "new_owner_account",
1823
+ "type": "core::starknet::contract_address::ContractAddress"
1824
+ },
1825
+ {
1826
+ "name": "expiration",
1827
+ "type": "starkware_utils::time::time::Timestamp"
1828
+ }
1829
+ ],
1830
+ "outputs": [],
1831
+ "state_mutability": "external"
1832
+ },
1833
+ {
1834
+ "type": "function",
1835
+ "name": "set_owner_account",
1836
+ "inputs": [
1837
+ {
1838
+ "name": "operator_nonce",
1839
+ "type": "core::integer::u64"
1840
+ },
1841
+ {
1842
+ "name": "position_id",
1843
+ "type": "perpetuals::core::types::position::PositionId"
1844
+ },
1845
+ {
1846
+ "name": "new_owner_account",
1847
+ "type": "core::starknet::contract_address::ContractAddress"
1848
+ },
1849
+ {
1850
+ "name": "expiration",
1851
+ "type": "starkware_utils::time::time::Timestamp"
1852
+ }
1853
+ ],
1854
+ "outputs": [],
1855
+ "state_mutability": "external"
1856
+ },
1857
+ {
1858
+ "type": "function",
1859
+ "name": "set_public_key_request",
1860
+ "inputs": [
1861
+ {
1862
+ "name": "signature",
1863
+ "type": "core::array::Span::<core::felt252>"
1864
+ },
1865
+ {
1866
+ "name": "position_id",
1867
+ "type": "perpetuals::core::types::position::PositionId"
1868
+ },
1869
+ {
1870
+ "name": "new_public_key",
1871
+ "type": "core::felt252"
1872
+ },
1873
+ {
1874
+ "name": "expiration",
1875
+ "type": "starkware_utils::time::time::Timestamp"
1876
+ }
1877
+ ],
1878
+ "outputs": [],
1879
+ "state_mutability": "external"
1880
+ },
1881
+ {
1882
+ "type": "function",
1883
+ "name": "set_public_key",
1884
+ "inputs": [
1885
+ {
1886
+ "name": "operator_nonce",
1887
+ "type": "core::integer::u64"
1888
+ },
1889
+ {
1890
+ "name": "position_id",
1891
+ "type": "perpetuals::core::types::position::PositionId"
1892
+ },
1893
+ {
1894
+ "name": "new_public_key",
1895
+ "type": "core::felt252"
1896
+ },
1897
+ {
1898
+ "name": "expiration",
1899
+ "type": "starkware_utils::time::time::Timestamp"
1900
+ }
1901
+ ],
1902
+ "outputs": [],
1903
+ "state_mutability": "external"
1904
+ },
1905
+ {
1906
+ "type": "function",
1907
+ "name": "enable_owner_protection",
1908
+ "inputs": [
1909
+ {
1910
+ "name": "operator_nonce",
1911
+ "type": "core::integer::u64"
1912
+ },
1913
+ {
1914
+ "name": "position_id",
1915
+ "type": "perpetuals::core::types::position::PositionId"
1916
+ },
1917
+ {
1918
+ "name": "signature",
1919
+ "type": "core::array::Span::<core::felt252>"
1920
+ }
1921
+ ],
1922
+ "outputs": [],
1923
+ "state_mutability": "external"
1924
+ }
1925
+ ]
1926
+ },
1927
+ {
1928
+ "type": "constructor",
1929
+ "name": "constructor",
1930
+ "inputs": [
1931
+ {
1932
+ "name": "governance_admin",
1933
+ "type": "core::starknet::contract_address::ContractAddress"
1934
+ },
1935
+ {
1936
+ "name": "upgrade_delay",
1937
+ "type": "core::integer::u64"
1938
+ },
1939
+ {
1940
+ "name": "collateral_id",
1941
+ "type": "perpetuals::core::types::asset::AssetId"
1942
+ },
1943
+ {
1944
+ "name": "collateral_token_address",
1945
+ "type": "core::starknet::contract_address::ContractAddress"
1946
+ },
1947
+ {
1948
+ "name": "collateral_quantum",
1949
+ "type": "core::integer::u64"
1950
+ },
1951
+ {
1952
+ "name": "max_price_interval",
1953
+ "type": "starkware_utils::time::time::TimeDelta"
1954
+ },
1955
+ {
1956
+ "name": "max_oracle_price_validity",
1957
+ "type": "starkware_utils::time::time::TimeDelta"
1958
+ },
1959
+ {
1960
+ "name": "max_funding_interval",
1961
+ "type": "starkware_utils::time::time::TimeDelta"
1962
+ },
1963
+ {
1964
+ "name": "max_funding_rate",
1965
+ "type": "core::integer::u32"
1966
+ },
1967
+ {
1968
+ "name": "cancel_delay",
1969
+ "type": "starkware_utils::time::time::TimeDelta"
1970
+ },
1971
+ {
1972
+ "name": "fee_position_owner_public_key",
1973
+ "type": "core::felt252"
1974
+ },
1975
+ {
1976
+ "name": "insurance_fund_position_owner_public_key",
1977
+ "type": "core::felt252"
1978
+ }
1979
+ ]
1980
+ },
1981
+ {
1982
+ "type": "event",
1983
+ "name": "openzeppelin_access::accesscontrol::accesscontrol::AccessControlComponent::RoleGranted",
1984
+ "kind": "struct",
1985
+ "members": [
1986
+ {
1987
+ "name": "role",
1988
+ "type": "core::felt252",
1989
+ "kind": "data"
1990
+ },
1991
+ {
1992
+ "name": "account",
1993
+ "type": "core::starknet::contract_address::ContractAddress",
1994
+ "kind": "data"
1995
+ },
1996
+ {
1997
+ "name": "sender",
1998
+ "type": "core::starknet::contract_address::ContractAddress",
1999
+ "kind": "data"
2000
+ }
2001
+ ]
2002
+ },
2003
+ {
2004
+ "type": "event",
2005
+ "name": "openzeppelin_access::accesscontrol::accesscontrol::AccessControlComponent::RoleRevoked",
2006
+ "kind": "struct",
2007
+ "members": [
2008
+ {
2009
+ "name": "role",
2010
+ "type": "core::felt252",
2011
+ "kind": "data"
2012
+ },
2013
+ {
2014
+ "name": "account",
2015
+ "type": "core::starknet::contract_address::ContractAddress",
2016
+ "kind": "data"
2017
+ },
2018
+ {
2019
+ "name": "sender",
2020
+ "type": "core::starknet::contract_address::ContractAddress",
2021
+ "kind": "data"
2022
+ }
2023
+ ]
2024
+ },
2025
+ {
2026
+ "type": "event",
2027
+ "name": "openzeppelin_access::accesscontrol::accesscontrol::AccessControlComponent::RoleAdminChanged",
2028
+ "kind": "struct",
2029
+ "members": [
2030
+ {
2031
+ "name": "role",
2032
+ "type": "core::felt252",
2033
+ "kind": "data"
2034
+ },
2035
+ {
2036
+ "name": "previous_admin_role",
2037
+ "type": "core::felt252",
2038
+ "kind": "data"
2039
+ },
2040
+ {
2041
+ "name": "new_admin_role",
2042
+ "type": "core::felt252",
2043
+ "kind": "data"
2044
+ }
2045
+ ]
2046
+ },
2047
+ {
2048
+ "type": "event",
2049
+ "name": "openzeppelin_access::accesscontrol::accesscontrol::AccessControlComponent::Event",
2050
+ "kind": "enum",
2051
+ "variants": [
2052
+ {
2053
+ "name": "RoleGranted",
2054
+ "type": "openzeppelin_access::accesscontrol::accesscontrol::AccessControlComponent::RoleGranted",
2055
+ "kind": "nested"
2056
+ },
2057
+ {
2058
+ "name": "RoleRevoked",
2059
+ "type": "openzeppelin_access::accesscontrol::accesscontrol::AccessControlComponent::RoleRevoked",
2060
+ "kind": "nested"
2061
+ },
2062
+ {
2063
+ "name": "RoleAdminChanged",
2064
+ "type": "openzeppelin_access::accesscontrol::accesscontrol::AccessControlComponent::RoleAdminChanged",
2065
+ "kind": "nested"
2066
+ }
2067
+ ]
2068
+ },
2069
+ {
2070
+ "type": "event",
2071
+ "name": "perpetuals::core::components::operator_nonce::operator_nonce::OperatorNonceComponent::Event",
2072
+ "kind": "enum",
2073
+ "variants": []
2074
+ },
2075
+ {
2076
+ "type": "event",
2077
+ "name": "starkware_utils::components::pausable::pausable::PausableComponent::Paused",
2078
+ "kind": "struct",
2079
+ "members": [
2080
+ {
2081
+ "name": "account",
2082
+ "type": "core::starknet::contract_address::ContractAddress",
2083
+ "kind": "data"
2084
+ }
2085
+ ]
2086
+ },
2087
+ {
2088
+ "type": "event",
2089
+ "name": "starkware_utils::components::pausable::pausable::PausableComponent::Unpaused",
2090
+ "kind": "struct",
2091
+ "members": [
2092
+ {
2093
+ "name": "account",
2094
+ "type": "core::starknet::contract_address::ContractAddress",
2095
+ "kind": "data"
2096
+ }
2097
+ ]
2098
+ },
2099
+ {
2100
+ "type": "event",
2101
+ "name": "starkware_utils::components::pausable::pausable::PausableComponent::Event",
2102
+ "kind": "enum",
2103
+ "variants": [
2104
+ {
2105
+ "name": "Paused",
2106
+ "type": "starkware_utils::components::pausable::pausable::PausableComponent::Paused",
2107
+ "kind": "nested"
2108
+ },
2109
+ {
2110
+ "name": "Unpaused",
2111
+ "type": "starkware_utils::components::pausable::pausable::PausableComponent::Unpaused",
2112
+ "kind": "nested"
2113
+ }
2114
+ ]
2115
+ },
2116
+ {
2117
+ "type": "event",
2118
+ "name": "starkware_utils::components::replaceability::interface::ImplementationAdded",
2119
+ "kind": "struct",
2120
+ "members": [
2121
+ {
2122
+ "name": "implementation_data",
2123
+ "type": "starkware_utils::components::replaceability::interface::ImplementationData",
2124
+ "kind": "data"
2125
+ }
2126
+ ]
2127
+ },
2128
+ {
2129
+ "type": "event",
2130
+ "name": "starkware_utils::components::replaceability::interface::ImplementationRemoved",
2131
+ "kind": "struct",
2132
+ "members": [
2133
+ {
2134
+ "name": "implementation_data",
2135
+ "type": "starkware_utils::components::replaceability::interface::ImplementationData",
2136
+ "kind": "data"
2137
+ }
2138
+ ]
2139
+ },
2140
+ {
2141
+ "type": "event",
2142
+ "name": "starkware_utils::components::replaceability::interface::ImplementationReplaced",
2143
+ "kind": "struct",
2144
+ "members": [
2145
+ {
2146
+ "name": "implementation_data",
2147
+ "type": "starkware_utils::components::replaceability::interface::ImplementationData",
2148
+ "kind": "data"
2149
+ }
2150
+ ]
2151
+ },
2152
+ {
2153
+ "type": "event",
2154
+ "name": "starkware_utils::components::replaceability::interface::ImplementationFinalized",
2155
+ "kind": "struct",
2156
+ "members": [
2157
+ {
2158
+ "name": "impl_hash",
2159
+ "type": "core::starknet::class_hash::ClassHash",
2160
+ "kind": "data"
2161
+ }
2162
+ ]
2163
+ },
2164
+ {
2165
+ "type": "event",
2166
+ "name": "starkware_utils::components::replaceability::replaceability::ReplaceabilityComponent::Event",
2167
+ "kind": "enum",
2168
+ "variants": [
2169
+ {
2170
+ "name": "ImplementationAdded",
2171
+ "type": "starkware_utils::components::replaceability::interface::ImplementationAdded",
2172
+ "kind": "nested"
2173
+ },
2174
+ {
2175
+ "name": "ImplementationRemoved",
2176
+ "type": "starkware_utils::components::replaceability::interface::ImplementationRemoved",
2177
+ "kind": "nested"
2178
+ },
2179
+ {
2180
+ "name": "ImplementationReplaced",
2181
+ "type": "starkware_utils::components::replaceability::interface::ImplementationReplaced",
2182
+ "kind": "nested"
2183
+ },
2184
+ {
2185
+ "name": "ImplementationFinalized",
2186
+ "type": "starkware_utils::components::replaceability::interface::ImplementationFinalized",
2187
+ "kind": "nested"
2188
+ }
2189
+ ]
2190
+ },
2191
+ {
2192
+ "type": "event",
2193
+ "name": "starkware_utils::components::roles::interface::AppGovernorAdded",
2194
+ "kind": "struct",
2195
+ "members": [
2196
+ {
2197
+ "name": "added_account",
2198
+ "type": "core::starknet::contract_address::ContractAddress",
2199
+ "kind": "data"
2200
+ },
2201
+ {
2202
+ "name": "added_by",
2203
+ "type": "core::starknet::contract_address::ContractAddress",
2204
+ "kind": "data"
2205
+ }
2206
+ ]
2207
+ },
2208
+ {
2209
+ "type": "event",
2210
+ "name": "starkware_utils::components::roles::interface::AppGovernorRemoved",
2211
+ "kind": "struct",
2212
+ "members": [
2213
+ {
2214
+ "name": "removed_account",
2215
+ "type": "core::starknet::contract_address::ContractAddress",
2216
+ "kind": "data"
2217
+ },
2218
+ {
2219
+ "name": "removed_by",
2220
+ "type": "core::starknet::contract_address::ContractAddress",
2221
+ "kind": "data"
2222
+ }
2223
+ ]
2224
+ },
2225
+ {
2226
+ "type": "event",
2227
+ "name": "starkware_utils::components::roles::interface::AppRoleAdminAdded",
2228
+ "kind": "struct",
2229
+ "members": [
2230
+ {
2231
+ "name": "added_account",
2232
+ "type": "core::starknet::contract_address::ContractAddress",
2233
+ "kind": "data"
2234
+ },
2235
+ {
2236
+ "name": "added_by",
2237
+ "type": "core::starknet::contract_address::ContractAddress",
2238
+ "kind": "data"
2239
+ }
2240
+ ]
2241
+ },
2242
+ {
2243
+ "type": "event",
2244
+ "name": "starkware_utils::components::roles::interface::AppRoleAdminRemoved",
2245
+ "kind": "struct",
2246
+ "members": [
2247
+ {
2248
+ "name": "removed_account",
2249
+ "type": "core::starknet::contract_address::ContractAddress",
2250
+ "kind": "data"
2251
+ },
2252
+ {
2253
+ "name": "removed_by",
2254
+ "type": "core::starknet::contract_address::ContractAddress",
2255
+ "kind": "data"
2256
+ }
2257
+ ]
2258
+ },
2259
+ {
2260
+ "type": "event",
2261
+ "name": "starkware_utils::components::roles::interface::GovernanceAdminAdded",
2262
+ "kind": "struct",
2263
+ "members": [
2264
+ {
2265
+ "name": "added_account",
2266
+ "type": "core::starknet::contract_address::ContractAddress",
2267
+ "kind": "data"
2268
+ },
2269
+ {
2270
+ "name": "added_by",
2271
+ "type": "core::starknet::contract_address::ContractAddress",
2272
+ "kind": "data"
2273
+ }
2274
+ ]
2275
+ },
2276
+ {
2277
+ "type": "event",
2278
+ "name": "starkware_utils::components::roles::interface::GovernanceAdminRemoved",
2279
+ "kind": "struct",
2280
+ "members": [
2281
+ {
2282
+ "name": "removed_account",
2283
+ "type": "core::starknet::contract_address::ContractAddress",
2284
+ "kind": "data"
2285
+ },
2286
+ {
2287
+ "name": "removed_by",
2288
+ "type": "core::starknet::contract_address::ContractAddress",
2289
+ "kind": "data"
2290
+ }
2291
+ ]
2292
+ },
2293
+ {
2294
+ "type": "event",
2295
+ "name": "starkware_utils::components::roles::interface::OperatorAdded",
2296
+ "kind": "struct",
2297
+ "members": [
2298
+ {
2299
+ "name": "added_account",
2300
+ "type": "core::starknet::contract_address::ContractAddress",
2301
+ "kind": "data"
2302
+ },
2303
+ {
2304
+ "name": "added_by",
2305
+ "type": "core::starknet::contract_address::ContractAddress",
2306
+ "kind": "data"
2307
+ }
2308
+ ]
2309
+ },
2310
+ {
2311
+ "type": "event",
2312
+ "name": "starkware_utils::components::roles::interface::OperatorRemoved",
2313
+ "kind": "struct",
2314
+ "members": [
2315
+ {
2316
+ "name": "removed_account",
2317
+ "type": "core::starknet::contract_address::ContractAddress",
2318
+ "kind": "data"
2319
+ },
2320
+ {
2321
+ "name": "removed_by",
2322
+ "type": "core::starknet::contract_address::ContractAddress",
2323
+ "kind": "data"
2324
+ }
2325
+ ]
2326
+ },
2327
+ {
2328
+ "type": "event",
2329
+ "name": "starkware_utils::components::roles::interface::SecurityAdminAdded",
2330
+ "kind": "struct",
2331
+ "members": [
2332
+ {
2333
+ "name": "added_account",
2334
+ "type": "core::starknet::contract_address::ContractAddress",
2335
+ "kind": "data"
2336
+ },
2337
+ {
2338
+ "name": "added_by",
2339
+ "type": "core::starknet::contract_address::ContractAddress",
2340
+ "kind": "data"
2341
+ }
2342
+ ]
2343
+ },
2344
+ {
2345
+ "type": "event",
2346
+ "name": "starkware_utils::components::roles::interface::SecurityAdminRemoved",
2347
+ "kind": "struct",
2348
+ "members": [
2349
+ {
2350
+ "name": "removed_account",
2351
+ "type": "core::starknet::contract_address::ContractAddress",
2352
+ "kind": "data"
2353
+ },
2354
+ {
2355
+ "name": "removed_by",
2356
+ "type": "core::starknet::contract_address::ContractAddress",
2357
+ "kind": "data"
2358
+ }
2359
+ ]
2360
+ },
2361
+ {
2362
+ "type": "event",
2363
+ "name": "starkware_utils::components::roles::interface::SecurityAgentAdded",
2364
+ "kind": "struct",
2365
+ "members": [
2366
+ {
2367
+ "name": "added_account",
2368
+ "type": "core::starknet::contract_address::ContractAddress",
2369
+ "kind": "data"
2370
+ },
2371
+ {
2372
+ "name": "added_by",
2373
+ "type": "core::starknet::contract_address::ContractAddress",
2374
+ "kind": "data"
2375
+ }
2376
+ ]
2377
+ },
2378
+ {
2379
+ "type": "event",
2380
+ "name": "starkware_utils::components::roles::interface::SecurityAgentRemoved",
2381
+ "kind": "struct",
2382
+ "members": [
2383
+ {
2384
+ "name": "removed_account",
2385
+ "type": "core::starknet::contract_address::ContractAddress",
2386
+ "kind": "data"
2387
+ },
2388
+ {
2389
+ "name": "removed_by",
2390
+ "type": "core::starknet::contract_address::ContractAddress",
2391
+ "kind": "data"
2392
+ }
2393
+ ]
2394
+ },
2395
+ {
2396
+ "type": "event",
2397
+ "name": "starkware_utils::components::roles::interface::TokenAdminAdded",
2398
+ "kind": "struct",
2399
+ "members": [
2400
+ {
2401
+ "name": "added_account",
2402
+ "type": "core::starknet::contract_address::ContractAddress",
2403
+ "kind": "data"
2404
+ },
2405
+ {
2406
+ "name": "added_by",
2407
+ "type": "core::starknet::contract_address::ContractAddress",
2408
+ "kind": "data"
2409
+ }
2410
+ ]
2411
+ },
2412
+ {
2413
+ "type": "event",
2414
+ "name": "starkware_utils::components::roles::interface::TokenAdminRemoved",
2415
+ "kind": "struct",
2416
+ "members": [
2417
+ {
2418
+ "name": "removed_account",
2419
+ "type": "core::starknet::contract_address::ContractAddress",
2420
+ "kind": "data"
2421
+ },
2422
+ {
2423
+ "name": "removed_by",
2424
+ "type": "core::starknet::contract_address::ContractAddress",
2425
+ "kind": "data"
2426
+ }
2427
+ ]
2428
+ },
2429
+ {
2430
+ "type": "event",
2431
+ "name": "starkware_utils::components::roles::interface::UpgradeGovernorAdded",
2432
+ "kind": "struct",
2433
+ "members": [
2434
+ {
2435
+ "name": "added_account",
2436
+ "type": "core::starknet::contract_address::ContractAddress",
2437
+ "kind": "data"
2438
+ },
2439
+ {
2440
+ "name": "added_by",
2441
+ "type": "core::starknet::contract_address::ContractAddress",
2442
+ "kind": "data"
2443
+ }
2444
+ ]
2445
+ },
2446
+ {
2447
+ "type": "event",
2448
+ "name": "starkware_utils::components::roles::interface::UpgradeGovernorRemoved",
2449
+ "kind": "struct",
2450
+ "members": [
2451
+ {
2452
+ "name": "removed_account",
2453
+ "type": "core::starknet::contract_address::ContractAddress",
2454
+ "kind": "data"
2455
+ },
2456
+ {
2457
+ "name": "removed_by",
2458
+ "type": "core::starknet::contract_address::ContractAddress",
2459
+ "kind": "data"
2460
+ }
2461
+ ]
2462
+ },
2463
+ {
2464
+ "type": "event",
2465
+ "name": "starkware_utils::components::roles::roles::RolesComponent::Event",
2466
+ "kind": "enum",
2467
+ "variants": [
2468
+ {
2469
+ "name": "AppGovernorAdded",
2470
+ "type": "starkware_utils::components::roles::interface::AppGovernorAdded",
2471
+ "kind": "nested"
2472
+ },
2473
+ {
2474
+ "name": "AppGovernorRemoved",
2475
+ "type": "starkware_utils::components::roles::interface::AppGovernorRemoved",
2476
+ "kind": "nested"
2477
+ },
2478
+ {
2479
+ "name": "AppRoleAdminAdded",
2480
+ "type": "starkware_utils::components::roles::interface::AppRoleAdminAdded",
2481
+ "kind": "nested"
2482
+ },
2483
+ {
2484
+ "name": "AppRoleAdminRemoved",
2485
+ "type": "starkware_utils::components::roles::interface::AppRoleAdminRemoved",
2486
+ "kind": "nested"
2487
+ },
2488
+ {
2489
+ "name": "GovernanceAdminAdded",
2490
+ "type": "starkware_utils::components::roles::interface::GovernanceAdminAdded",
2491
+ "kind": "nested"
2492
+ },
2493
+ {
2494
+ "name": "GovernanceAdminRemoved",
2495
+ "type": "starkware_utils::components::roles::interface::GovernanceAdminRemoved",
2496
+ "kind": "nested"
2497
+ },
2498
+ {
2499
+ "name": "OperatorAdded",
2500
+ "type": "starkware_utils::components::roles::interface::OperatorAdded",
2501
+ "kind": "nested"
2502
+ },
2503
+ {
2504
+ "name": "OperatorRemoved",
2505
+ "type": "starkware_utils::components::roles::interface::OperatorRemoved",
2506
+ "kind": "nested"
2507
+ },
2508
+ {
2509
+ "name": "SecurityAdminAdded",
2510
+ "type": "starkware_utils::components::roles::interface::SecurityAdminAdded",
2511
+ "kind": "nested"
2512
+ },
2513
+ {
2514
+ "name": "SecurityAdminRemoved",
2515
+ "type": "starkware_utils::components::roles::interface::SecurityAdminRemoved",
2516
+ "kind": "nested"
2517
+ },
2518
+ {
2519
+ "name": "SecurityAgentAdded",
2520
+ "type": "starkware_utils::components::roles::interface::SecurityAgentAdded",
2521
+ "kind": "nested"
2522
+ },
2523
+ {
2524
+ "name": "SecurityAgentRemoved",
2525
+ "type": "starkware_utils::components::roles::interface::SecurityAgentRemoved",
2526
+ "kind": "nested"
2527
+ },
2528
+ {
2529
+ "name": "TokenAdminAdded",
2530
+ "type": "starkware_utils::components::roles::interface::TokenAdminAdded",
2531
+ "kind": "nested"
2532
+ },
2533
+ {
2534
+ "name": "TokenAdminRemoved",
2535
+ "type": "starkware_utils::components::roles::interface::TokenAdminRemoved",
2536
+ "kind": "nested"
2537
+ },
2538
+ {
2539
+ "name": "UpgradeGovernorAdded",
2540
+ "type": "starkware_utils::components::roles::interface::UpgradeGovernorAdded",
2541
+ "kind": "nested"
2542
+ },
2543
+ {
2544
+ "name": "UpgradeGovernorRemoved",
2545
+ "type": "starkware_utils::components::roles::interface::UpgradeGovernorRemoved",
2546
+ "kind": "nested"
2547
+ }
2548
+ ]
2549
+ },
2550
+ {
2551
+ "type": "event",
2552
+ "name": "openzeppelin_introspection::src5::SRC5Component::Event",
2553
+ "kind": "enum",
2554
+ "variants": []
2555
+ },
2556
+ {
2557
+ "type": "event",
2558
+ "name": "perpetuals::core::components::assets::events::OracleAdded",
2559
+ "kind": "struct",
2560
+ "members": [
2561
+ {
2562
+ "name": "asset_id",
2563
+ "type": "perpetuals::core::types::asset::AssetId",
2564
+ "kind": "key"
2565
+ },
2566
+ {
2567
+ "name": "asset_name",
2568
+ "type": "core::felt252",
2569
+ "kind": "data"
2570
+ },
2571
+ {
2572
+ "name": "oracle_public_key",
2573
+ "type": "core::felt252",
2574
+ "kind": "key"
2575
+ },
2576
+ {
2577
+ "name": "oracle_name",
2578
+ "type": "core::felt252",
2579
+ "kind": "data"
2580
+ }
2581
+ ]
2582
+ },
2583
+ {
2584
+ "type": "event",
2585
+ "name": "perpetuals::core::components::assets::events::SyntheticAdded",
2586
+ "kind": "struct",
2587
+ "members": [
2588
+ {
2589
+ "name": "asset_id",
2590
+ "type": "perpetuals::core::types::asset::AssetId",
2591
+ "kind": "key"
2592
+ },
2593
+ {
2594
+ "name": "risk_factor_tiers",
2595
+ "type": "core::array::Span::<core::integer::u16>",
2596
+ "kind": "data"
2597
+ },
2598
+ {
2599
+ "name": "risk_factor_first_tier_boundary",
2600
+ "type": "core::integer::u128",
2601
+ "kind": "data"
2602
+ },
2603
+ {
2604
+ "name": "risk_factor_tier_size",
2605
+ "type": "core::integer::u128",
2606
+ "kind": "data"
2607
+ },
2608
+ {
2609
+ "name": "resolution_factor",
2610
+ "type": "core::integer::u64",
2611
+ "kind": "data"
2612
+ },
2613
+ {
2614
+ "name": "quorum",
2615
+ "type": "core::integer::u8",
2616
+ "kind": "data"
2617
+ }
2618
+ ]
2619
+ },
2620
+ {
2621
+ "type": "event",
2622
+ "name": "perpetuals::core::components::assets::events::AssetActivated",
2623
+ "kind": "struct",
2624
+ "members": [
2625
+ {
2626
+ "name": "asset_id",
2627
+ "type": "perpetuals::core::types::asset::AssetId",
2628
+ "kind": "key"
2629
+ }
2630
+ ]
2631
+ },
2632
+ {
2633
+ "type": "event",
2634
+ "name": "perpetuals::core::components::assets::events::SyntheticAssetDeactivated",
2635
+ "kind": "struct",
2636
+ "members": [
2637
+ {
2638
+ "name": "asset_id",
2639
+ "type": "perpetuals::core::types::asset::AssetId",
2640
+ "kind": "key"
2641
+ }
2642
+ ]
2643
+ },
2644
+ {
2645
+ "type": "event",
2646
+ "name": "perpetuals::core::components::assets::events::FundingTick",
2647
+ "kind": "struct",
2648
+ "members": [
2649
+ {
2650
+ "name": "asset_id",
2651
+ "type": "perpetuals::core::types::asset::AssetId",
2652
+ "kind": "key"
2653
+ },
2654
+ {
2655
+ "name": "funding_index",
2656
+ "type": "perpetuals::core::types::funding::FundingIndex",
2657
+ "kind": "data"
2658
+ }
2659
+ ]
2660
+ },
2661
+ {
2662
+ "type": "event",
2663
+ "name": "perpetuals::core::components::assets::events::PriceTick",
2664
+ "kind": "struct",
2665
+ "members": [
2666
+ {
2667
+ "name": "asset_id",
2668
+ "type": "perpetuals::core::types::asset::AssetId",
2669
+ "kind": "key"
2670
+ },
2671
+ {
2672
+ "name": "price",
2673
+ "type": "perpetuals::core::types::price::Price",
2674
+ "kind": "data"
2675
+ }
2676
+ ]
2677
+ },
2678
+ {
2679
+ "type": "event",
2680
+ "name": "perpetuals::core::components::assets::events::OracleRemoved",
2681
+ "kind": "struct",
2682
+ "members": [
2683
+ {
2684
+ "name": "asset_id",
2685
+ "type": "perpetuals::core::types::asset::AssetId",
2686
+ "kind": "key"
2687
+ },
2688
+ {
2689
+ "name": "oracle_public_key",
2690
+ "type": "core::felt252",
2691
+ "kind": "key"
2692
+ }
2693
+ ]
2694
+ },
2695
+ {
2696
+ "type": "event",
2697
+ "name": "perpetuals::core::components::assets::events::AssetQuorumUpdated",
2698
+ "kind": "struct",
2699
+ "members": [
2700
+ {
2701
+ "name": "asset_id",
2702
+ "type": "perpetuals::core::types::asset::AssetId",
2703
+ "kind": "key"
2704
+ },
2705
+ {
2706
+ "name": "new_quorum",
2707
+ "type": "core::integer::u8",
2708
+ "kind": "data"
2709
+ },
2710
+ {
2711
+ "name": "old_quorum",
2712
+ "type": "core::integer::u8",
2713
+ "kind": "data"
2714
+ }
2715
+ ]
2716
+ },
2717
+ {
2718
+ "type": "event",
2719
+ "name": "perpetuals::core::components::assets::assets::AssetsComponent::Event",
2720
+ "kind": "enum",
2721
+ "variants": [
2722
+ {
2723
+ "name": "OracleAdded",
2724
+ "type": "perpetuals::core::components::assets::events::OracleAdded",
2725
+ "kind": "nested"
2726
+ },
2727
+ {
2728
+ "name": "SyntheticAdded",
2729
+ "type": "perpetuals::core::components::assets::events::SyntheticAdded",
2730
+ "kind": "nested"
2731
+ },
2732
+ {
2733
+ "name": "AssetActivated",
2734
+ "type": "perpetuals::core::components::assets::events::AssetActivated",
2735
+ "kind": "nested"
2736
+ },
2737
+ {
2738
+ "name": "SyntheticAssetDeactivated",
2739
+ "type": "perpetuals::core::components::assets::events::SyntheticAssetDeactivated",
2740
+ "kind": "nested"
2741
+ },
2742
+ {
2743
+ "name": "FundingTick",
2744
+ "type": "perpetuals::core::components::assets::events::FundingTick",
2745
+ "kind": "nested"
2746
+ },
2747
+ {
2748
+ "name": "PriceTick",
2749
+ "type": "perpetuals::core::components::assets::events::PriceTick",
2750
+ "kind": "nested"
2751
+ },
2752
+ {
2753
+ "name": "OracleRemoved",
2754
+ "type": "perpetuals::core::components::assets::events::OracleRemoved",
2755
+ "kind": "nested"
2756
+ },
2757
+ {
2758
+ "name": "AssetQuorumUpdated",
2759
+ "type": "perpetuals::core::components::assets::events::AssetQuorumUpdated",
2760
+ "kind": "nested"
2761
+ }
2762
+ ]
2763
+ },
2764
+ {
2765
+ "type": "event",
2766
+ "name": "perpetuals::core::components::deposit::events::Deposit",
2767
+ "kind": "struct",
2768
+ "members": [
2769
+ {
2770
+ "name": "position_id",
2771
+ "type": "perpetuals::core::types::position::PositionId",
2772
+ "kind": "key"
2773
+ },
2774
+ {
2775
+ "name": "depositing_address",
2776
+ "type": "core::starknet::contract_address::ContractAddress",
2777
+ "kind": "key"
2778
+ },
2779
+ {
2780
+ "name": "collateral_id",
2781
+ "type": "perpetuals::core::types::asset::AssetId",
2782
+ "kind": "data"
2783
+ },
2784
+ {
2785
+ "name": "quantized_amount",
2786
+ "type": "core::integer::u64",
2787
+ "kind": "data"
2788
+ },
2789
+ {
2790
+ "name": "unquantized_amount",
2791
+ "type": "core::integer::u64",
2792
+ "kind": "data"
2793
+ },
2794
+ {
2795
+ "name": "deposit_request_hash",
2796
+ "type": "core::felt252",
2797
+ "kind": "key"
2798
+ },
2799
+ {
2800
+ "name": "salt",
2801
+ "type": "core::felt252",
2802
+ "kind": "data"
2803
+ }
2804
+ ]
2805
+ },
2806
+ {
2807
+ "type": "event",
2808
+ "name": "perpetuals::core::components::deposit::events::DepositCanceled",
2809
+ "kind": "struct",
2810
+ "members": [
2811
+ {
2812
+ "name": "position_id",
2813
+ "type": "perpetuals::core::types::position::PositionId",
2814
+ "kind": "key"
2815
+ },
2816
+ {
2817
+ "name": "depositing_address",
2818
+ "type": "core::starknet::contract_address::ContractAddress",
2819
+ "kind": "key"
2820
+ },
2821
+ {
2822
+ "name": "collateral_id",
2823
+ "type": "perpetuals::core::types::asset::AssetId",
2824
+ "kind": "data"
2825
+ },
2826
+ {
2827
+ "name": "quantized_amount",
2828
+ "type": "core::integer::u64",
2829
+ "kind": "data"
2830
+ },
2831
+ {
2832
+ "name": "unquantized_amount",
2833
+ "type": "core::integer::u64",
2834
+ "kind": "data"
2835
+ },
2836
+ {
2837
+ "name": "deposit_request_hash",
2838
+ "type": "core::felt252",
2839
+ "kind": "key"
2840
+ },
2841
+ {
2842
+ "name": "salt",
2843
+ "type": "core::felt252",
2844
+ "kind": "data"
2845
+ }
2846
+ ]
2847
+ },
2848
+ {
2849
+ "type": "event",
2850
+ "name": "perpetuals::core::components::deposit::events::DepositProcessed",
2851
+ "kind": "struct",
2852
+ "members": [
2853
+ {
2854
+ "name": "position_id",
2855
+ "type": "perpetuals::core::types::position::PositionId",
2856
+ "kind": "key"
2857
+ },
2858
+ {
2859
+ "name": "depositing_address",
2860
+ "type": "core::starknet::contract_address::ContractAddress",
2861
+ "kind": "key"
2862
+ },
2863
+ {
2864
+ "name": "collateral_id",
2865
+ "type": "perpetuals::core::types::asset::AssetId",
2866
+ "kind": "data"
2867
+ },
2868
+ {
2869
+ "name": "quantized_amount",
2870
+ "type": "core::integer::u64",
2871
+ "kind": "data"
2872
+ },
2873
+ {
2874
+ "name": "unquantized_amount",
2875
+ "type": "core::integer::u64",
2876
+ "kind": "data"
2877
+ },
2878
+ {
2879
+ "name": "deposit_request_hash",
2880
+ "type": "core::felt252",
2881
+ "kind": "key"
2882
+ },
2883
+ {
2884
+ "name": "salt",
2885
+ "type": "core::felt252",
2886
+ "kind": "data"
2887
+ }
2888
+ ]
2889
+ },
2890
+ {
2891
+ "type": "event",
2892
+ "name": "perpetuals::core::components::deposit::deposit::Deposit::Event",
2893
+ "kind": "enum",
2894
+ "variants": [
2895
+ {
2896
+ "name": "Deposit",
2897
+ "type": "perpetuals::core::components::deposit::events::Deposit",
2898
+ "kind": "nested"
2899
+ },
2900
+ {
2901
+ "name": "DepositCanceled",
2902
+ "type": "perpetuals::core::components::deposit::events::DepositCanceled",
2903
+ "kind": "nested"
2904
+ },
2905
+ {
2906
+ "name": "DepositProcessed",
2907
+ "type": "perpetuals::core::components::deposit::events::DepositProcessed",
2908
+ "kind": "nested"
2909
+ }
2910
+ ]
2911
+ },
2912
+ {
2913
+ "type": "event",
2914
+ "name": "starkware_utils::components::request_approvals::request_approvals::RequestApprovalsComponent::Event",
2915
+ "kind": "enum",
2916
+ "variants": []
2917
+ },
2918
+ {
2919
+ "type": "event",
2920
+ "name": "perpetuals::core::components::positions::events::NewPosition",
2921
+ "kind": "struct",
2922
+ "members": [
2923
+ {
2924
+ "name": "position_id",
2925
+ "type": "perpetuals::core::types::position::PositionId",
2926
+ "kind": "key"
2927
+ },
2928
+ {
2929
+ "name": "owner_public_key",
2930
+ "type": "core::felt252",
2931
+ "kind": "key"
2932
+ },
2933
+ {
2934
+ "name": "owner_account",
2935
+ "type": "core::starknet::contract_address::ContractAddress",
2936
+ "kind": "key"
2937
+ }
2938
+ ]
2939
+ },
2940
+ {
2941
+ "type": "event",
2942
+ "name": "perpetuals::core::components::positions::events::SetOwnerAccount",
2943
+ "kind": "struct",
2944
+ "members": [
2945
+ {
2946
+ "name": "position_id",
2947
+ "type": "perpetuals::core::types::position::PositionId",
2948
+ "kind": "key"
2949
+ },
2950
+ {
2951
+ "name": "public_key",
2952
+ "type": "core::felt252",
2953
+ "kind": "key"
2954
+ },
2955
+ {
2956
+ "name": "new_owner_account",
2957
+ "type": "core::starknet::contract_address::ContractAddress",
2958
+ "kind": "key"
2959
+ },
2960
+ {
2961
+ "name": "set_owner_account_hash",
2962
+ "type": "core::felt252",
2963
+ "kind": "data"
2964
+ }
2965
+ ]
2966
+ },
2967
+ {
2968
+ "type": "event",
2969
+ "name": "perpetuals::core::components::positions::events::SetOwnerAccountRequest",
2970
+ "kind": "struct",
2971
+ "members": [
2972
+ {
2973
+ "name": "position_id",
2974
+ "type": "perpetuals::core::types::position::PositionId",
2975
+ "kind": "key"
2976
+ },
2977
+ {
2978
+ "name": "public_key",
2979
+ "type": "core::felt252",
2980
+ "kind": "key"
2981
+ },
2982
+ {
2983
+ "name": "new_owner_account",
2984
+ "type": "core::starknet::contract_address::ContractAddress",
2985
+ "kind": "key"
2986
+ },
2987
+ {
2988
+ "name": "expiration",
2989
+ "type": "starkware_utils::time::time::Timestamp",
2990
+ "kind": "data"
2991
+ },
2992
+ {
2993
+ "name": "set_owner_account_hash",
2994
+ "type": "core::felt252",
2995
+ "kind": "data"
2996
+ }
2997
+ ]
2998
+ },
2999
+ {
3000
+ "type": "event",
3001
+ "name": "perpetuals::core::components::positions::events::SetPublicKey",
3002
+ "kind": "struct",
3003
+ "members": [
3004
+ {
3005
+ "name": "position_id",
3006
+ "type": "perpetuals::core::types::position::PositionId",
3007
+ "kind": "key"
3008
+ },
3009
+ {
3010
+ "name": "new_public_key",
3011
+ "type": "core::felt252",
3012
+ "kind": "key"
3013
+ },
3014
+ {
3015
+ "name": "old_public_key",
3016
+ "type": "core::felt252",
3017
+ "kind": "data"
3018
+ },
3019
+ {
3020
+ "name": "set_public_key_request_hash",
3021
+ "type": "core::felt252",
3022
+ "kind": "key"
3023
+ }
3024
+ ]
3025
+ },
3026
+ {
3027
+ "type": "event",
3028
+ "name": "perpetuals::core::components::positions::events::SetPublicKeyRequest",
3029
+ "kind": "struct",
3030
+ "members": [
3031
+ {
3032
+ "name": "position_id",
3033
+ "type": "perpetuals::core::types::position::PositionId",
3034
+ "kind": "key"
3035
+ },
3036
+ {
3037
+ "name": "new_public_key",
3038
+ "type": "core::felt252",
3039
+ "kind": "key"
3040
+ },
3041
+ {
3042
+ "name": "old_public_key",
3043
+ "type": "core::felt252",
3044
+ "kind": "data"
3045
+ },
3046
+ {
3047
+ "name": "expiration",
3048
+ "type": "starkware_utils::time::time::Timestamp",
3049
+ "kind": "data"
3050
+ },
3051
+ {
3052
+ "name": "set_public_key_request_hash",
3053
+ "type": "core::felt252",
3054
+ "kind": "key"
3055
+ }
3056
+ ]
3057
+ },
3058
+ {
3059
+ "type": "event",
3060
+ "name": "perpetuals::core::components::positions::positions::Positions::Event",
3061
+ "kind": "enum",
3062
+ "variants": [
3063
+ {
3064
+ "name": "NewPosition",
3065
+ "type": "perpetuals::core::components::positions::events::NewPosition",
3066
+ "kind": "nested"
3067
+ },
3068
+ {
3069
+ "name": "SetOwnerAccount",
3070
+ "type": "perpetuals::core::components::positions::events::SetOwnerAccount",
3071
+ "kind": "nested"
3072
+ },
3073
+ {
3074
+ "name": "SetOwnerAccountRequest",
3075
+ "type": "perpetuals::core::components::positions::events::SetOwnerAccountRequest",
3076
+ "kind": "nested"
3077
+ },
3078
+ {
3079
+ "name": "SetPublicKey",
3080
+ "type": "perpetuals::core::components::positions::events::SetPublicKey",
3081
+ "kind": "nested"
3082
+ },
3083
+ {
3084
+ "name": "SetPublicKeyRequest",
3085
+ "type": "perpetuals::core::components::positions::events::SetPublicKeyRequest",
3086
+ "kind": "nested"
3087
+ }
3088
+ ]
3089
+ },
3090
+ {
3091
+ "type": "event",
3092
+ "name": "perpetuals::core::events::Deleverage",
3093
+ "kind": "struct",
3094
+ "members": [
3095
+ {
3096
+ "name": "deleveraged_position_id",
3097
+ "type": "perpetuals::core::types::position::PositionId",
3098
+ "kind": "key"
3099
+ },
3100
+ {
3101
+ "name": "deleverager_position_id",
3102
+ "type": "perpetuals::core::types::position::PositionId",
3103
+ "kind": "key"
3104
+ },
3105
+ {
3106
+ "name": "base_asset_id",
3107
+ "type": "perpetuals::core::types::asset::AssetId",
3108
+ "kind": "data"
3109
+ },
3110
+ {
3111
+ "name": "deleveraged_base_amount",
3112
+ "type": "core::integer::i64",
3113
+ "kind": "data"
3114
+ },
3115
+ {
3116
+ "name": "quote_asset_id",
3117
+ "type": "perpetuals::core::types::asset::AssetId",
3118
+ "kind": "data"
3119
+ },
3120
+ {
3121
+ "name": "deleveraged_quote_amount",
3122
+ "type": "core::integer::i64",
3123
+ "kind": "data"
3124
+ }
3125
+ ]
3126
+ },
3127
+ {
3128
+ "type": "event",
3129
+ "name": "perpetuals::core::events::InactiveAssetPositionReduced",
3130
+ "kind": "struct",
3131
+ "members": [
3132
+ {
3133
+ "name": "position_id_a",
3134
+ "type": "perpetuals::core::types::position::PositionId",
3135
+ "kind": "key"
3136
+ },
3137
+ {
3138
+ "name": "position_id_b",
3139
+ "type": "perpetuals::core::types::position::PositionId",
3140
+ "kind": "key"
3141
+ },
3142
+ {
3143
+ "name": "base_asset_id",
3144
+ "type": "perpetuals::core::types::asset::AssetId",
3145
+ "kind": "data"
3146
+ },
3147
+ {
3148
+ "name": "base_amount_a",
3149
+ "type": "core::integer::i64",
3150
+ "kind": "data"
3151
+ },
3152
+ {
3153
+ "name": "quote_asset_id",
3154
+ "type": "perpetuals::core::types::asset::AssetId",
3155
+ "kind": "data"
3156
+ },
3157
+ {
3158
+ "name": "quote_amount_a",
3159
+ "type": "core::integer::i64",
3160
+ "kind": "data"
3161
+ }
3162
+ ]
3163
+ },
3164
+ {
3165
+ "type": "event",
3166
+ "name": "perpetuals::core::events::Liquidate",
3167
+ "kind": "struct",
3168
+ "members": [
3169
+ {
3170
+ "name": "liquidated_position_id",
3171
+ "type": "perpetuals::core::types::position::PositionId",
3172
+ "kind": "key"
3173
+ },
3174
+ {
3175
+ "name": "liquidator_order_position_id",
3176
+ "type": "perpetuals::core::types::position::PositionId",
3177
+ "kind": "key"
3178
+ },
3179
+ {
3180
+ "name": "liquidator_order_base_asset_id",
3181
+ "type": "perpetuals::core::types::asset::AssetId",
3182
+ "kind": "data"
3183
+ },
3184
+ {
3185
+ "name": "liquidator_order_base_amount",
3186
+ "type": "core::integer::i64",
3187
+ "kind": "data"
3188
+ },
3189
+ {
3190
+ "name": "liquidator_order_quote_asset_id",
3191
+ "type": "perpetuals::core::types::asset::AssetId",
3192
+ "kind": "data"
3193
+ },
3194
+ {
3195
+ "name": "liquidator_order_quote_amount",
3196
+ "type": "core::integer::i64",
3197
+ "kind": "data"
3198
+ },
3199
+ {
3200
+ "name": "liquidator_order_fee_asset_id",
3201
+ "type": "perpetuals::core::types::asset::AssetId",
3202
+ "kind": "data"
3203
+ },
3204
+ {
3205
+ "name": "liquidator_order_fee_amount",
3206
+ "type": "core::integer::u64",
3207
+ "kind": "data"
3208
+ },
3209
+ {
3210
+ "name": "actual_amount_base_liquidated",
3211
+ "type": "core::integer::i64",
3212
+ "kind": "data"
3213
+ },
3214
+ {
3215
+ "name": "actual_amount_quote_liquidated",
3216
+ "type": "core::integer::i64",
3217
+ "kind": "data"
3218
+ },
3219
+ {
3220
+ "name": "actual_liquidator_fee",
3221
+ "type": "core::integer::u64",
3222
+ "kind": "data"
3223
+ },
3224
+ {
3225
+ "name": "insurance_fund_fee_asset_id",
3226
+ "type": "perpetuals::core::types::asset::AssetId",
3227
+ "kind": "data"
3228
+ },
3229
+ {
3230
+ "name": "insurance_fund_fee_amount",
3231
+ "type": "core::integer::u64",
3232
+ "kind": "data"
3233
+ },
3234
+ {
3235
+ "name": "liquidator_order_hash",
3236
+ "type": "core::felt252",
3237
+ "kind": "key"
3238
+ }
3239
+ ]
3240
+ },
3241
+ {
3242
+ "type": "event",
3243
+ "name": "perpetuals::core::events::Trade",
3244
+ "kind": "struct",
3245
+ "members": [
3246
+ {
3247
+ "name": "order_a_position_id",
3248
+ "type": "perpetuals::core::types::position::PositionId",
3249
+ "kind": "key"
3250
+ },
3251
+ {
3252
+ "name": "order_a_base_asset_id",
3253
+ "type": "perpetuals::core::types::asset::AssetId",
3254
+ "kind": "data"
3255
+ },
3256
+ {
3257
+ "name": "order_a_base_amount",
3258
+ "type": "core::integer::i64",
3259
+ "kind": "data"
3260
+ },
3261
+ {
3262
+ "name": "order_a_quote_asset_id",
3263
+ "type": "perpetuals::core::types::asset::AssetId",
3264
+ "kind": "data"
3265
+ },
3266
+ {
3267
+ "name": "order_a_quote_amount",
3268
+ "type": "core::integer::i64",
3269
+ "kind": "data"
3270
+ },
3271
+ {
3272
+ "name": "fee_a_asset_id",
3273
+ "type": "perpetuals::core::types::asset::AssetId",
3274
+ "kind": "data"
3275
+ },
3276
+ {
3277
+ "name": "fee_a_amount",
3278
+ "type": "core::integer::u64",
3279
+ "kind": "data"
3280
+ },
3281
+ {
3282
+ "name": "order_b_position_id",
3283
+ "type": "perpetuals::core::types::position::PositionId",
3284
+ "kind": "key"
3285
+ },
3286
+ {
3287
+ "name": "order_b_base_asset_id",
3288
+ "type": "perpetuals::core::types::asset::AssetId",
3289
+ "kind": "data"
3290
+ },
3291
+ {
3292
+ "name": "order_b_base_amount",
3293
+ "type": "core::integer::i64",
3294
+ "kind": "data"
3295
+ },
3296
+ {
3297
+ "name": "order_b_quote_asset_id",
3298
+ "type": "perpetuals::core::types::asset::AssetId",
3299
+ "kind": "data"
3300
+ },
3301
+ {
3302
+ "name": "order_b_quote_amount",
3303
+ "type": "core::integer::i64",
3304
+ "kind": "data"
3305
+ },
3306
+ {
3307
+ "name": "fee_b_asset_id",
3308
+ "type": "perpetuals::core::types::asset::AssetId",
3309
+ "kind": "data"
3310
+ },
3311
+ {
3312
+ "name": "fee_b_amount",
3313
+ "type": "core::integer::u64",
3314
+ "kind": "data"
3315
+ },
3316
+ {
3317
+ "name": "actual_amount_base_a",
3318
+ "type": "core::integer::i64",
3319
+ "kind": "data"
3320
+ },
3321
+ {
3322
+ "name": "actual_amount_quote_a",
3323
+ "type": "core::integer::i64",
3324
+ "kind": "data"
3325
+ },
3326
+ {
3327
+ "name": "actual_fee_a",
3328
+ "type": "core::integer::u64",
3329
+ "kind": "data"
3330
+ },
3331
+ {
3332
+ "name": "actual_fee_b",
3333
+ "type": "core::integer::u64",
3334
+ "kind": "data"
3335
+ },
3336
+ {
3337
+ "name": "order_a_hash",
3338
+ "type": "core::felt252",
3339
+ "kind": "key"
3340
+ },
3341
+ {
3342
+ "name": "order_b_hash",
3343
+ "type": "core::felt252",
3344
+ "kind": "key"
3345
+ }
3346
+ ]
3347
+ },
3348
+ {
3349
+ "type": "event",
3350
+ "name": "perpetuals::core::events::Transfer",
3351
+ "kind": "struct",
3352
+ "members": [
3353
+ {
3354
+ "name": "recipient",
3355
+ "type": "perpetuals::core::types::position::PositionId",
3356
+ "kind": "key"
3357
+ },
3358
+ {
3359
+ "name": "position_id",
3360
+ "type": "perpetuals::core::types::position::PositionId",
3361
+ "kind": "key"
3362
+ },
3363
+ {
3364
+ "name": "collateral_id",
3365
+ "type": "perpetuals::core::types::asset::AssetId",
3366
+ "kind": "data"
3367
+ },
3368
+ {
3369
+ "name": "amount",
3370
+ "type": "core::integer::u64",
3371
+ "kind": "data"
3372
+ },
3373
+ {
3374
+ "name": "expiration",
3375
+ "type": "starkware_utils::time::time::Timestamp",
3376
+ "kind": "data"
3377
+ },
3378
+ {
3379
+ "name": "transfer_request_hash",
3380
+ "type": "core::felt252",
3381
+ "kind": "key"
3382
+ },
3383
+ {
3384
+ "name": "salt",
3385
+ "type": "core::felt252",
3386
+ "kind": "data"
3387
+ }
3388
+ ]
3389
+ },
3390
+ {
3391
+ "type": "event",
3392
+ "name": "perpetuals::core::events::TransferRequest",
3393
+ "kind": "struct",
3394
+ "members": [
3395
+ {
3396
+ "name": "recipient",
3397
+ "type": "perpetuals::core::types::position::PositionId",
3398
+ "kind": "key"
3399
+ },
3400
+ {
3401
+ "name": "position_id",
3402
+ "type": "perpetuals::core::types::position::PositionId",
3403
+ "kind": "key"
3404
+ },
3405
+ {
3406
+ "name": "collateral_id",
3407
+ "type": "perpetuals::core::types::asset::AssetId",
3408
+ "kind": "data"
3409
+ },
3410
+ {
3411
+ "name": "amount",
3412
+ "type": "core::integer::u64",
3413
+ "kind": "data"
3414
+ },
3415
+ {
3416
+ "name": "expiration",
3417
+ "type": "starkware_utils::time::time::Timestamp",
3418
+ "kind": "data"
3419
+ },
3420
+ {
3421
+ "name": "transfer_request_hash",
3422
+ "type": "core::felt252",
3423
+ "kind": "key"
3424
+ },
3425
+ {
3426
+ "name": "salt",
3427
+ "type": "core::felt252",
3428
+ "kind": "data"
3429
+ }
3430
+ ]
3431
+ },
3432
+ {
3433
+ "type": "event",
3434
+ "name": "perpetuals::core::events::Withdraw",
3435
+ "kind": "struct",
3436
+ "members": [
3437
+ {
3438
+ "name": "position_id",
3439
+ "type": "perpetuals::core::types::position::PositionId",
3440
+ "kind": "key"
3441
+ },
3442
+ {
3443
+ "name": "recipient",
3444
+ "type": "core::starknet::contract_address::ContractAddress",
3445
+ "kind": "key"
3446
+ },
3447
+ {
3448
+ "name": "collateral_id",
3449
+ "type": "perpetuals::core::types::asset::AssetId",
3450
+ "kind": "data"
3451
+ },
3452
+ {
3453
+ "name": "amount",
3454
+ "type": "core::integer::u64",
3455
+ "kind": "data"
3456
+ },
3457
+ {
3458
+ "name": "expiration",
3459
+ "type": "starkware_utils::time::time::Timestamp",
3460
+ "kind": "data"
3461
+ },
3462
+ {
3463
+ "name": "withdraw_request_hash",
3464
+ "type": "core::felt252",
3465
+ "kind": "key"
3466
+ },
3467
+ {
3468
+ "name": "salt",
3469
+ "type": "core::felt252",
3470
+ "kind": "data"
3471
+ }
3472
+ ]
3473
+ },
3474
+ {
3475
+ "type": "event",
3476
+ "name": "perpetuals::core::events::WithdrawRequest",
3477
+ "kind": "struct",
3478
+ "members": [
3479
+ {
3480
+ "name": "position_id",
3481
+ "type": "perpetuals::core::types::position::PositionId",
3482
+ "kind": "key"
3483
+ },
3484
+ {
3485
+ "name": "recipient",
3486
+ "type": "core::starknet::contract_address::ContractAddress",
3487
+ "kind": "key"
3488
+ },
3489
+ {
3490
+ "name": "collateral_id",
3491
+ "type": "perpetuals::core::types::asset::AssetId",
3492
+ "kind": "data"
3493
+ },
3494
+ {
3495
+ "name": "amount",
3496
+ "type": "core::integer::u64",
3497
+ "kind": "data"
3498
+ },
3499
+ {
3500
+ "name": "expiration",
3501
+ "type": "starkware_utils::time::time::Timestamp",
3502
+ "kind": "data"
3503
+ },
3504
+ {
3505
+ "name": "withdraw_request_hash",
3506
+ "type": "core::felt252",
3507
+ "kind": "key"
3508
+ },
3509
+ {
3510
+ "name": "salt",
3511
+ "type": "core::felt252",
3512
+ "kind": "data"
3513
+ }
3514
+ ]
3515
+ },
3516
+ {
3517
+ "type": "event",
3518
+ "name": "perpetuals::core::core::Core::Event",
3519
+ "kind": "enum",
3520
+ "variants": [
3521
+ {
3522
+ "name": "AccessControlEvent",
3523
+ "type": "openzeppelin_access::accesscontrol::accesscontrol::AccessControlComponent::Event",
3524
+ "kind": "flat"
3525
+ },
3526
+ {
3527
+ "name": "OperatorNonceEvent",
3528
+ "type": "perpetuals::core::components::operator_nonce::operator_nonce::OperatorNonceComponent::Event",
3529
+ "kind": "flat"
3530
+ },
3531
+ {
3532
+ "name": "PausableEvent",
3533
+ "type": "starkware_utils::components::pausable::pausable::PausableComponent::Event",
3534
+ "kind": "flat"
3535
+ },
3536
+ {
3537
+ "name": "ReplaceabilityEvent",
3538
+ "type": "starkware_utils::components::replaceability::replaceability::ReplaceabilityComponent::Event",
3539
+ "kind": "flat"
3540
+ },
3541
+ {
3542
+ "name": "RolesEvent",
3543
+ "type": "starkware_utils::components::roles::roles::RolesComponent::Event",
3544
+ "kind": "flat"
3545
+ },
3546
+ {
3547
+ "name": "SRC5Event",
3548
+ "type": "openzeppelin_introspection::src5::SRC5Component::Event",
3549
+ "kind": "flat"
3550
+ },
3551
+ {
3552
+ "name": "AssetsEvent",
3553
+ "type": "perpetuals::core::components::assets::assets::AssetsComponent::Event",
3554
+ "kind": "flat"
3555
+ },
3556
+ {
3557
+ "name": "DepositEvent",
3558
+ "type": "perpetuals::core::components::deposit::deposit::Deposit::Event",
3559
+ "kind": "flat"
3560
+ },
3561
+ {
3562
+ "name": "RequestApprovalsEvent",
3563
+ "type": "starkware_utils::components::request_approvals::request_approvals::RequestApprovalsComponent::Event",
3564
+ "kind": "flat"
3565
+ },
3566
+ {
3567
+ "name": "PositionsEvent",
3568
+ "type": "perpetuals::core::components::positions::positions::Positions::Event",
3569
+ "kind": "flat"
3570
+ },
3571
+ {
3572
+ "name": "Deleverage",
3573
+ "type": "perpetuals::core::events::Deleverage",
3574
+ "kind": "nested"
3575
+ },
3576
+ {
3577
+ "name": "InactiveAssetPositionReduced",
3578
+ "type": "perpetuals::core::events::InactiveAssetPositionReduced",
3579
+ "kind": "nested"
3580
+ },
3581
+ {
3582
+ "name": "Liquidate",
3583
+ "type": "perpetuals::core::events::Liquidate",
3584
+ "kind": "nested"
3585
+ },
3586
+ {
3587
+ "name": "Trade",
3588
+ "type": "perpetuals::core::events::Trade",
3589
+ "kind": "nested"
3590
+ },
3591
+ {
3592
+ "name": "Transfer",
3593
+ "type": "perpetuals::core::events::Transfer",
3594
+ "kind": "nested"
3595
+ },
3596
+ {
3597
+ "name": "TransferRequest",
3598
+ "type": "perpetuals::core::events::TransferRequest",
3599
+ "kind": "nested"
3600
+ },
3601
+ {
3602
+ "name": "Withdraw",
3603
+ "type": "perpetuals::core::events::Withdraw",
3604
+ "kind": "nested"
3605
+ },
3606
+ {
3607
+ "name": "WithdrawRequest",
3608
+ "type": "perpetuals::core::events::WithdrawRequest",
3609
+ "kind": "nested"
3610
+ }
3611
+ ]
3612
+ }
3613
+ ]