@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,1386 @@
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": "enum",
62
+ "name": "core::option::Option::<the_situation::types::sq128::types::SQ128x128Raw>",
63
+ "variants": [
64
+ {
65
+ "name": "Some",
66
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
67
+ },
68
+ {
69
+ "name": "None",
70
+ "type": "()"
71
+ }
72
+ ]
73
+ },
74
+ {
75
+ "type": "function",
76
+ "name": "pdf_view",
77
+ "inputs": [
78
+ {
79
+ "name": "dist",
80
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
81
+ },
82
+ {
83
+ "name": "x",
84
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
85
+ }
86
+ ],
87
+ "outputs": [
88
+ {
89
+ "type": "core::option::Option::<the_situation::types::sq128::types::SQ128x128Raw>"
90
+ }
91
+ ],
92
+ "state_mutability": "view"
93
+ },
94
+ {
95
+ "type": "function",
96
+ "name": "normal_l2_norm_view",
97
+ "inputs": [
98
+ {
99
+ "name": "dist",
100
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
101
+ }
102
+ ],
103
+ "outputs": [
104
+ {
105
+ "type": "core::option::Option::<the_situation::types::sq128::types::SQ128x128Raw>"
106
+ }
107
+ ],
108
+ "state_mutability": "view"
109
+ },
110
+ {
111
+ "type": "function",
112
+ "name": "compute_l2_norm_denom_hint_view",
113
+ "inputs": [
114
+ {
115
+ "name": "dist",
116
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
117
+ }
118
+ ],
119
+ "outputs": [
120
+ {
121
+ "type": "core::option::Option::<the_situation::types::sq128::types::SQ128x128Raw>"
122
+ }
123
+ ],
124
+ "state_mutability": "view"
125
+ },
126
+ {
127
+ "type": "function",
128
+ "name": "sigma_from_l2_norm_view",
129
+ "inputs": [
130
+ {
131
+ "name": "target_norm",
132
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
133
+ }
134
+ ],
135
+ "outputs": [
136
+ {
137
+ "type": "core::option::Option::<the_situation::types::sq128::types::SQ128x128Raw>"
138
+ }
139
+ ],
140
+ "state_mutability": "view"
141
+ },
142
+ {
143
+ "type": "function",
144
+ "name": "max_scaled_pdf_upper_view",
145
+ "inputs": [
146
+ {
147
+ "name": "dist",
148
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
149
+ },
150
+ {
151
+ "name": "k",
152
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
153
+ }
154
+ ],
155
+ "outputs": [
156
+ {
157
+ "type": "core::option::Option::<the_situation::types::sq128::types::SQ128x128Raw>"
158
+ }
159
+ ],
160
+ "state_mutability": "view"
161
+ },
162
+ {
163
+ "type": "function",
164
+ "name": "max_scaled_pdf_approx_view",
165
+ "inputs": [
166
+ {
167
+ "name": "dist",
168
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
169
+ },
170
+ {
171
+ "name": "k",
172
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
173
+ }
174
+ ],
175
+ "outputs": [
176
+ {
177
+ "type": "core::option::Option::<the_situation::types::sq128::types::SQ128x128Raw>"
178
+ }
179
+ ],
180
+ "state_mutability": "view"
181
+ },
182
+ {
183
+ "type": "struct",
184
+ "name": "the_situation::onchain::common::ScaledBackingCheckRaw",
185
+ "members": [
186
+ {
187
+ "name": "max_value_upper",
188
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
189
+ },
190
+ {
191
+ "name": "is_valid",
192
+ "type": "core::bool"
193
+ },
194
+ {
195
+ "name": "computation_succeeded",
196
+ "type": "core::bool"
197
+ }
198
+ ]
199
+ },
200
+ {
201
+ "type": "function",
202
+ "name": "check_scaled_backing_view",
203
+ "inputs": [
204
+ {
205
+ "name": "dist",
206
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
207
+ },
208
+ {
209
+ "name": "k",
210
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
211
+ },
212
+ {
213
+ "name": "backing",
214
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
215
+ }
216
+ ],
217
+ "outputs": [
218
+ {
219
+ "type": "the_situation::onchain::common::ScaledBackingCheckRaw"
220
+ }
221
+ ],
222
+ "state_mutability": "view"
223
+ },
224
+ {
225
+ "type": "function",
226
+ "name": "min_sigma_for_backing_view",
227
+ "inputs": [
228
+ {
229
+ "name": "k",
230
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
231
+ },
232
+ {
233
+ "name": "backing",
234
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
235
+ }
236
+ ],
237
+ "outputs": [
238
+ {
239
+ "type": "core::option::Option::<the_situation::types::sq128::types::SQ128x128Raw>"
240
+ }
241
+ ],
242
+ "state_mutability": "view"
243
+ },
244
+ {
245
+ "type": "function",
246
+ "name": "min_variance_for_backing_view",
247
+ "inputs": [
248
+ {
249
+ "name": "k",
250
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
251
+ },
252
+ {
253
+ "name": "backing",
254
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
255
+ }
256
+ ],
257
+ "outputs": [
258
+ {
259
+ "type": "core::option::Option::<the_situation::types::sq128::types::SQ128x128Raw>"
260
+ }
261
+ ],
262
+ "state_mutability": "view"
263
+ },
264
+ {
265
+ "type": "function",
266
+ "name": "min_backing_for_position_view",
267
+ "inputs": [
268
+ {
269
+ "name": "dist",
270
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
271
+ },
272
+ {
273
+ "name": "k",
274
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
275
+ }
276
+ ],
277
+ "outputs": [
278
+ {
279
+ "type": "core::option::Option::<the_situation::types::sq128::types::SQ128x128Raw>"
280
+ }
281
+ ],
282
+ "state_mutability": "view"
283
+ },
284
+ {
285
+ "type": "function",
286
+ "name": "compute_backing_denom_hint_view",
287
+ "inputs": [
288
+ {
289
+ "name": "dist",
290
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
291
+ }
292
+ ],
293
+ "outputs": [
294
+ {
295
+ "type": "core::option::Option::<the_situation::types::sq128::types::SQ128x128Raw>"
296
+ }
297
+ ],
298
+ "state_mutability": "view"
299
+ },
300
+ {
301
+ "type": "function",
302
+ "name": "compute_lambda_view",
303
+ "inputs": [
304
+ {
305
+ "name": "dist",
306
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
307
+ },
308
+ {
309
+ "name": "k",
310
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
311
+ }
312
+ ],
313
+ "outputs": [
314
+ {
315
+ "type": "core::option::Option::<the_situation::types::sq128::types::SQ128x128Raw>"
316
+ }
317
+ ],
318
+ "state_mutability": "view"
319
+ },
320
+ {
321
+ "type": "function",
322
+ "name": "compute_effective_trade_k_view",
323
+ "inputs": [
324
+ {
325
+ "name": "base_k",
326
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
327
+ },
328
+ {
329
+ "name": "initial_backing",
330
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
331
+ },
332
+ {
333
+ "name": "pool_backing",
334
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
335
+ }
336
+ ],
337
+ "outputs": [
338
+ {
339
+ "type": "core::option::Option::<the_situation::types::sq128::types::SQ128x128Raw>"
340
+ }
341
+ ],
342
+ "state_mutability": "view"
343
+ },
344
+ {
345
+ "type": "struct",
346
+ "name": "the_situation::onchain::common::FeeConfigRaw",
347
+ "members": [
348
+ {
349
+ "name": "lp_fee_bps",
350
+ "type": "core::integer::u16"
351
+ },
352
+ {
353
+ "name": "protocol_fee_bps",
354
+ "type": "core::integer::u16"
355
+ },
356
+ {
357
+ "name": "settlement_fee_bps",
358
+ "type": "core::integer::u16"
359
+ }
360
+ ]
361
+ },
362
+ {
363
+ "type": "struct",
364
+ "name": "core::integer::u256",
365
+ "members": [
366
+ {
367
+ "name": "low",
368
+ "type": "core::integer::u128"
369
+ },
370
+ {
371
+ "name": "high",
372
+ "type": "core::integer::u128"
373
+ }
374
+ ]
375
+ },
376
+ {
377
+ "type": "struct",
378
+ "name": "the_situation::onchain::common::DepositFeeComputationRaw",
379
+ "members": [
380
+ {
381
+ "name": "token_amount",
382
+ "type": "core::integer::u256"
383
+ },
384
+ {
385
+ "name": "lp_fee",
386
+ "type": "core::integer::u256"
387
+ },
388
+ {
389
+ "name": "protocol_fee",
390
+ "type": "core::integer::u256"
391
+ },
392
+ {
393
+ "name": "net_collateral",
394
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
395
+ }
396
+ ]
397
+ },
398
+ {
399
+ "type": "enum",
400
+ "name": "core::option::Option::<the_situation::onchain::common::DepositFeeComputationRaw>",
401
+ "variants": [
402
+ {
403
+ "name": "Some",
404
+ "type": "the_situation::onchain::common::DepositFeeComputationRaw"
405
+ },
406
+ {
407
+ "name": "None",
408
+ "type": "()"
409
+ }
410
+ ]
411
+ },
412
+ {
413
+ "type": "function",
414
+ "name": "compute_deposit_fees_view",
415
+ "inputs": [
416
+ {
417
+ "name": "amount",
418
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
419
+ },
420
+ {
421
+ "name": "internal_decimals",
422
+ "type": "core::integer::u8"
423
+ },
424
+ {
425
+ "name": "decimal_shift",
426
+ "type": "core::integer::u8"
427
+ },
428
+ {
429
+ "name": "fee_config",
430
+ "type": "the_situation::onchain::common::FeeConfigRaw"
431
+ }
432
+ ],
433
+ "outputs": [
434
+ {
435
+ "type": "core::option::Option::<the_situation::onchain::common::DepositFeeComputationRaw>"
436
+ }
437
+ ],
438
+ "state_mutability": "view"
439
+ },
440
+ {
441
+ "type": "struct",
442
+ "name": "the_situation::onchain::common::AddLiquidityComputationRaw",
443
+ "members": [
444
+ {
445
+ "name": "deposit_amount",
446
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
447
+ },
448
+ {
449
+ "name": "token_amount",
450
+ "type": "core::integer::u256"
451
+ },
452
+ {
453
+ "name": "lp_component_lambda",
454
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
455
+ }
456
+ ]
457
+ },
458
+ {
459
+ "type": "enum",
460
+ "name": "core::option::Option::<the_situation::onchain::common::AddLiquidityComputationRaw>",
461
+ "variants": [
462
+ {
463
+ "name": "Some",
464
+ "type": "the_situation::onchain::common::AddLiquidityComputationRaw"
465
+ },
466
+ {
467
+ "name": "None",
468
+ "type": "()"
469
+ }
470
+ ]
471
+ },
472
+ {
473
+ "type": "function",
474
+ "name": "compute_add_liquidity_view",
475
+ "inputs": [
476
+ {
477
+ "name": "share_amount",
478
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
479
+ },
480
+ {
481
+ "name": "total_shares",
482
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
483
+ },
484
+ {
485
+ "name": "total_backing",
486
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
487
+ },
488
+ {
489
+ "name": "current_dist",
490
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
491
+ },
492
+ {
493
+ "name": "base_k",
494
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
495
+ },
496
+ {
497
+ "name": "internal_decimals",
498
+ "type": "core::integer::u8"
499
+ },
500
+ {
501
+ "name": "decimal_shift",
502
+ "type": "core::integer::u8"
503
+ }
504
+ ],
505
+ "outputs": [
506
+ {
507
+ "type": "core::option::Option::<the_situation::onchain::common::AddLiquidityComputationRaw>"
508
+ }
509
+ ],
510
+ "state_mutability": "view"
511
+ },
512
+ {
513
+ "type": "struct",
514
+ "name": "the_situation::onchain::common::RemoveLiquidityComputationRaw",
515
+ "members": [
516
+ {
517
+ "name": "withdrawal_amount",
518
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
519
+ },
520
+ {
521
+ "name": "token_amount",
522
+ "type": "core::integer::u256"
523
+ },
524
+ {
525
+ "name": "remaining_fraction",
526
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
527
+ }
528
+ ]
529
+ },
530
+ {
531
+ "type": "enum",
532
+ "name": "core::option::Option::<the_situation::onchain::common::RemoveLiquidityComputationRaw>",
533
+ "variants": [
534
+ {
535
+ "name": "Some",
536
+ "type": "the_situation::onchain::common::RemoveLiquidityComputationRaw"
537
+ },
538
+ {
539
+ "name": "None",
540
+ "type": "()"
541
+ }
542
+ ]
543
+ },
544
+ {
545
+ "type": "function",
546
+ "name": "compute_remove_liquidity_view",
547
+ "inputs": [
548
+ {
549
+ "name": "share_amount",
550
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
551
+ },
552
+ {
553
+ "name": "total_shares",
554
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
555
+ },
556
+ {
557
+ "name": "total_backing",
558
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
559
+ },
560
+ {
561
+ "name": "current_lp_shares",
562
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
563
+ },
564
+ {
565
+ "name": "internal_decimals",
566
+ "type": "core::integer::u8"
567
+ },
568
+ {
569
+ "name": "decimal_shift",
570
+ "type": "core::integer::u8"
571
+ }
572
+ ],
573
+ "outputs": [
574
+ {
575
+ "type": "core::option::Option::<the_situation::onchain::common::RemoveLiquidityComputationRaw>"
576
+ }
577
+ ],
578
+ "state_mutability": "view"
579
+ },
580
+ {
581
+ "type": "function",
582
+ "name": "check_withdrawal_convertible_view",
583
+ "inputs": [
584
+ {
585
+ "name": "amount",
586
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
587
+ },
588
+ {
589
+ "name": "internal_decimals",
590
+ "type": "core::integer::u8"
591
+ }
592
+ ],
593
+ "outputs": [
594
+ {
595
+ "type": "core::bool"
596
+ }
597
+ ],
598
+ "state_mutability": "view"
599
+ },
600
+ {
601
+ "type": "function",
602
+ "name": "token_amount_to_backing_view",
603
+ "inputs": [
604
+ {
605
+ "name": "token_amount",
606
+ "type": "core::integer::u256"
607
+ },
608
+ {
609
+ "name": "internal_decimals",
610
+ "type": "core::integer::u8"
611
+ },
612
+ {
613
+ "name": "decimal_shift",
614
+ "type": "core::integer::u8"
615
+ }
616
+ ],
617
+ "outputs": [
618
+ {
619
+ "type": "core::option::Option::<the_situation::types::sq128::types::SQ128x128Raw>"
620
+ }
621
+ ],
622
+ "state_mutability": "view"
623
+ },
624
+ {
625
+ "type": "struct",
626
+ "name": "the_situation::onchain::common::PositionCompactRaw",
627
+ "members": [
628
+ {
629
+ "name": "original_mean",
630
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
631
+ },
632
+ {
633
+ "name": "original_variance",
634
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
635
+ },
636
+ {
637
+ "name": "original_sigma",
638
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
639
+ },
640
+ {
641
+ "name": "original_lambda",
642
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
643
+ },
644
+ {
645
+ "name": "effective_mean",
646
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
647
+ },
648
+ {
649
+ "name": "effective_variance",
650
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
651
+ },
652
+ {
653
+ "name": "effective_sigma",
654
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
655
+ },
656
+ {
657
+ "name": "effective_lambda",
658
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
659
+ },
660
+ {
661
+ "name": "close_market_mean",
662
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
663
+ },
664
+ {
665
+ "name": "close_market_variance",
666
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
667
+ },
668
+ {
669
+ "name": "close_market_sigma",
670
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
671
+ },
672
+ {
673
+ "name": "close_market_lambda",
674
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
675
+ },
676
+ {
677
+ "name": "total_collateral",
678
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
679
+ },
680
+ {
681
+ "name": "flags",
682
+ "type": "core::integer::u8"
683
+ }
684
+ ]
685
+ },
686
+ {
687
+ "type": "function",
688
+ "name": "compute_position_value_compact_view",
689
+ "inputs": [
690
+ {
691
+ "name": "position",
692
+ "type": "the_situation::onchain::common::PositionCompactRaw"
693
+ },
694
+ {
695
+ "name": "settlement",
696
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
697
+ }
698
+ ],
699
+ "outputs": [
700
+ {
701
+ "type": "core::option::Option::<the_situation::types::sq128::types::SQ128x128Raw>"
702
+ }
703
+ ],
704
+ "state_mutability": "view"
705
+ },
706
+ {
707
+ "type": "function",
708
+ "name": "compute_lp_claim_component_value_view",
709
+ "inputs": [
710
+ {
711
+ "name": "dist",
712
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
713
+ },
714
+ {
715
+ "name": "lambda",
716
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
717
+ },
718
+ {
719
+ "name": "settlement",
720
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
721
+ }
722
+ ],
723
+ "outputs": [
724
+ {
725
+ "type": "core::option::Option::<the_situation::types::sq128::types::SQ128x128Raw>"
726
+ }
727
+ ],
728
+ "state_mutability": "view"
729
+ },
730
+ {
731
+ "type": "struct",
732
+ "name": "the_situation::onchain::common::ClaimResultRaw",
733
+ "members": [
734
+ {
735
+ "name": "position_value",
736
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
737
+ },
738
+ {
739
+ "name": "collateral_returned",
740
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
741
+ },
742
+ {
743
+ "name": "token_payout",
744
+ "type": "core::integer::u256"
745
+ },
746
+ {
747
+ "name": "success",
748
+ "type": "core::bool"
749
+ }
750
+ ]
751
+ },
752
+ {
753
+ "type": "function",
754
+ "name": "compute_claim_result_from_components_view",
755
+ "inputs": [
756
+ {
757
+ "name": "position_value",
758
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
759
+ },
760
+ {
761
+ "name": "total_collateral",
762
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
763
+ },
764
+ {
765
+ "name": "internal_decimals",
766
+ "type": "core::integer::u8"
767
+ },
768
+ {
769
+ "name": "decimal_shift",
770
+ "type": "core::integer::u8"
771
+ }
772
+ ],
773
+ "outputs": [
774
+ {
775
+ "type": "the_situation::onchain::common::ClaimResultRaw"
776
+ }
777
+ ],
778
+ "state_mutability": "view"
779
+ },
780
+ {
781
+ "type": "struct",
782
+ "name": "the_situation::onchain::common::PdfNormCheckRaw",
783
+ "members": [
784
+ {
785
+ "name": "sigma",
786
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
787
+ },
788
+ {
789
+ "name": "computed_norm",
790
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
791
+ },
792
+ {
793
+ "name": "target_norm",
794
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
795
+ },
796
+ {
797
+ "name": "is_valid",
798
+ "type": "core::bool"
799
+ },
800
+ {
801
+ "name": "computation_succeeded",
802
+ "type": "core::bool"
803
+ }
804
+ ]
805
+ },
806
+ {
807
+ "type": "function",
808
+ "name": "check_pdf_norm_view",
809
+ "inputs": [
810
+ {
811
+ "name": "dist",
812
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
813
+ },
814
+ {
815
+ "name": "target_norm",
816
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
817
+ },
818
+ {
819
+ "name": "tolerance",
820
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
821
+ }
822
+ ],
823
+ "outputs": [
824
+ {
825
+ "type": "the_situation::onchain::common::PdfNormCheckRaw"
826
+ }
827
+ ],
828
+ "state_mutability": "view"
829
+ },
830
+ {
831
+ "type": "function",
832
+ "name": "sigma_for_target_norm_view",
833
+ "inputs": [
834
+ {
835
+ "name": "target_norm",
836
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
837
+ }
838
+ ],
839
+ "outputs": [
840
+ {
841
+ "type": "core::option::Option::<the_situation::types::sq128::types::SQ128x128Raw>"
842
+ }
843
+ ],
844
+ "state_mutability": "view"
845
+ },
846
+ {
847
+ "type": "function",
848
+ "name": "variance_for_target_norm_view",
849
+ "inputs": [
850
+ {
851
+ "name": "target_norm",
852
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
853
+ }
854
+ ],
855
+ "outputs": [
856
+ {
857
+ "type": "core::option::Option::<the_situation::types::sq128::types::SQ128x128Raw>"
858
+ }
859
+ ],
860
+ "state_mutability": "view"
861
+ },
862
+ {
863
+ "type": "struct",
864
+ "name": "the_situation::onchain::common::NormalSqrtHintsRaw",
865
+ "members": [
866
+ {
867
+ "name": "l2_norm_denom",
868
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
869
+ },
870
+ {
871
+ "name": "backing_denom",
872
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
873
+ }
874
+ ]
875
+ },
876
+ {
877
+ "type": "enum",
878
+ "name": "core::option::Option::<the_situation::onchain::common::NormalSqrtHintsRaw>",
879
+ "variants": [
880
+ {
881
+ "name": "Some",
882
+ "type": "the_situation::onchain::common::NormalSqrtHintsRaw"
883
+ },
884
+ {
885
+ "name": "None",
886
+ "type": "()"
887
+ }
888
+ ]
889
+ },
890
+ {
891
+ "type": "function",
892
+ "name": "compute_hints_view",
893
+ "inputs": [
894
+ {
895
+ "name": "dist",
896
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
897
+ }
898
+ ],
899
+ "outputs": [
900
+ {
901
+ "type": "core::option::Option::<the_situation::onchain::common::NormalSqrtHintsRaw>"
902
+ }
903
+ ],
904
+ "state_mutability": "view"
905
+ },
906
+ {
907
+ "type": "struct",
908
+ "name": "the_situation::onchain::common::CollateralVerificationRaw",
909
+ "members": [
910
+ {
911
+ "name": "side_valid",
912
+ "type": "core::bool"
913
+ },
914
+ {
915
+ "name": "stationary_valid",
916
+ "type": "core::bool"
917
+ },
918
+ {
919
+ "name": "curvature_valid",
920
+ "type": "core::bool"
921
+ },
922
+ {
923
+ "name": "computed_collateral",
924
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
925
+ },
926
+ {
927
+ "name": "collateral_sufficient",
928
+ "type": "core::bool"
929
+ },
930
+ {
931
+ "name": "computation_valid",
932
+ "type": "core::bool"
933
+ }
934
+ ]
935
+ },
936
+ {
937
+ "type": "struct",
938
+ "name": "the_situation::onchain::common::TradeCheckRaw",
939
+ "members": [
940
+ {
941
+ "name": "backing_check",
942
+ "type": "the_situation::onchain::common::ScaledBackingCheckRaw"
943
+ },
944
+ {
945
+ "name": "verification",
946
+ "type": "the_situation::onchain::common::CollateralVerificationRaw"
947
+ },
948
+ {
949
+ "name": "min_trade_collateral",
950
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
951
+ },
952
+ {
953
+ "name": "collateral_above_min",
954
+ "type": "core::bool"
955
+ },
956
+ {
957
+ "name": "is_valid",
958
+ "type": "core::bool"
959
+ }
960
+ ]
961
+ },
962
+ {
963
+ "type": "function",
964
+ "name": "check_trade_view",
965
+ "inputs": [
966
+ {
967
+ "name": "current_dist",
968
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
969
+ },
970
+ {
971
+ "name": "candidate",
972
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
973
+ },
974
+ {
975
+ "name": "x_star",
976
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
977
+ },
978
+ {
979
+ "name": "supplied_collateral",
980
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
981
+ },
982
+ {
983
+ "name": "k",
984
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
985
+ },
986
+ {
987
+ "name": "backing",
988
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
989
+ },
990
+ {
991
+ "name": "tolerance",
992
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
993
+ },
994
+ {
995
+ "name": "min_trade_collateral",
996
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
997
+ },
998
+ {
999
+ "name": "current_hints",
1000
+ "type": "the_situation::onchain::common::NormalSqrtHintsRaw"
1001
+ },
1002
+ {
1003
+ "name": "candidate_hints",
1004
+ "type": "the_situation::onchain::common::NormalSqrtHintsRaw"
1005
+ }
1006
+ ],
1007
+ "outputs": [
1008
+ {
1009
+ "type": "the_situation::onchain::common::TradeCheckRaw"
1010
+ }
1011
+ ],
1012
+ "state_mutability": "view"
1013
+ },
1014
+ {
1015
+ "type": "struct",
1016
+ "name": "the_situation::onchain::markets::normal::position::PositionDeltaRaw",
1017
+ "members": [
1018
+ {
1019
+ "name": "from_mean",
1020
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1021
+ },
1022
+ {
1023
+ "name": "from_variance",
1024
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1025
+ },
1026
+ {
1027
+ "name": "from_sigma",
1028
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1029
+ },
1030
+ {
1031
+ "name": "from_lambda",
1032
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1033
+ },
1034
+ {
1035
+ "name": "to_mean",
1036
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1037
+ },
1038
+ {
1039
+ "name": "to_variance",
1040
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1041
+ },
1042
+ {
1043
+ "name": "to_sigma",
1044
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1045
+ },
1046
+ {
1047
+ "name": "to_lambda",
1048
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1049
+ },
1050
+ {
1051
+ "name": "collateral_locked",
1052
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1053
+ }
1054
+ ]
1055
+ },
1056
+ {
1057
+ "type": "struct",
1058
+ "name": "core::array::Span::<the_situation::onchain::markets::normal::position::PositionDeltaRaw>",
1059
+ "members": [
1060
+ {
1061
+ "name": "snapshot",
1062
+ "type": "@core::array::Array::<the_situation::onchain::markets::normal::position::PositionDeltaRaw>"
1063
+ }
1064
+ ]
1065
+ },
1066
+ {
1067
+ "type": "function",
1068
+ "name": "compute_position_value_view",
1069
+ "inputs": [
1070
+ {
1071
+ "name": "deltas",
1072
+ "type": "core::array::Span::<the_situation::onchain::markets::normal::position::PositionDeltaRaw>"
1073
+ },
1074
+ {
1075
+ "name": "outcome",
1076
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1077
+ }
1078
+ ],
1079
+ "outputs": [
1080
+ {
1081
+ "type": "core::option::Option::<the_situation::types::sq128::types::SQ128x128Raw>"
1082
+ }
1083
+ ],
1084
+ "state_mutability": "view"
1085
+ },
1086
+ {
1087
+ "type": "function",
1088
+ "name": "preview_claim_view",
1089
+ "inputs": [
1090
+ {
1091
+ "name": "deltas",
1092
+ "type": "core::array::Span::<the_situation::onchain::markets::normal::position::PositionDeltaRaw>"
1093
+ },
1094
+ {
1095
+ "name": "settlement_value",
1096
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1097
+ },
1098
+ {
1099
+ "name": "total_collateral",
1100
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1101
+ },
1102
+ {
1103
+ "name": "internal_decimals",
1104
+ "type": "core::integer::u8"
1105
+ },
1106
+ {
1107
+ "name": "decimal_shift",
1108
+ "type": "core::integer::u8"
1109
+ },
1110
+ {
1111
+ "name": "settlement_fee_bps",
1112
+ "type": "core::integer::u16"
1113
+ }
1114
+ ],
1115
+ "outputs": [
1116
+ {
1117
+ "type": "the_situation::onchain::common::ClaimResultRaw"
1118
+ }
1119
+ ],
1120
+ "state_mutability": "view"
1121
+ },
1122
+ {
1123
+ "type": "struct",
1124
+ "name": "the_situation::onchain::common::TradeExecutionRaw",
1125
+ "members": [
1126
+ {
1127
+ "name": "check",
1128
+ "type": "the_situation::onchain::common::TradeCheckRaw"
1129
+ },
1130
+ {
1131
+ "name": "token_amount",
1132
+ "type": "core::integer::u256"
1133
+ },
1134
+ {
1135
+ "name": "delta_index",
1136
+ "type": "core::integer::u32"
1137
+ }
1138
+ ]
1139
+ },
1140
+ {
1141
+ "type": "enum",
1142
+ "name": "the_situation::onchain::common::PositionCloseRejection",
1143
+ "variants": [
1144
+ {
1145
+ "name": "None",
1146
+ "type": "()"
1147
+ },
1148
+ {
1149
+ "name": "NoPosition",
1150
+ "type": "()"
1151
+ },
1152
+ {
1153
+ "name": "MarketSettled",
1154
+ "type": "()"
1155
+ },
1156
+ {
1157
+ "name": "MarketPaused",
1158
+ "type": "()"
1159
+ },
1160
+ {
1161
+ "name": "AlreadyClosed",
1162
+ "type": "()"
1163
+ },
1164
+ {
1165
+ "name": "AlreadyClaimed",
1166
+ "type": "()"
1167
+ },
1168
+ {
1169
+ "name": "InvalidAdditionalCollateral",
1170
+ "type": "()"
1171
+ },
1172
+ {
1173
+ "name": "InvalidPositionState",
1174
+ "type": "()"
1175
+ },
1176
+ {
1177
+ "name": "InvalidHints",
1178
+ "type": "()"
1179
+ },
1180
+ {
1181
+ "name": "BackingFail",
1182
+ "type": "()"
1183
+ },
1184
+ {
1185
+ "name": "LowCollateral",
1186
+ "type": "()"
1187
+ },
1188
+ {
1189
+ "name": "VerificationFailed",
1190
+ "type": "()"
1191
+ },
1192
+ {
1193
+ "name": "CollateralTooLarge",
1194
+ "type": "()"
1195
+ },
1196
+ {
1197
+ "name": "InvalidState",
1198
+ "type": "()"
1199
+ }
1200
+ ]
1201
+ },
1202
+ {
1203
+ "type": "struct",
1204
+ "name": "the_situation::onchain::common::PositionCloseResultRaw",
1205
+ "members": [
1206
+ {
1207
+ "name": "trade_executed",
1208
+ "type": "core::bool"
1209
+ },
1210
+ {
1211
+ "name": "trade_result",
1212
+ "type": "the_situation::onchain::common::TradeExecutionRaw"
1213
+ },
1214
+ {
1215
+ "name": "is_flat",
1216
+ "type": "core::bool"
1217
+ },
1218
+ {
1219
+ "name": "immediate_payout",
1220
+ "type": "core::integer::u256"
1221
+ },
1222
+ {
1223
+ "name": "collateral_required",
1224
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1225
+ },
1226
+ {
1227
+ "name": "existing_collateral",
1228
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1229
+ },
1230
+ {
1231
+ "name": "additional_required",
1232
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1233
+ },
1234
+ {
1235
+ "name": "net_additional_collateral",
1236
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1237
+ },
1238
+ {
1239
+ "name": "lp_fee",
1240
+ "type": "core::integer::u256"
1241
+ },
1242
+ {
1243
+ "name": "protocol_fee",
1244
+ "type": "core::integer::u256"
1245
+ },
1246
+ {
1247
+ "name": "rejection_reason",
1248
+ "type": "the_situation::onchain::common::PositionCloseRejection"
1249
+ }
1250
+ ]
1251
+ },
1252
+ {
1253
+ "type": "function",
1254
+ "name": "check_close_position_compact_view",
1255
+ "inputs": [
1256
+ {
1257
+ "name": "position",
1258
+ "type": "the_situation::onchain::common::PositionCompactRaw"
1259
+ },
1260
+ {
1261
+ "name": "market_dist",
1262
+ "type": "the_situation::types::normal_distribution::NormalDistributionRaw"
1263
+ },
1264
+ {
1265
+ "name": "x_star",
1266
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1267
+ },
1268
+ {
1269
+ "name": "additional_collateral",
1270
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1271
+ },
1272
+ {
1273
+ "name": "k",
1274
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1275
+ },
1276
+ {
1277
+ "name": "backing",
1278
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1279
+ },
1280
+ {
1281
+ "name": "tolerance",
1282
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1283
+ },
1284
+ {
1285
+ "name": "min_trade_collateral",
1286
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1287
+ },
1288
+ {
1289
+ "name": "current_hints",
1290
+ "type": "the_situation::onchain::common::NormalSqrtHintsRaw"
1291
+ },
1292
+ {
1293
+ "name": "target_hints",
1294
+ "type": "the_situation::onchain::common::NormalSqrtHintsRaw"
1295
+ },
1296
+ {
1297
+ "name": "internal_decimals",
1298
+ "type": "core::integer::u8"
1299
+ },
1300
+ {
1301
+ "name": "decimal_shift",
1302
+ "type": "core::integer::u8"
1303
+ },
1304
+ {
1305
+ "name": "fee_config",
1306
+ "type": "the_situation::onchain::common::FeeConfigRaw"
1307
+ }
1308
+ ],
1309
+ "outputs": [
1310
+ {
1311
+ "type": "the_situation::onchain::common::PositionCloseResultRaw"
1312
+ }
1313
+ ],
1314
+ "state_mutability": "view"
1315
+ },
1316
+ {
1317
+ "type": "function",
1318
+ "name": "preview_add_liquidity_view",
1319
+ "inputs": [
1320
+ {
1321
+ "name": "share_amount",
1322
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1323
+ },
1324
+ {
1325
+ "name": "total_shares",
1326
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1327
+ },
1328
+ {
1329
+ "name": "total_backing",
1330
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1331
+ },
1332
+ {
1333
+ "name": "internal_decimals",
1334
+ "type": "core::integer::u8"
1335
+ },
1336
+ {
1337
+ "name": "decimal_shift",
1338
+ "type": "core::integer::u8"
1339
+ }
1340
+ ],
1341
+ "outputs": [
1342
+ {
1343
+ "type": "core::integer::u256"
1344
+ }
1345
+ ],
1346
+ "state_mutability": "view"
1347
+ },
1348
+ {
1349
+ "type": "function",
1350
+ "name": "preview_remove_liquidity_view",
1351
+ "inputs": [
1352
+ {
1353
+ "name": "share_amount",
1354
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1355
+ },
1356
+ {
1357
+ "name": "total_shares",
1358
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1359
+ },
1360
+ {
1361
+ "name": "total_backing",
1362
+ "type": "the_situation::types::sq128::types::SQ128x128Raw"
1363
+ },
1364
+ {
1365
+ "name": "internal_decimals",
1366
+ "type": "core::integer::u8"
1367
+ },
1368
+ {
1369
+ "name": "decimal_shift",
1370
+ "type": "core::integer::u8"
1371
+ }
1372
+ ],
1373
+ "outputs": [
1374
+ {
1375
+ "type": "core::integer::u256"
1376
+ }
1377
+ ],
1378
+ "state_mutability": "view"
1379
+ },
1380
+ {
1381
+ "type": "event",
1382
+ "name": "the_situation::onchain::markets::normal::math::contract::normal_math_library::Event",
1383
+ "kind": "enum",
1384
+ "variants": []
1385
+ }
1386
+ ]