@the-situation/artifacts 0.5.0-alpha.0

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.
@@ -0,0 +1,1567 @@
1
+ [
2
+ {
3
+ "type": "enum",
4
+ "name": "core::bool",
5
+ "variants": [
6
+ {
7
+ "name": "False",
8
+ "type": "()"
9
+ },
10
+ {
11
+ "name": "True",
12
+ "type": "()"
13
+ }
14
+ ]
15
+ },
16
+ {
17
+ "type": "struct",
18
+ "name": "the_situation::types::sq128::types::SQ128x128Raw",
19
+ "members": [
20
+ {
21
+ "name": "limb0",
22
+ "type": "core::integer::u64"
23
+ },
24
+ {
25
+ "name": "limb1",
26
+ "type": "core::integer::u64"
27
+ },
28
+ {
29
+ "name": "limb2",
30
+ "type": "core::integer::u64"
31
+ },
32
+ {
33
+ "name": "limb3",
34
+ "type": "core::integer::u64"
35
+ },
36
+ {
37
+ "name": "neg",
38
+ "type": "core::bool"
39
+ }
40
+ ]
41
+ },
42
+ {
43
+ "type": "struct",
44
+ "name": "the_situation::types::normal_distribution::NormalDistributionRaw",
45
+ "members": [
46
+ {
47
+ "name": "mean",
48
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
49
+ },
50
+ {
51
+ "name": "variance",
52
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
53
+ },
54
+ {
55
+ "name": "sigma",
56
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
57
+ }
58
+ ]
59
+ },
60
+ {
61
+ "type": "struct",
62
+ "name": "the_situation::onchain::common::NormalSqrtHintsRaw",
63
+ "members": [
64
+ {
65
+ "name": "l2_norm_denom",
66
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
67
+ },
68
+ {
69
+ "name": "backing_denom",
70
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
71
+ }
72
+ ]
73
+ },
74
+ {
75
+ "type": "struct",
76
+ "name": "the_situation::onchain::common::FeeConfigRaw",
77
+ "members": [
78
+ {
79
+ "name": "lp_fee_bps",
80
+ "type": "core::integer::u16"
81
+ },
82
+ {
83
+ "name": "protocol_fee_bps",
84
+ "type": "core::integer::u16"
85
+ },
86
+ {
87
+ "name": "settlement_fee_bps",
88
+ "type": "core::integer::u16"
89
+ }
90
+ ]
91
+ },
92
+ {
93
+ "type": "constructor",
94
+ "name": "constructor",
95
+ "inputs": [
96
+ {
97
+ "name": "owner",
98
+ "type": "core::starknet::contract_address::ContractAddress"
99
+ },
100
+ {
101
+ "name": "admin",
102
+ "type": "core::starknet::contract_address::ContractAddress"
103
+ },
104
+ {
105
+ "name": "collateral_token",
106
+ "type": "core::starknet::contract_address::ContractAddress"
107
+ },
108
+ {
109
+ "name": "token_decimals",
110
+ "type": "core::integer::u8"
111
+ },
112
+ {
113
+ "name": "internal_decimals",
114
+ "type": "core::integer::u8"
115
+ },
116
+ {
117
+ "name": "initial_distribution",
118
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
119
+ },
120
+ {
121
+ "name": "k",
122
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
123
+ },
124
+ {
125
+ "name": "backing_amount",
126
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
127
+ },
128
+ {
129
+ "name": "tolerance",
130
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
131
+ },
132
+ {
133
+ "name": "min_trade_collateral",
134
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
135
+ },
136
+ {
137
+ "name": "initial_hints",
138
+ "type": "the_situation::onchain::common::NormalSqrtHintsRaw"
139
+ },
140
+ {
141
+ "name": "fee_config",
142
+ "type": "the_situation::onchain::common::FeeConfigRaw"
143
+ },
144
+ {
145
+ "name": "factory",
146
+ "type": "core::starknet::contract_address::ContractAddress"
147
+ },
148
+ {
149
+ "name": "math_class_hash",
150
+ "type": "core::starknet::class_hash::ClassHash"
151
+ },
152
+ {
153
+ "name": "extension",
154
+ "type": "core::starknet::contract_address::ContractAddress"
155
+ },
156
+ {
157
+ "name": "extension_call_points",
158
+ "type": "core::integer::u16"
159
+ },
160
+ {
161
+ "name": "metadata_hash",
162
+ "type": "core::felt252"
163
+ }
164
+ ]
165
+ },
166
+ {
167
+ "type": "struct",
168
+ "name": "the_situation::onchain::common::AmmParamsRaw",
169
+ "members": [
170
+ {
171
+ "name": "k",
172
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
173
+ },
174
+ {
175
+ "name": "backing",
176
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
177
+ },
178
+ {
179
+ "name": "tolerance",
180
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
181
+ },
182
+ {
183
+ "name": "min_trade_collateral",
184
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
185
+ }
186
+ ]
187
+ },
188
+ {
189
+ "type": "function",
190
+ "name": "get_params",
191
+ "inputs": [],
192
+ "outputs": [
193
+ {
194
+ "type": "the_situation::onchain::common::AmmParamsRaw"
195
+ }
196
+ ],
197
+ "state_mutability": "view"
198
+ },
199
+ {
200
+ "type": "struct",
201
+ "name": "the_situation::onchain::common::AmmConfigRaw",
202
+ "members": [
203
+ {
204
+ "name": "collateral_token",
205
+ "type": "core::starknet::contract_address::ContractAddress"
206
+ },
207
+ {
208
+ "name": "token_decimals",
209
+ "type": "core::integer::u8"
210
+ },
211
+ {
212
+ "name": "internal_decimals",
213
+ "type": "core::integer::u8"
214
+ },
215
+ {
216
+ "name": "decimal_shift",
217
+ "type": "core::integer::u8"
218
+ },
219
+ {
220
+ "name": "params",
221
+ "type": "the_situation::onchain::common::AmmParamsRaw"
222
+ }
223
+ ]
224
+ },
225
+ {
226
+ "type": "function",
227
+ "name": "get_config",
228
+ "inputs": [],
229
+ "outputs": [
230
+ {
231
+ "type": "the_situation::onchain::common::AmmConfigRaw"
232
+ }
233
+ ],
234
+ "state_mutability": "view"
235
+ },
236
+ {
237
+ "type": "function",
238
+ "name": "get_distribution",
239
+ "inputs": [],
240
+ "outputs": [
241
+ {
242
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
243
+ }
244
+ ],
245
+ "state_mutability": "view"
246
+ },
247
+ {
248
+ "type": "struct",
249
+ "name": "the_situation::onchain::common::MarketStatusRaw",
250
+ "members": [
251
+ {
252
+ "name": "is_initialized",
253
+ "type": "core::bool"
254
+ },
255
+ {
256
+ "name": "is_paused",
257
+ "type": "core::bool"
258
+ },
259
+ {
260
+ "name": "is_settled",
261
+ "type": "core::bool"
262
+ },
263
+ {
264
+ "name": "settlement_value",
265
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
266
+ }
267
+ ]
268
+ },
269
+ {
270
+ "type": "function",
271
+ "name": "get_market_status",
272
+ "inputs": [],
273
+ "outputs": [
274
+ {
275
+ "type": "the_situation::onchain::common::MarketStatusRaw"
276
+ }
277
+ ],
278
+ "state_mutability": "view"
279
+ },
280
+ {
281
+ "type": "function",
282
+ "name": "get_owner",
283
+ "inputs": [],
284
+ "outputs": [
285
+ {
286
+ "type": "core::starknet::contract_address::ContractAddress"
287
+ }
288
+ ],
289
+ "state_mutability": "view"
290
+ },
291
+ {
292
+ "type": "function",
293
+ "name": "get_admin",
294
+ "inputs": [],
295
+ "outputs": [
296
+ {
297
+ "type": "core::starknet::contract_address::ContractAddress"
298
+ }
299
+ ],
300
+ "state_mutability": "view"
301
+ },
302
+ {
303
+ "type": "struct",
304
+ "name": "the_situation::onchain::common::PositionExtendedRaw",
305
+ "members": [
306
+ {
307
+ "name": "delta_count",
308
+ "type": "core::integer::u32"
309
+ },
310
+ {
311
+ "name": "total_collateral_locked",
312
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
313
+ },
314
+ {
315
+ "name": "claimed",
316
+ "type": "core::bool"
317
+ },
318
+ {
319
+ "name": "early_settled",
320
+ "type": "core::bool"
321
+ },
322
+ {
323
+ "name": "exists",
324
+ "type": "core::bool"
325
+ }
326
+ ]
327
+ },
328
+ {
329
+ "type": "function",
330
+ "name": "get_position_extended",
331
+ "inputs": [
332
+ {
333
+ "name": "trader",
334
+ "type": "core::starknet::contract_address::ContractAddress"
335
+ }
336
+ ],
337
+ "outputs": [
338
+ {
339
+ "type": "the_situation::onchain::common::PositionExtendedRaw"
340
+ }
341
+ ],
342
+ "state_mutability": "view"
343
+ },
344
+ {
345
+ "type": "struct",
346
+ "name": "the_situation::onchain::common::PositionCompactRaw",
347
+ "members": [
348
+ {
349
+ "name": "original_mean",
350
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
351
+ },
352
+ {
353
+ "name": "original_variance",
354
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
355
+ },
356
+ {
357
+ "name": "original_sigma",
358
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
359
+ },
360
+ {
361
+ "name": "original_lambda",
362
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
363
+ },
364
+ {
365
+ "name": "effective_mean",
366
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
367
+ },
368
+ {
369
+ "name": "effective_variance",
370
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
371
+ },
372
+ {
373
+ "name": "effective_sigma",
374
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
375
+ },
376
+ {
377
+ "name": "effective_lambda",
378
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
379
+ },
380
+ {
381
+ "name": "close_market_mean",
382
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
383
+ },
384
+ {
385
+ "name": "close_market_variance",
386
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
387
+ },
388
+ {
389
+ "name": "close_market_sigma",
390
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
391
+ },
392
+ {
393
+ "name": "close_market_lambda",
394
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
395
+ },
396
+ {
397
+ "name": "total_collateral",
398
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
399
+ },
400
+ {
401
+ "name": "flags",
402
+ "type": "core::integer::u8"
403
+ }
404
+ ]
405
+ },
406
+ {
407
+ "type": "function",
408
+ "name": "get_position_compact",
409
+ "inputs": [
410
+ {
411
+ "name": "trader",
412
+ "type": "core::starknet::contract_address::ContractAddress"
413
+ }
414
+ ],
415
+ "outputs": [
416
+ {
417
+ "type": "the_situation::onchain::common::PositionCompactRaw"
418
+ }
419
+ ],
420
+ "state_mutability": "view"
421
+ },
422
+ {
423
+ "type": "struct",
424
+ "name": "the_situation::onchain::common::LPInfoRaw",
425
+ "members": [
426
+ {
427
+ "name": "total_shares",
428
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
429
+ },
430
+ {
431
+ "name": "total_backing_deposited",
432
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
433
+ }
434
+ ]
435
+ },
436
+ {
437
+ "type": "function",
438
+ "name": "get_lp_info",
439
+ "inputs": [],
440
+ "outputs": [
441
+ {
442
+ "type": "the_situation::onchain::common::LPInfoRaw"
443
+ }
444
+ ],
445
+ "state_mutability": "view"
446
+ },
447
+ {
448
+ "type": "function",
449
+ "name": "get_distribution_hints",
450
+ "inputs": [],
451
+ "outputs": [
452
+ {
453
+ "type": "the_situation::onchain::common::NormalSqrtHintsRaw"
454
+ }
455
+ ],
456
+ "state_mutability": "view"
457
+ },
458
+ {
459
+ "type": "function",
460
+ "name": "get_lp_shares",
461
+ "inputs": [
462
+ {
463
+ "name": "provider",
464
+ "type": "core::starknet::contract_address::ContractAddress"
465
+ }
466
+ ],
467
+ "outputs": [
468
+ {
469
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
470
+ }
471
+ ],
472
+ "state_mutability": "view"
473
+ },
474
+ {
475
+ "type": "function",
476
+ "name": "get_pending_settlement_claim_count",
477
+ "inputs": [],
478
+ "outputs": [
479
+ {
480
+ "type": "core::integer::u64"
481
+ }
482
+ ],
483
+ "state_mutability": "view"
484
+ },
485
+ {
486
+ "type": "struct",
487
+ "name": "the_situation::onchain::extension::market_key::MarketKey",
488
+ "members": [
489
+ {
490
+ "name": "collateral_token",
491
+ "type": "core::starknet::contract_address::ContractAddress"
492
+ },
493
+ {
494
+ "name": "initial_distribution",
495
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
496
+ },
497
+ {
498
+ "name": "k",
499
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
500
+ },
501
+ {
502
+ "name": "initial_backing",
503
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
504
+ },
505
+ {
506
+ "name": "extension",
507
+ "type": "core::starknet::contract_address::ContractAddress"
508
+ },
509
+ {
510
+ "name": "metadata_hash",
511
+ "type": "core::felt252"
512
+ }
513
+ ]
514
+ },
515
+ {
516
+ "type": "function",
517
+ "name": "get_market_key",
518
+ "inputs": [],
519
+ "outputs": [
520
+ {
521
+ "type": "the_situation::onchain::extension::market_key::MarketKey"
522
+ }
523
+ ],
524
+ "state_mutability": "view"
525
+ },
526
+ {
527
+ "type": "struct",
528
+ "name": "the_situation::onchain::common::ScaledBackingCheckRaw",
529
+ "members": [
530
+ {
531
+ "name": "max_value_upper",
532
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
533
+ },
534
+ {
535
+ "name": "is_valid",
536
+ "type": "core::bool"
537
+ },
538
+ {
539
+ "name": "computation_succeeded",
540
+ "type": "core::bool"
541
+ }
542
+ ]
543
+ },
544
+ {
545
+ "type": "struct",
546
+ "name": "the_situation::onchain::common::CollateralVerificationRaw",
547
+ "members": [
548
+ {
549
+ "name": "side_valid",
550
+ "type": "core::bool"
551
+ },
552
+ {
553
+ "name": "stationary_valid",
554
+ "type": "core::bool"
555
+ },
556
+ {
557
+ "name": "curvature_valid",
558
+ "type": "core::bool"
559
+ },
560
+ {
561
+ "name": "computed_collateral",
562
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
563
+ },
564
+ {
565
+ "name": "collateral_sufficient",
566
+ "type": "core::bool"
567
+ },
568
+ {
569
+ "name": "computation_valid",
570
+ "type": "core::bool"
571
+ }
572
+ ]
573
+ },
574
+ {
575
+ "type": "struct",
576
+ "name": "the_situation::onchain::common::TradeCheckRaw",
577
+ "members": [
578
+ {
579
+ "name": "backing_check",
580
+ "type": "the_situation::onchain::common::ScaledBackingCheckRaw"
581
+ },
582
+ {
583
+ "name": "verification",
584
+ "type": "the_situation::onchain::common::CollateralVerificationRaw"
585
+ },
586
+ {
587
+ "name": "min_trade_collateral",
588
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
589
+ },
590
+ {
591
+ "name": "collateral_above_min",
592
+ "type": "core::bool"
593
+ },
594
+ {
595
+ "name": "is_valid",
596
+ "type": "core::bool"
597
+ }
598
+ ]
599
+ },
600
+ {
601
+ "type": "struct",
602
+ "name": "core::integer::u256",
603
+ "members": [
604
+ {
605
+ "name": "low",
606
+ "type": "core::integer::u128"
607
+ },
608
+ {
609
+ "name": "high",
610
+ "type": "core::integer::u128"
611
+ }
612
+ ]
613
+ },
614
+ {
615
+ "type": "struct",
616
+ "name": "the_situation::onchain::common::TradeExecutionRaw",
617
+ "members": [
618
+ {
619
+ "name": "check",
620
+ "type": "the_situation::onchain::common::TradeCheckRaw"
621
+ },
622
+ {
623
+ "name": "token_amount",
624
+ "type": "core::integer::u256"
625
+ },
626
+ {
627
+ "name": "delta_index",
628
+ "type": "core::integer::u32"
629
+ }
630
+ ]
631
+ },
632
+ {
633
+ "type": "function",
634
+ "name": "execute_trade",
635
+ "inputs": [
636
+ {
637
+ "name": "candidate",
638
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
639
+ },
640
+ {
641
+ "name": "x_star",
642
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
643
+ },
644
+ {
645
+ "name": "supplied_collateral",
646
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
647
+ },
648
+ {
649
+ "name": "candidate_hints",
650
+ "type": "the_situation::onchain::common::NormalSqrtHintsRaw"
651
+ }
652
+ ],
653
+ "outputs": [
654
+ {
655
+ "type": "the_situation::onchain::common::TradeExecutionRaw"
656
+ }
657
+ ],
658
+ "state_mutability": "external"
659
+ },
660
+ {
661
+ "type": "struct",
662
+ "name": "the_situation::onchain::common::ClaimResultRaw",
663
+ "members": [
664
+ {
665
+ "name": "position_value",
666
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
667
+ },
668
+ {
669
+ "name": "collateral_returned",
670
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
671
+ },
672
+ {
673
+ "name": "token_payout",
674
+ "type": "core::integer::u256"
675
+ },
676
+ {
677
+ "name": "success",
678
+ "type": "core::bool"
679
+ }
680
+ ]
681
+ },
682
+ {
683
+ "type": "function",
684
+ "name": "claim",
685
+ "inputs": [],
686
+ "outputs": [
687
+ {
688
+ "type": "the_situation::onchain::common::ClaimResultRaw"
689
+ }
690
+ ],
691
+ "state_mutability": "external"
692
+ },
693
+ {
694
+ "type": "function",
695
+ "name": "claim_for",
696
+ "inputs": [
697
+ {
698
+ "name": "trader",
699
+ "type": "core::starknet::contract_address::ContractAddress"
700
+ }
701
+ ],
702
+ "outputs": [
703
+ {
704
+ "type": "the_situation::onchain::common::ClaimResultRaw"
705
+ }
706
+ ],
707
+ "state_mutability": "external"
708
+ },
709
+ {
710
+ "type": "enum",
711
+ "name": "the_situation::onchain::common::PositionCloseRejection",
712
+ "variants": [
713
+ {
714
+ "name": "None",
715
+ "type": "()"
716
+ },
717
+ {
718
+ "name": "NoPosition",
719
+ "type": "()"
720
+ },
721
+ {
722
+ "name": "MarketSettled",
723
+ "type": "()"
724
+ },
725
+ {
726
+ "name": "MarketPaused",
727
+ "type": "()"
728
+ },
729
+ {
730
+ "name": "AlreadyClosed",
731
+ "type": "()"
732
+ },
733
+ {
734
+ "name": "AlreadyClaimed",
735
+ "type": "()"
736
+ },
737
+ {
738
+ "name": "InvalidAdditionalCollateral",
739
+ "type": "()"
740
+ },
741
+ {
742
+ "name": "InvalidPositionState",
743
+ "type": "()"
744
+ },
745
+ {
746
+ "name": "InvalidHints",
747
+ "type": "()"
748
+ },
749
+ {
750
+ "name": "BackingFail",
751
+ "type": "()"
752
+ },
753
+ {
754
+ "name": "LowCollateral",
755
+ "type": "()"
756
+ },
757
+ {
758
+ "name": "VerificationFailed",
759
+ "type": "()"
760
+ },
761
+ {
762
+ "name": "CollateralTooLarge",
763
+ "type": "()"
764
+ },
765
+ {
766
+ "name": "InvalidState",
767
+ "type": "()"
768
+ }
769
+ ]
770
+ },
771
+ {
772
+ "type": "struct",
773
+ "name": "the_situation::onchain::common::PositionCloseResultRaw",
774
+ "members": [
775
+ {
776
+ "name": "trade_executed",
777
+ "type": "core::bool"
778
+ },
779
+ {
780
+ "name": "trade_result",
781
+ "type": "the_situation::onchain::common::TradeExecutionRaw"
782
+ },
783
+ {
784
+ "name": "is_flat",
785
+ "type": "core::bool"
786
+ },
787
+ {
788
+ "name": "immediate_payout",
789
+ "type": "core::integer::u256"
790
+ },
791
+ {
792
+ "name": "collateral_required",
793
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
794
+ },
795
+ {
796
+ "name": "existing_collateral",
797
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
798
+ },
799
+ {
800
+ "name": "additional_required",
801
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
802
+ },
803
+ {
804
+ "name": "net_additional_collateral",
805
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
806
+ },
807
+ {
808
+ "name": "lp_fee",
809
+ "type": "core::integer::u256"
810
+ },
811
+ {
812
+ "name": "protocol_fee",
813
+ "type": "core::integer::u256"
814
+ },
815
+ {
816
+ "name": "rejection_reason",
817
+ "type": "the_situation::onchain::common::PositionCloseRejection"
818
+ }
819
+ ]
820
+ },
821
+ {
822
+ "type": "function",
823
+ "name": "check_close_position",
824
+ "inputs": [
825
+ {
826
+ "name": "trader",
827
+ "type": "core::starknet::contract_address::ContractAddress"
828
+ },
829
+ {
830
+ "name": "x_star",
831
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
832
+ },
833
+ {
834
+ "name": "additional_collateral",
835
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
836
+ },
837
+ {
838
+ "name": "target_hints",
839
+ "type": "the_situation::onchain::common::NormalSqrtHintsRaw"
840
+ }
841
+ ],
842
+ "outputs": [
843
+ {
844
+ "type": "the_situation::onchain::common::PositionCloseResultRaw"
845
+ }
846
+ ],
847
+ "state_mutability": "view"
848
+ },
849
+ {
850
+ "type": "function",
851
+ "name": "close_position",
852
+ "inputs": [
853
+ {
854
+ "name": "x_star",
855
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
856
+ },
857
+ {
858
+ "name": "additional_collateral",
859
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
860
+ },
861
+ {
862
+ "name": "target_hints",
863
+ "type": "the_situation::onchain::common::NormalSqrtHintsRaw"
864
+ }
865
+ ],
866
+ "outputs": [
867
+ {
868
+ "type": "the_situation::onchain::common::PositionCloseResultRaw"
869
+ }
870
+ ],
871
+ "state_mutability": "external"
872
+ },
873
+ {
874
+ "type": "struct",
875
+ "name": "the_situation::onchain::common::CloseExecutionGuardsRaw",
876
+ "members": [
877
+ {
878
+ "name": "expected_market_dist",
879
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
880
+ },
881
+ {
882
+ "name": "expected_backing",
883
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
884
+ },
885
+ {
886
+ "name": "expected_tolerance",
887
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
888
+ },
889
+ {
890
+ "name": "expected_min_trade_collateral",
891
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
892
+ },
893
+ {
894
+ "name": "max_required_collateral",
895
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
896
+ },
897
+ {
898
+ "name": "max_additional_collateral",
899
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
900
+ },
901
+ {
902
+ "name": "max_additional_token_amount",
903
+ "type": "core::integer::u256"
904
+ }
905
+ ]
906
+ },
907
+ {
908
+ "type": "function",
909
+ "name": "close_position_guarded",
910
+ "inputs": [
911
+ {
912
+ "name": "x_star",
913
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
914
+ },
915
+ {
916
+ "name": "additional_collateral",
917
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
918
+ },
919
+ {
920
+ "name": "target_hints",
921
+ "type": "the_situation::onchain::common::NormalSqrtHintsRaw"
922
+ },
923
+ {
924
+ "name": "guards",
925
+ "type": "the_situation::onchain::common::CloseExecutionGuardsRaw"
926
+ }
927
+ ],
928
+ "outputs": [
929
+ {
930
+ "type": "the_situation::onchain::common::PositionCloseResultRaw"
931
+ }
932
+ ],
933
+ "state_mutability": "external"
934
+ },
935
+ {
936
+ "type": "function",
937
+ "name": "add_liquidity",
938
+ "inputs": [
939
+ {
940
+ "name": "share_amount",
941
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
942
+ }
943
+ ],
944
+ "outputs": [
945
+ {
946
+ "type": "core::integer::u256"
947
+ }
948
+ ],
949
+ "state_mutability": "external"
950
+ },
951
+ {
952
+ "type": "function",
953
+ "name": "remove_liquidity",
954
+ "inputs": [
955
+ {
956
+ "name": "share_amount",
957
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
958
+ }
959
+ ],
960
+ "outputs": [
961
+ {
962
+ "type": "core::integer::u256"
963
+ }
964
+ ],
965
+ "state_mutability": "external"
966
+ },
967
+ {
968
+ "type": "function",
969
+ "name": "initialize",
970
+ "inputs": [],
971
+ "outputs": [
972
+ {
973
+ "type": "core::integer::u256"
974
+ }
975
+ ],
976
+ "state_mutability": "external"
977
+ },
978
+ {
979
+ "type": "function",
980
+ "name": "pause",
981
+ "inputs": [],
982
+ "outputs": [],
983
+ "state_mutability": "external"
984
+ },
985
+ {
986
+ "type": "function",
987
+ "name": "unpause",
988
+ "inputs": [],
989
+ "outputs": [],
990
+ "state_mutability": "external"
991
+ },
992
+ {
993
+ "type": "function",
994
+ "name": "settle",
995
+ "inputs": [
996
+ {
997
+ "name": "settlement_value",
998
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
999
+ }
1000
+ ],
1001
+ "outputs": [],
1002
+ "state_mutability": "external"
1003
+ },
1004
+ {
1005
+ "type": "function",
1006
+ "name": "update_parameters",
1007
+ "inputs": [
1008
+ {
1009
+ "name": "tolerance",
1010
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1011
+ },
1012
+ {
1013
+ "name": "min_trade_collateral",
1014
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1015
+ }
1016
+ ],
1017
+ "outputs": [],
1018
+ "state_mutability": "external"
1019
+ },
1020
+ {
1021
+ "type": "function",
1022
+ "name": "emergency_withdraw",
1023
+ "inputs": [
1024
+ {
1025
+ "name": "to",
1026
+ "type": "core::starknet::contract_address::ContractAddress"
1027
+ },
1028
+ {
1029
+ "name": "amount",
1030
+ "type": "core::integer::u256"
1031
+ }
1032
+ ],
1033
+ "outputs": [],
1034
+ "state_mutability": "external"
1035
+ },
1036
+ {
1037
+ "type": "function",
1038
+ "name": "clear_tokens",
1039
+ "inputs": [
1040
+ {
1041
+ "name": "to",
1042
+ "type": "core::starknet::contract_address::ContractAddress"
1043
+ }
1044
+ ],
1045
+ "outputs": [
1046
+ {
1047
+ "type": "core::integer::u256"
1048
+ }
1049
+ ],
1050
+ "state_mutability": "external"
1051
+ },
1052
+ {
1053
+ "type": "function",
1054
+ "name": "transfer_ownership",
1055
+ "inputs": [
1056
+ {
1057
+ "name": "new_owner",
1058
+ "type": "core::starknet::contract_address::ContractAddress"
1059
+ }
1060
+ ],
1061
+ "outputs": [],
1062
+ "state_mutability": "external"
1063
+ },
1064
+ {
1065
+ "type": "function",
1066
+ "name": "update_admin",
1067
+ "inputs": [
1068
+ {
1069
+ "name": "new_admin",
1070
+ "type": "core::starknet::contract_address::ContractAddress"
1071
+ }
1072
+ ],
1073
+ "outputs": [],
1074
+ "state_mutability": "external"
1075
+ },
1076
+ {
1077
+ "type": "function",
1078
+ "name": "update_math_class_hash",
1079
+ "inputs": [
1080
+ {
1081
+ "name": "new_class_hash",
1082
+ "type": "core::starknet::class_hash::ClassHash"
1083
+ }
1084
+ ],
1085
+ "outputs": [],
1086
+ "state_mutability": "external"
1087
+ },
1088
+ {
1089
+ "type": "function",
1090
+ "name": "get_fee_config",
1091
+ "inputs": [],
1092
+ "outputs": [
1093
+ {
1094
+ "type": "the_situation::onchain::common::FeeConfigRaw"
1095
+ }
1096
+ ],
1097
+ "state_mutability": "view"
1098
+ },
1099
+ {
1100
+ "type": "function",
1101
+ "name": "get_accumulated_protocol_fees",
1102
+ "inputs": [],
1103
+ "outputs": [
1104
+ {
1105
+ "type": "core::integer::u256"
1106
+ }
1107
+ ],
1108
+ "state_mutability": "view"
1109
+ },
1110
+ {
1111
+ "type": "function",
1112
+ "name": "withdraw_protocol_fees",
1113
+ "inputs": [],
1114
+ "outputs": [
1115
+ {
1116
+ "type": "core::integer::u256"
1117
+ }
1118
+ ],
1119
+ "state_mutability": "external"
1120
+ },
1121
+ {
1122
+ "type": "event",
1123
+ "name": "the_situation::onchain::markets::normal::amm::events::MarketInitialized",
1124
+ "kind": "struct",
1125
+ "members": [
1126
+ {
1127
+ "name": "initializer",
1128
+ "type": "core::starknet::contract_address::ContractAddress",
1129
+ "kind": "key"
1130
+ },
1131
+ {
1132
+ "name": "backing_amount",
1133
+ "type": "the_situation::types::sq128::types::SQ128x128Raw",
1134
+ "kind": "data"
1135
+ },
1136
+ {
1137
+ "name": "token_amount",
1138
+ "type": "core::integer::u256",
1139
+ "kind": "data"
1140
+ }
1141
+ ]
1142
+ },
1143
+ {
1144
+ "type": "event",
1145
+ "name": "the_situation::onchain::markets::normal::amm::events::TradeExecuted",
1146
+ "kind": "struct",
1147
+ "members": [
1148
+ {
1149
+ "name": "trader",
1150
+ "type": "core::starknet::contract_address::ContractAddress",
1151
+ "kind": "key"
1152
+ },
1153
+ {
1154
+ "name": "old_distribution",
1155
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw",
1156
+ "kind": "data"
1157
+ },
1158
+ {
1159
+ "name": "new_distribution",
1160
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw",
1161
+ "kind": "data"
1162
+ },
1163
+ {
1164
+ "name": "token_amount",
1165
+ "type": "core::integer::u256",
1166
+ "kind": "data"
1167
+ },
1168
+ {
1169
+ "name": "delta_index",
1170
+ "type": "core::integer::u32",
1171
+ "kind": "data"
1172
+ }
1173
+ ]
1174
+ },
1175
+ {
1176
+ "type": "event",
1177
+ "name": "the_situation::onchain::markets::normal::amm::events::PositionClaimed",
1178
+ "kind": "struct",
1179
+ "members": [
1180
+ {
1181
+ "name": "trader",
1182
+ "type": "core::starknet::contract_address::ContractAddress",
1183
+ "kind": "key"
1184
+ },
1185
+ {
1186
+ "name": "position_value",
1187
+ "type": "the_situation::types::sq128::types::SQ128x128Raw",
1188
+ "kind": "data"
1189
+ },
1190
+ {
1191
+ "name": "collateral_returned",
1192
+ "type": "the_situation::types::sq128::types::SQ128x128Raw",
1193
+ "kind": "data"
1194
+ },
1195
+ {
1196
+ "name": "token_payout",
1197
+ "type": "core::integer::u256",
1198
+ "kind": "data"
1199
+ }
1200
+ ]
1201
+ },
1202
+ {
1203
+ "type": "event",
1204
+ "name": "the_situation::onchain::markets::normal::amm::events::PositionClosed",
1205
+ "kind": "struct",
1206
+ "members": [
1207
+ {
1208
+ "name": "trader",
1209
+ "type": "core::starknet::contract_address::ContractAddress",
1210
+ "kind": "key"
1211
+ },
1212
+ {
1213
+ "name": "trade_delta_index",
1214
+ "type": "core::integer::u32",
1215
+ "kind": "data"
1216
+ },
1217
+ {
1218
+ "name": "is_flat",
1219
+ "type": "core::bool",
1220
+ "kind": "data"
1221
+ },
1222
+ {
1223
+ "name": "immediate_payout",
1224
+ "type": "core::integer::u256",
1225
+ "kind": "data"
1226
+ },
1227
+ {
1228
+ "name": "collateral_from_existing",
1229
+ "type": "the_situation::types::sq128::types::SQ128x128Raw",
1230
+ "kind": "data"
1231
+ },
1232
+ {
1233
+ "name": "additional_collateral",
1234
+ "type": "the_situation::types::sq128::types::SQ128x128Raw",
1235
+ "kind": "data"
1236
+ }
1237
+ ]
1238
+ },
1239
+ {
1240
+ "type": "event",
1241
+ "name": "the_situation::onchain::markets::normal::amm::events::LiquidityAdded",
1242
+ "kind": "struct",
1243
+ "members": [
1244
+ {
1245
+ "name": "provider",
1246
+ "type": "core::starknet::contract_address::ContractAddress",
1247
+ "kind": "key"
1248
+ },
1249
+ {
1250
+ "name": "shares",
1251
+ "type": "the_situation::types::sq128::types::SQ128x128Raw",
1252
+ "kind": "data"
1253
+ },
1254
+ {
1255
+ "name": "token_amount",
1256
+ "type": "core::integer::u256",
1257
+ "kind": "data"
1258
+ }
1259
+ ]
1260
+ },
1261
+ {
1262
+ "type": "event",
1263
+ "name": "the_situation::onchain::markets::normal::amm::events::LiquidityRemoved",
1264
+ "kind": "struct",
1265
+ "members": [
1266
+ {
1267
+ "name": "provider",
1268
+ "type": "core::starknet::contract_address::ContractAddress",
1269
+ "kind": "key"
1270
+ },
1271
+ {
1272
+ "name": "shares",
1273
+ "type": "the_situation::types::sq128::types::SQ128x128Raw",
1274
+ "kind": "data"
1275
+ },
1276
+ {
1277
+ "name": "token_amount",
1278
+ "type": "core::integer::u256",
1279
+ "kind": "data"
1280
+ }
1281
+ ]
1282
+ },
1283
+ {
1284
+ "type": "event",
1285
+ "name": "the_situation::onchain::markets::normal::amm::events::MarketPaused",
1286
+ "kind": "struct",
1287
+ "members": [
1288
+ {
1289
+ "name": "by",
1290
+ "type": "core::starknet::contract_address::ContractAddress",
1291
+ "kind": "data"
1292
+ }
1293
+ ]
1294
+ },
1295
+ {
1296
+ "type": "event",
1297
+ "name": "the_situation::onchain::markets::normal::amm::events::MarketUnpaused",
1298
+ "kind": "struct",
1299
+ "members": [
1300
+ {
1301
+ "name": "by",
1302
+ "type": "core::starknet::contract_address::ContractAddress",
1303
+ "kind": "data"
1304
+ }
1305
+ ]
1306
+ },
1307
+ {
1308
+ "type": "event",
1309
+ "name": "the_situation::onchain::markets::normal::amm::events::MarketSettled",
1310
+ "kind": "struct",
1311
+ "members": [
1312
+ {
1313
+ "name": "settlement_value",
1314
+ "type": "the_situation::types::sq128::types::SQ128x128Raw",
1315
+ "kind": "data"
1316
+ },
1317
+ {
1318
+ "name": "by",
1319
+ "type": "core::starknet::contract_address::ContractAddress",
1320
+ "kind": "data"
1321
+ }
1322
+ ]
1323
+ },
1324
+ {
1325
+ "type": "event",
1326
+ "name": "the_situation::onchain::markets::normal::amm::events::OwnerTransferred",
1327
+ "kind": "struct",
1328
+ "members": [
1329
+ {
1330
+ "name": "old_owner",
1331
+ "type": "core::starknet::contract_address::ContractAddress",
1332
+ "kind": "data"
1333
+ },
1334
+ {
1335
+ "name": "new_owner",
1336
+ "type": "core::starknet::contract_address::ContractAddress",
1337
+ "kind": "data"
1338
+ }
1339
+ ]
1340
+ },
1341
+ {
1342
+ "type": "event",
1343
+ "name": "the_situation::onchain::markets::normal::amm::events::AdminUpdated",
1344
+ "kind": "struct",
1345
+ "members": [
1346
+ {
1347
+ "name": "old_admin",
1348
+ "type": "core::starknet::contract_address::ContractAddress",
1349
+ "kind": "data"
1350
+ },
1351
+ {
1352
+ "name": "new_admin",
1353
+ "type": "core::starknet::contract_address::ContractAddress",
1354
+ "kind": "data"
1355
+ }
1356
+ ]
1357
+ },
1358
+ {
1359
+ "type": "event",
1360
+ "name": "the_situation::onchain::markets::normal::amm::events::ParametersUpdated",
1361
+ "kind": "struct",
1362
+ "members": [
1363
+ {
1364
+ "name": "tolerance",
1365
+ "type": "the_situation::types::sq128::types::SQ128x128Raw",
1366
+ "kind": "data"
1367
+ },
1368
+ {
1369
+ "name": "min_trade_collateral",
1370
+ "type": "the_situation::types::sq128::types::SQ128x128Raw",
1371
+ "kind": "data"
1372
+ }
1373
+ ]
1374
+ },
1375
+ {
1376
+ "type": "event",
1377
+ "name": "the_situation::onchain::markets::normal::amm::events::EmergencyWithdraw",
1378
+ "kind": "struct",
1379
+ "members": [
1380
+ {
1381
+ "name": "by",
1382
+ "type": "core::starknet::contract_address::ContractAddress",
1383
+ "kind": "data"
1384
+ },
1385
+ {
1386
+ "name": "to",
1387
+ "type": "core::starknet::contract_address::ContractAddress",
1388
+ "kind": "data"
1389
+ },
1390
+ {
1391
+ "name": "amount",
1392
+ "type": "core::integer::u256",
1393
+ "kind": "data"
1394
+ }
1395
+ ]
1396
+ },
1397
+ {
1398
+ "type": "event",
1399
+ "name": "the_situation::onchain::markets::normal::amm::events::FeesCollected",
1400
+ "kind": "struct",
1401
+ "members": [
1402
+ {
1403
+ "name": "trader",
1404
+ "type": "core::starknet::contract_address::ContractAddress",
1405
+ "kind": "key"
1406
+ },
1407
+ {
1408
+ "name": "delta_index",
1409
+ "type": "core::integer::u32",
1410
+ "kind": "data"
1411
+ },
1412
+ {
1413
+ "name": "lp_fee",
1414
+ "type": "core::integer::u256",
1415
+ "kind": "data"
1416
+ },
1417
+ {
1418
+ "name": "protocol_fee",
1419
+ "type": "core::integer::u256",
1420
+ "kind": "data"
1421
+ }
1422
+ ]
1423
+ },
1424
+ {
1425
+ "type": "event",
1426
+ "name": "the_situation::onchain::markets::normal::amm::events::SettlementFeeCollected",
1427
+ "kind": "struct",
1428
+ "members": [
1429
+ {
1430
+ "name": "trader",
1431
+ "type": "core::starknet::contract_address::ContractAddress",
1432
+ "kind": "key"
1433
+ },
1434
+ {
1435
+ "name": "fee_amount",
1436
+ "type": "core::integer::u256",
1437
+ "kind": "data"
1438
+ }
1439
+ ]
1440
+ },
1441
+ {
1442
+ "type": "event",
1443
+ "name": "the_situation::onchain::markets::normal::amm::events::ProtocolFeesWithdrawn",
1444
+ "kind": "struct",
1445
+ "members": [
1446
+ {
1447
+ "name": "recipient",
1448
+ "type": "core::starknet::contract_address::ContractAddress",
1449
+ "kind": "data"
1450
+ },
1451
+ {
1452
+ "name": "amount",
1453
+ "type": "core::integer::u256",
1454
+ "kind": "data"
1455
+ }
1456
+ ]
1457
+ },
1458
+ {
1459
+ "type": "event",
1460
+ "name": "the_situation::onchain::markets::normal::amm::events::ExtensionRegistered",
1461
+ "kind": "struct",
1462
+ "members": [
1463
+ {
1464
+ "name": "extension",
1465
+ "type": "core::starknet::contract_address::ContractAddress",
1466
+ "kind": "key"
1467
+ },
1468
+ {
1469
+ "name": "call_points",
1470
+ "type": "core::integer::u16",
1471
+ "kind": "data"
1472
+ }
1473
+ ]
1474
+ },
1475
+ {
1476
+ "type": "event",
1477
+ "name": "the_situation::onchain::markets::normal::amm::contract::normal_amm::Event",
1478
+ "kind": "enum",
1479
+ "variants": [
1480
+ {
1481
+ "name": "MarketInitialized",
1482
+ "type": "the_situation::onchain::markets::normal::amm::events::MarketInitialized",
1483
+ "kind": "nested"
1484
+ },
1485
+ {
1486
+ "name": "TradeExecuted",
1487
+ "type": "the_situation::onchain::markets::normal::amm::events::TradeExecuted",
1488
+ "kind": "nested"
1489
+ },
1490
+ {
1491
+ "name": "PositionClaimed",
1492
+ "type": "the_situation::onchain::markets::normal::amm::events::PositionClaimed",
1493
+ "kind": "nested"
1494
+ },
1495
+ {
1496
+ "name": "PositionClosed",
1497
+ "type": "the_situation::onchain::markets::normal::amm::events::PositionClosed",
1498
+ "kind": "nested"
1499
+ },
1500
+ {
1501
+ "name": "LiquidityAdded",
1502
+ "type": "the_situation::onchain::markets::normal::amm::events::LiquidityAdded",
1503
+ "kind": "nested"
1504
+ },
1505
+ {
1506
+ "name": "LiquidityRemoved",
1507
+ "type": "the_situation::onchain::markets::normal::amm::events::LiquidityRemoved",
1508
+ "kind": "nested"
1509
+ },
1510
+ {
1511
+ "name": "MarketPaused",
1512
+ "type": "the_situation::onchain::markets::normal::amm::events::MarketPaused",
1513
+ "kind": "nested"
1514
+ },
1515
+ {
1516
+ "name": "MarketUnpaused",
1517
+ "type": "the_situation::onchain::markets::normal::amm::events::MarketUnpaused",
1518
+ "kind": "nested"
1519
+ },
1520
+ {
1521
+ "name": "MarketSettled",
1522
+ "type": "the_situation::onchain::markets::normal::amm::events::MarketSettled",
1523
+ "kind": "nested"
1524
+ },
1525
+ {
1526
+ "name": "OwnerTransferred",
1527
+ "type": "the_situation::onchain::markets::normal::amm::events::OwnerTransferred",
1528
+ "kind": "nested"
1529
+ },
1530
+ {
1531
+ "name": "AdminUpdated",
1532
+ "type": "the_situation::onchain::markets::normal::amm::events::AdminUpdated",
1533
+ "kind": "nested"
1534
+ },
1535
+ {
1536
+ "name": "ParametersUpdated",
1537
+ "type": "the_situation::onchain::markets::normal::amm::events::ParametersUpdated",
1538
+ "kind": "nested"
1539
+ },
1540
+ {
1541
+ "name": "EmergencyWithdraw",
1542
+ "type": "the_situation::onchain::markets::normal::amm::events::EmergencyWithdraw",
1543
+ "kind": "nested"
1544
+ },
1545
+ {
1546
+ "name": "FeesCollected",
1547
+ "type": "the_situation::onchain::markets::normal::amm::events::FeesCollected",
1548
+ "kind": "nested"
1549
+ },
1550
+ {
1551
+ "name": "SettlementFeeCollected",
1552
+ "type": "the_situation::onchain::markets::normal::amm::events::SettlementFeeCollected",
1553
+ "kind": "nested"
1554
+ },
1555
+ {
1556
+ "name": "ProtocolFeesWithdrawn",
1557
+ "type": "the_situation::onchain::markets::normal::amm::events::ProtocolFeesWithdrawn",
1558
+ "kind": "nested"
1559
+ },
1560
+ {
1561
+ "name": "ExtensionRegistered",
1562
+ "type": "the_situation::onchain::markets::normal::amm::events::ExtensionRegistered",
1563
+ "kind": "nested"
1564
+ }
1565
+ ]
1566
+ }
1567
+ ]