@xccy/ts-sdk 0.1.1 → 0.1.3

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,2217 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import { Contract, Interface, type ContractRunner } from "ethers";
6
+ import type {
7
+ ICollateralEngine,
8
+ ICollateralEngineInterface,
9
+ } from "../ICollateralEngine";
10
+
11
+ const _abi = [
12
+ {
13
+ type: "function",
14
+ name: "aprOracle",
15
+ inputs: [],
16
+ outputs: [
17
+ {
18
+ name: "",
19
+ type: "address",
20
+ internalType: "contract IAprOracle",
21
+ },
22
+ ],
23
+ stateMutability: "view",
24
+ },
25
+ {
26
+ type: "function",
27
+ name: "calculateAccountObligation",
28
+ inputs: [
29
+ {
30
+ name: "account",
31
+ type: "tuple",
32
+ internalType: "struct Account.AccountId",
33
+ components: [
34
+ {
35
+ name: "owner",
36
+ type: "address",
37
+ internalType: "address",
38
+ },
39
+ {
40
+ name: "id",
41
+ type: "uint96",
42
+ internalType: "uint96",
43
+ },
44
+ {
45
+ name: "isolatedMarginToken",
46
+ type: "address",
47
+ internalType: "address",
48
+ },
49
+ ],
50
+ },
51
+ {
52
+ name: "includePositionsGrowth",
53
+ type: "bool",
54
+ internalType: "bool",
55
+ },
56
+ ],
57
+ outputs: [
58
+ {
59
+ name: "usdObligations",
60
+ type: "uint256",
61
+ internalType: "uint256",
62
+ },
63
+ ],
64
+ stateMutability: "view",
65
+ },
66
+ {
67
+ type: "function",
68
+ name: "calculateAccountObligation",
69
+ inputs: [
70
+ {
71
+ name: "account",
72
+ type: "tuple",
73
+ internalType: "struct Account.AccountId",
74
+ components: [
75
+ {
76
+ name: "owner",
77
+ type: "address",
78
+ internalType: "address",
79
+ },
80
+ {
81
+ name: "id",
82
+ type: "uint96",
83
+ internalType: "uint96",
84
+ },
85
+ {
86
+ name: "isolatedMarginToken",
87
+ type: "address",
88
+ internalType: "address",
89
+ },
90
+ ],
91
+ },
92
+ ],
93
+ outputs: [
94
+ {
95
+ name: "usdObligations",
96
+ type: "uint256",
97
+ internalType: "uint256",
98
+ },
99
+ ],
100
+ stateMutability: "view",
101
+ },
102
+ {
103
+ type: "function",
104
+ name: "calculateLiquidationAmounts",
105
+ inputs: [
106
+ {
107
+ name: "poolKey",
108
+ type: "tuple",
109
+ internalType: "struct PoolKey.Key",
110
+ components: [
111
+ {
112
+ name: "underlyingAsset",
113
+ type: "address",
114
+ internalType: "address",
115
+ },
116
+ {
117
+ name: "compoundToken",
118
+ type: "address",
119
+ internalType: "address",
120
+ },
121
+ {
122
+ name: "termStartTimestampWad",
123
+ type: "uint256",
124
+ internalType: "uint256",
125
+ },
126
+ {
127
+ name: "termEndTimestampWad",
128
+ type: "uint256",
129
+ internalType: "uint256",
130
+ },
131
+ {
132
+ name: "feeWad",
133
+ type: "uint256",
134
+ internalType: "uint256",
135
+ },
136
+ {
137
+ name: "tickSpacing",
138
+ type: "int24",
139
+ internalType: "int24",
140
+ },
141
+ ],
142
+ },
143
+ {
144
+ name: "fixedBalance",
145
+ type: "int256",
146
+ internalType: "int256",
147
+ },
148
+ {
149
+ name: "collateralAssetToTake",
150
+ type: "address",
151
+ internalType: "address",
152
+ },
153
+ {
154
+ name: "debtToCover",
155
+ type: "uint256",
156
+ internalType: "uint256",
157
+ },
158
+ {
159
+ name: "collateralUserBalance",
160
+ type: "uint256",
161
+ internalType: "uint256",
162
+ },
163
+ ],
164
+ outputs: [
165
+ {
166
+ name: "collateralToSeize",
167
+ type: "uint256",
168
+ internalType: "uint256",
169
+ },
170
+ {
171
+ name: "effectiveDebt",
172
+ type: "uint256",
173
+ internalType: "uint256",
174
+ },
175
+ {
176
+ name: "fixedCovered",
177
+ type: "uint256",
178
+ internalType: "uint256",
179
+ },
180
+ ],
181
+ stateMutability: "view",
182
+ },
183
+ {
184
+ type: "function",
185
+ name: "checkMarginRequirement",
186
+ inputs: [
187
+ {
188
+ name: "account",
189
+ type: "tuple",
190
+ internalType: "struct Account.AccountId",
191
+ components: [
192
+ {
193
+ name: "owner",
194
+ type: "address",
195
+ internalType: "address",
196
+ },
197
+ {
198
+ name: "id",
199
+ type: "uint96",
200
+ internalType: "uint96",
201
+ },
202
+ {
203
+ name: "isolatedMarginToken",
204
+ type: "address",
205
+ internalType: "address",
206
+ },
207
+ ],
208
+ },
209
+ ],
210
+ outputs: [
211
+ {
212
+ name: "positionMarginRequirement",
213
+ type: "uint256",
214
+ internalType: "uint256",
215
+ },
216
+ ],
217
+ stateMutability: "nonpayable",
218
+ },
219
+ {
220
+ type: "function",
221
+ name: "dustThresholdWad",
222
+ inputs: [],
223
+ outputs: [
224
+ {
225
+ name: "",
226
+ type: "uint256",
227
+ internalType: "uint256",
228
+ },
229
+ ],
230
+ stateMutability: "view",
231
+ },
232
+ {
233
+ type: "function",
234
+ name: "eliminateDeficit",
235
+ inputs: [
236
+ {
237
+ name: "token",
238
+ type: "address",
239
+ internalType: "address",
240
+ },
241
+ {
242
+ name: "amount",
243
+ type: "uint256",
244
+ internalType: "uint256",
245
+ },
246
+ ],
247
+ outputs: [],
248
+ stateMutability: "nonpayable",
249
+ },
250
+ {
251
+ type: "function",
252
+ name: "esm",
253
+ inputs: [],
254
+ outputs: [
255
+ {
256
+ name: "",
257
+ type: "address",
258
+ internalType: "address",
259
+ },
260
+ ],
261
+ stateMutability: "view",
262
+ },
263
+ {
264
+ type: "function",
265
+ name: "executeEarlySettlement",
266
+ inputs: [
267
+ {
268
+ name: "account",
269
+ type: "tuple",
270
+ internalType: "struct Account.AccountId",
271
+ components: [
272
+ {
273
+ name: "owner",
274
+ type: "address",
275
+ internalType: "address",
276
+ },
277
+ {
278
+ name: "id",
279
+ type: "uint96",
280
+ internalType: "uint96",
281
+ },
282
+ {
283
+ name: "isolatedMarginToken",
284
+ type: "address",
285
+ internalType: "address",
286
+ },
287
+ ],
288
+ },
289
+ {
290
+ name: "poolId",
291
+ type: "bytes32",
292
+ internalType: "bytes32",
293
+ },
294
+ {
295
+ name: "tickLower",
296
+ type: "int24",
297
+ internalType: "int24",
298
+ },
299
+ {
300
+ name: "tickUpper",
301
+ type: "int24",
302
+ internalType: "int24",
303
+ },
304
+ {
305
+ name: "amountDelta",
306
+ type: "int256",
307
+ internalType: "int256",
308
+ },
309
+ ],
310
+ outputs: [],
311
+ stateMutability: "nonpayable",
312
+ },
313
+ {
314
+ type: "function",
315
+ name: "getAccountBalance",
316
+ inputs: [
317
+ {
318
+ name: "account",
319
+ type: "tuple",
320
+ internalType: "struct Account.AccountId",
321
+ components: [
322
+ {
323
+ name: "owner",
324
+ type: "address",
325
+ internalType: "address",
326
+ },
327
+ {
328
+ name: "id",
329
+ type: "uint96",
330
+ internalType: "uint96",
331
+ },
332
+ {
333
+ name: "isolatedMarginToken",
334
+ type: "address",
335
+ internalType: "address",
336
+ },
337
+ ],
338
+ },
339
+ {
340
+ name: "token",
341
+ type: "address",
342
+ internalType: "address",
343
+ },
344
+ ],
345
+ outputs: [
346
+ {
347
+ name: "balance",
348
+ type: "uint256",
349
+ internalType: "uint256",
350
+ },
351
+ ],
352
+ stateMutability: "view",
353
+ },
354
+ {
355
+ type: "function",
356
+ name: "getAccountMarginValues",
357
+ inputs: [
358
+ {
359
+ name: "account",
360
+ type: "tuple",
361
+ internalType: "struct Account.AccountId",
362
+ components: [
363
+ {
364
+ name: "owner",
365
+ type: "address",
366
+ internalType: "address",
367
+ },
368
+ {
369
+ name: "id",
370
+ type: "uint96",
371
+ internalType: "uint96",
372
+ },
373
+ {
374
+ name: "isolatedMarginToken",
375
+ type: "address",
376
+ internalType: "address",
377
+ },
378
+ ],
379
+ },
380
+ ],
381
+ outputs: [
382
+ {
383
+ name: "avgLtv",
384
+ type: "uint256",
385
+ internalType: "uint256",
386
+ },
387
+ {
388
+ name: "avgLiquidationThreshold",
389
+ type: "uint256",
390
+ internalType: "uint256",
391
+ },
392
+ {
393
+ name: "totalRawValueWad",
394
+ type: "uint256",
395
+ internalType: "uint256",
396
+ },
397
+ ],
398
+ stateMutability: "view",
399
+ },
400
+ {
401
+ type: "function",
402
+ name: "getMarginAssetConfig",
403
+ inputs: [
404
+ {
405
+ name: "token",
406
+ type: "address",
407
+ internalType: "address",
408
+ },
409
+ ],
410
+ outputs: [
411
+ {
412
+ name: "config",
413
+ type: "tuple",
414
+ internalType: "struct CollateralEngineStorage.AssetConfig",
415
+ components: [
416
+ {
417
+ name: "ltvWad",
418
+ type: "uint256",
419
+ internalType: "uint256",
420
+ },
421
+ {
422
+ name: "liquidationThresholdWad",
423
+ type: "uint256",
424
+ internalType: "uint256",
425
+ },
426
+ {
427
+ name: "autoExchangeBonusWad",
428
+ type: "uint256",
429
+ internalType: "uint256",
430
+ },
431
+ ],
432
+ },
433
+ ],
434
+ stateMutability: "view",
435
+ },
436
+ {
437
+ type: "function",
438
+ name: "getPoolKey",
439
+ inputs: [
440
+ {
441
+ name: "poolId",
442
+ type: "bytes32",
443
+ internalType: "bytes32",
444
+ },
445
+ ],
446
+ outputs: [
447
+ {
448
+ name: "poolKey",
449
+ type: "tuple",
450
+ internalType: "struct PoolKey.Key",
451
+ components: [
452
+ {
453
+ name: "underlyingAsset",
454
+ type: "address",
455
+ internalType: "address",
456
+ },
457
+ {
458
+ name: "compoundToken",
459
+ type: "address",
460
+ internalType: "address",
461
+ },
462
+ {
463
+ name: "termStartTimestampWad",
464
+ type: "uint256",
465
+ internalType: "uint256",
466
+ },
467
+ {
468
+ name: "termEndTimestampWad",
469
+ type: "uint256",
470
+ internalType: "uint256",
471
+ },
472
+ {
473
+ name: "feeWad",
474
+ type: "uint256",
475
+ internalType: "uint256",
476
+ },
477
+ {
478
+ name: "tickSpacing",
479
+ type: "int24",
480
+ internalType: "int24",
481
+ },
482
+ ],
483
+ },
484
+ ],
485
+ stateMutability: "view",
486
+ },
487
+ {
488
+ type: "function",
489
+ name: "getPositionInfo",
490
+ inputs: [
491
+ {
492
+ name: "account",
493
+ type: "tuple",
494
+ internalType: "struct Account.AccountId",
495
+ components: [
496
+ {
497
+ name: "owner",
498
+ type: "address",
499
+ internalType: "address",
500
+ },
501
+ {
502
+ name: "id",
503
+ type: "uint96",
504
+ internalType: "uint96",
505
+ },
506
+ {
507
+ name: "isolatedMarginToken",
508
+ type: "address",
509
+ internalType: "address",
510
+ },
511
+ ],
512
+ },
513
+ {
514
+ name: "poolId",
515
+ type: "bytes32",
516
+ internalType: "bytes32",
517
+ },
518
+ {
519
+ name: "tickLower",
520
+ type: "int24",
521
+ internalType: "int24",
522
+ },
523
+ {
524
+ name: "tickUpper",
525
+ type: "int24",
526
+ internalType: "int24",
527
+ },
528
+ ],
529
+ outputs: [
530
+ {
531
+ name: "",
532
+ type: "tuple",
533
+ internalType: "struct Position.Info",
534
+ components: [
535
+ {
536
+ name: "_liquidity",
537
+ type: "uint128",
538
+ internalType: "uint128",
539
+ },
540
+ {
541
+ name: "fixedTokenGrowthInsideLastX128",
542
+ type: "int256",
543
+ internalType: "int256",
544
+ },
545
+ {
546
+ name: "variableTokenGrowthInsideLastX128",
547
+ type: "int256",
548
+ internalType: "int256",
549
+ },
550
+ {
551
+ name: "fixedTokenBalance",
552
+ type: "int256",
553
+ internalType: "int256",
554
+ },
555
+ {
556
+ name: "variableTokenBalance",
557
+ type: "int256",
558
+ internalType: "int256",
559
+ },
560
+ {
561
+ name: "tradedNotional",
562
+ type: "int256",
563
+ internalType: "int256",
564
+ },
565
+ {
566
+ name: "lpLockedUnwindFee",
567
+ type: "int256",
568
+ internalType: "int256",
569
+ },
570
+ {
571
+ name: "accumulatedFees",
572
+ type: "uint256",
573
+ internalType: "uint256",
574
+ },
575
+ ],
576
+ },
577
+ ],
578
+ stateMutability: "view",
579
+ },
580
+ {
581
+ type: "function",
582
+ name: "getTokenDeficit",
583
+ inputs: [
584
+ {
585
+ name: "token",
586
+ type: "address",
587
+ internalType: "address",
588
+ },
589
+ ],
590
+ outputs: [
591
+ {
592
+ name: "deficit",
593
+ type: "uint256",
594
+ internalType: "uint256",
595
+ },
596
+ ],
597
+ stateMutability: "view",
598
+ },
599
+ {
600
+ type: "function",
601
+ name: "initialize",
602
+ inputs: [
603
+ {
604
+ name: "__oracleHub",
605
+ type: "address",
606
+ internalType: "contract IOracleHub",
607
+ },
608
+ {
609
+ name: "__aprOracle",
610
+ type: "address",
611
+ internalType: "contract IAprOracle",
612
+ },
613
+ ],
614
+ outputs: [],
615
+ stateMutability: "nonpayable",
616
+ },
617
+ {
618
+ type: "function",
619
+ name: "isAccountOperator",
620
+ inputs: [
621
+ {
622
+ name: "accountOwner",
623
+ type: "address",
624
+ internalType: "address",
625
+ },
626
+ {
627
+ name: "operator",
628
+ type: "address",
629
+ internalType: "address",
630
+ },
631
+ ],
632
+ outputs: [
633
+ {
634
+ name: "",
635
+ type: "bool",
636
+ internalType: "bool",
637
+ },
638
+ ],
639
+ stateMutability: "view",
640
+ },
641
+ {
642
+ type: "function",
643
+ name: "liquidatePosition",
644
+ inputs: [
645
+ {
646
+ name: "account",
647
+ type: "tuple",
648
+ internalType: "struct Account.AccountId",
649
+ components: [
650
+ {
651
+ name: "owner",
652
+ type: "address",
653
+ internalType: "address",
654
+ },
655
+ {
656
+ name: "id",
657
+ type: "uint96",
658
+ internalType: "uint96",
659
+ },
660
+ {
661
+ name: "isolatedMarginToken",
662
+ type: "address",
663
+ internalType: "address",
664
+ },
665
+ ],
666
+ },
667
+ {
668
+ name: "poolId",
669
+ type: "bytes32",
670
+ internalType: "bytes32",
671
+ },
672
+ {
673
+ name: "tickLower",
674
+ type: "int24",
675
+ internalType: "int24",
676
+ },
677
+ {
678
+ name: "tickUpper",
679
+ type: "int24",
680
+ internalType: "int24",
681
+ },
682
+ {
683
+ name: "collateralAssetToTake",
684
+ type: "address",
685
+ internalType: "address",
686
+ },
687
+ {
688
+ name: "debtToCover",
689
+ type: "uint256",
690
+ internalType: "uint256",
691
+ },
692
+ ],
693
+ outputs: [
694
+ {
695
+ name: "collateralSeized",
696
+ type: "uint256",
697
+ internalType: "uint256",
698
+ },
699
+ {
700
+ name: "effectiveDebtCovered",
701
+ type: "uint256",
702
+ internalType: "uint256",
703
+ },
704
+ {
705
+ name: "fixedCovered",
706
+ type: "uint256",
707
+ internalType: "uint256",
708
+ },
709
+ ],
710
+ stateMutability: "nonpayable",
711
+ },
712
+ {
713
+ type: "function",
714
+ name: "oracleHub",
715
+ inputs: [],
716
+ outputs: [
717
+ {
718
+ name: "",
719
+ type: "address",
720
+ internalType: "contract IOracleHub",
721
+ },
722
+ ],
723
+ stateMutability: "view",
724
+ },
725
+ {
726
+ type: "function",
727
+ name: "previewPositionBalances",
728
+ inputs: [
729
+ {
730
+ name: "account",
731
+ type: "tuple",
732
+ internalType: "struct Account.AccountId",
733
+ components: [
734
+ {
735
+ name: "owner",
736
+ type: "address",
737
+ internalType: "address",
738
+ },
739
+ {
740
+ name: "id",
741
+ type: "uint96",
742
+ internalType: "uint96",
743
+ },
744
+ {
745
+ name: "isolatedMarginToken",
746
+ type: "address",
747
+ internalType: "address",
748
+ },
749
+ ],
750
+ },
751
+ {
752
+ name: "poolId",
753
+ type: "bytes32",
754
+ internalType: "bytes32",
755
+ },
756
+ {
757
+ name: "tickLower",
758
+ type: "int24",
759
+ internalType: "int24",
760
+ },
761
+ {
762
+ name: "tickUpper",
763
+ type: "int24",
764
+ internalType: "int24",
765
+ },
766
+ ],
767
+ outputs: [
768
+ {
769
+ name: "fixedTokenBalance",
770
+ type: "int256",
771
+ internalType: "int256",
772
+ },
773
+ {
774
+ name: "variableTokenBalance",
775
+ type: "int256",
776
+ internalType: "int256",
777
+ },
778
+ ],
779
+ stateMutability: "view",
780
+ },
781
+ {
782
+ type: "function",
783
+ name: "setAccountOperator",
784
+ inputs: [
785
+ {
786
+ name: "owner",
787
+ type: "address",
788
+ internalType: "address",
789
+ },
790
+ {
791
+ name: "operator",
792
+ type: "address",
793
+ internalType: "address",
794
+ },
795
+ {
796
+ name: "approved",
797
+ type: "bool",
798
+ internalType: "bool",
799
+ },
800
+ ],
801
+ outputs: [],
802
+ stateMutability: "nonpayable",
803
+ },
804
+ {
805
+ type: "function",
806
+ name: "setAprOracle",
807
+ inputs: [
808
+ {
809
+ name: "__aprOracle",
810
+ type: "address",
811
+ internalType: "contract IAprOracle",
812
+ },
813
+ ],
814
+ outputs: [],
815
+ stateMutability: "nonpayable",
816
+ },
817
+ {
818
+ type: "function",
819
+ name: "setDustThreshold",
820
+ inputs: [
821
+ {
822
+ name: "_dustThresholdWad",
823
+ type: "uint256",
824
+ internalType: "uint256",
825
+ },
826
+ ],
827
+ outputs: [],
828
+ stateMutability: "nonpayable",
829
+ },
830
+ {
831
+ type: "function",
832
+ name: "setESM",
833
+ inputs: [
834
+ {
835
+ name: "_esm",
836
+ type: "address",
837
+ internalType: "address",
838
+ },
839
+ ],
840
+ outputs: [],
841
+ stateMutability: "nonpayable",
842
+ },
843
+ {
844
+ type: "function",
845
+ name: "setMarginAssetConfig",
846
+ inputs: [
847
+ {
848
+ name: "token",
849
+ type: "address",
850
+ internalType: "address",
851
+ },
852
+ {
853
+ name: "ltvWad",
854
+ type: "uint256",
855
+ internalType: "uint256",
856
+ },
857
+ {
858
+ name: "liquidationThresholdWad",
859
+ type: "uint256",
860
+ internalType: "uint256",
861
+ },
862
+ {
863
+ name: "autoExchangeBonusWad",
864
+ type: "uint256",
865
+ internalType: "uint256",
866
+ },
867
+ ],
868
+ outputs: [],
869
+ stateMutability: "nonpayable",
870
+ },
871
+ {
872
+ type: "function",
873
+ name: "setOracleHub",
874
+ inputs: [
875
+ {
876
+ name: "__oracleHub",
877
+ type: "address",
878
+ internalType: "contract IOracleHub",
879
+ },
880
+ ],
881
+ outputs: [],
882
+ stateMutability: "nonpayable",
883
+ },
884
+ {
885
+ type: "function",
886
+ name: "setVAMMManager",
887
+ inputs: [
888
+ {
889
+ name: "_vammManager",
890
+ type: "address",
891
+ internalType: "contract IVAMMManager",
892
+ },
893
+ ],
894
+ outputs: [],
895
+ stateMutability: "nonpayable",
896
+ },
897
+ {
898
+ type: "function",
899
+ name: "settlePosition",
900
+ inputs: [
901
+ {
902
+ name: "account",
903
+ type: "tuple",
904
+ internalType: "struct Account.AccountId",
905
+ components: [
906
+ {
907
+ name: "owner",
908
+ type: "address",
909
+ internalType: "address",
910
+ },
911
+ {
912
+ name: "id",
913
+ type: "uint96",
914
+ internalType: "uint96",
915
+ },
916
+ {
917
+ name: "isolatedMarginToken",
918
+ type: "address",
919
+ internalType: "address",
920
+ },
921
+ ],
922
+ },
923
+ {
924
+ name: "poolKey",
925
+ type: "tuple",
926
+ internalType: "struct PoolKey.Key",
927
+ components: [
928
+ {
929
+ name: "underlyingAsset",
930
+ type: "address",
931
+ internalType: "address",
932
+ },
933
+ {
934
+ name: "compoundToken",
935
+ type: "address",
936
+ internalType: "address",
937
+ },
938
+ {
939
+ name: "termStartTimestampWad",
940
+ type: "uint256",
941
+ internalType: "uint256",
942
+ },
943
+ {
944
+ name: "termEndTimestampWad",
945
+ type: "uint256",
946
+ internalType: "uint256",
947
+ },
948
+ {
949
+ name: "feeWad",
950
+ type: "uint256",
951
+ internalType: "uint256",
952
+ },
953
+ {
954
+ name: "tickSpacing",
955
+ type: "int24",
956
+ internalType: "int24",
957
+ },
958
+ ],
959
+ },
960
+ {
961
+ name: "settlerAssetOrder",
962
+ type: "address[]",
963
+ internalType: "address[]",
964
+ },
965
+ ],
966
+ outputs: [],
967
+ stateMutability: "nonpayable",
968
+ },
969
+ {
970
+ type: "function",
971
+ name: "updateAccountMargin",
972
+ inputs: [
973
+ {
974
+ name: "account",
975
+ type: "tuple",
976
+ internalType: "struct Account.AccountId",
977
+ components: [
978
+ {
979
+ name: "owner",
980
+ type: "address",
981
+ internalType: "address",
982
+ },
983
+ {
984
+ name: "id",
985
+ type: "uint96",
986
+ internalType: "uint96",
987
+ },
988
+ {
989
+ name: "isolatedMarginToken",
990
+ type: "address",
991
+ internalType: "address",
992
+ },
993
+ ],
994
+ },
995
+ {
996
+ name: "token",
997
+ type: "address",
998
+ internalType: "address",
999
+ },
1000
+ {
1001
+ name: "marginDelta",
1002
+ type: "int256",
1003
+ internalType: "int256",
1004
+ },
1005
+ ],
1006
+ outputs: [],
1007
+ stateMutability: "nonpayable",
1008
+ },
1009
+ {
1010
+ type: "function",
1011
+ name: "updatePositionPostVAMMAction",
1012
+ inputs: [
1013
+ {
1014
+ name: "params",
1015
+ type: "tuple",
1016
+ internalType: "struct ICollateralEngine.UpdatePositionParams",
1017
+ components: [
1018
+ {
1019
+ name: "poolKey",
1020
+ type: "tuple",
1021
+ internalType: "struct PoolKey.Key",
1022
+ components: [
1023
+ {
1024
+ name: "underlyingAsset",
1025
+ type: "address",
1026
+ internalType: "address",
1027
+ },
1028
+ {
1029
+ name: "compoundToken",
1030
+ type: "address",
1031
+ internalType: "address",
1032
+ },
1033
+ {
1034
+ name: "termStartTimestampWad",
1035
+ type: "uint256",
1036
+ internalType: "uint256",
1037
+ },
1038
+ {
1039
+ name: "termEndTimestampWad",
1040
+ type: "uint256",
1041
+ internalType: "uint256",
1042
+ },
1043
+ {
1044
+ name: "feeWad",
1045
+ type: "uint256",
1046
+ internalType: "uint256",
1047
+ },
1048
+ {
1049
+ name: "tickSpacing",
1050
+ type: "int24",
1051
+ internalType: "int24",
1052
+ },
1053
+ ],
1054
+ },
1055
+ {
1056
+ name: "account",
1057
+ type: "tuple",
1058
+ internalType: "struct Account.AccountId",
1059
+ components: [
1060
+ {
1061
+ name: "owner",
1062
+ type: "address",
1063
+ internalType: "address",
1064
+ },
1065
+ {
1066
+ name: "id",
1067
+ type: "uint96",
1068
+ internalType: "uint96",
1069
+ },
1070
+ {
1071
+ name: "isolatedMarginToken",
1072
+ type: "address",
1073
+ internalType: "address",
1074
+ },
1075
+ ],
1076
+ },
1077
+ {
1078
+ name: "tickLower",
1079
+ type: "int24",
1080
+ internalType: "int24",
1081
+ },
1082
+ {
1083
+ name: "tickUpper",
1084
+ type: "int24",
1085
+ internalType: "int24",
1086
+ },
1087
+ {
1088
+ name: "liquidityDelta",
1089
+ type: "int128",
1090
+ internalType: "int128",
1091
+ },
1092
+ {
1093
+ name: "fixedTokenDelta",
1094
+ type: "int256",
1095
+ internalType: "int256",
1096
+ },
1097
+ {
1098
+ name: "variableTokenDelta",
1099
+ type: "int256",
1100
+ internalType: "int256",
1101
+ },
1102
+ {
1103
+ name: "fixedTokenGrowthInsideX128",
1104
+ type: "int256",
1105
+ internalType: "int256",
1106
+ },
1107
+ {
1108
+ name: "variableTokenGrowthInsideX128",
1109
+ type: "int256",
1110
+ internalType: "int256",
1111
+ },
1112
+ ],
1113
+ },
1114
+ {
1115
+ name: "isLiquidation",
1116
+ type: "bool",
1117
+ internalType: "bool",
1118
+ },
1119
+ ],
1120
+ outputs: [
1121
+ {
1122
+ name: "feeIncurred",
1123
+ type: "int256",
1124
+ internalType: "int256",
1125
+ },
1126
+ ],
1127
+ stateMutability: "nonpayable",
1128
+ },
1129
+ {
1130
+ type: "function",
1131
+ name: "vammManager",
1132
+ inputs: [],
1133
+ outputs: [
1134
+ {
1135
+ name: "",
1136
+ type: "address",
1137
+ internalType: "contract IVAMMManager",
1138
+ },
1139
+ ],
1140
+ stateMutability: "view",
1141
+ },
1142
+ {
1143
+ type: "event",
1144
+ name: "AccountOperatorUpdate",
1145
+ inputs: [
1146
+ {
1147
+ name: "owner",
1148
+ type: "address",
1149
+ indexed: true,
1150
+ internalType: "address",
1151
+ },
1152
+ {
1153
+ name: "operator",
1154
+ type: "address",
1155
+ indexed: true,
1156
+ internalType: "address",
1157
+ },
1158
+ {
1159
+ name: "approved",
1160
+ type: "bool",
1161
+ indexed: false,
1162
+ internalType: "bool",
1163
+ },
1164
+ ],
1165
+ anonymous: false,
1166
+ },
1167
+ {
1168
+ type: "event",
1169
+ name: "AprOracleSetting",
1170
+ inputs: [
1171
+ {
1172
+ name: "aprOracle",
1173
+ type: "address",
1174
+ indexed: true,
1175
+ internalType: "contract IAprOracle",
1176
+ },
1177
+ ],
1178
+ anonymous: false,
1179
+ },
1180
+ {
1181
+ type: "event",
1182
+ name: "AutoExchange",
1183
+ inputs: [
1184
+ {
1185
+ name: "owner",
1186
+ type: "address",
1187
+ indexed: true,
1188
+ internalType: "address",
1189
+ },
1190
+ {
1191
+ name: "accountId",
1192
+ type: "uint96",
1193
+ indexed: true,
1194
+ internalType: "uint96",
1195
+ },
1196
+ {
1197
+ name: "isolatedMarginToken",
1198
+ type: "address",
1199
+ indexed: false,
1200
+ internalType: "address",
1201
+ },
1202
+ {
1203
+ name: "poolId",
1204
+ type: "bytes32",
1205
+ indexed: true,
1206
+ internalType: "bytes32",
1207
+ },
1208
+ {
1209
+ name: "underlyingAsset",
1210
+ type: "address",
1211
+ indexed: false,
1212
+ internalType: "address",
1213
+ },
1214
+ {
1215
+ name: "underlyingAmount",
1216
+ type: "uint256",
1217
+ indexed: false,
1218
+ internalType: "uint256",
1219
+ },
1220
+ ],
1221
+ anonymous: false,
1222
+ },
1223
+ {
1224
+ type: "event",
1225
+ name: "DustThresholdUpdate",
1226
+ inputs: [
1227
+ {
1228
+ name: "dustThresholdWad",
1229
+ type: "uint256",
1230
+ indexed: false,
1231
+ internalType: "uint256",
1232
+ },
1233
+ ],
1234
+ anonymous: false,
1235
+ },
1236
+ {
1237
+ type: "event",
1238
+ name: "MarginAssetConfigUpdate",
1239
+ inputs: [
1240
+ {
1241
+ name: "token",
1242
+ type: "address",
1243
+ indexed: true,
1244
+ internalType: "address",
1245
+ },
1246
+ {
1247
+ name: "ltvWad",
1248
+ type: "uint256",
1249
+ indexed: false,
1250
+ internalType: "uint256",
1251
+ },
1252
+ {
1253
+ name: "liquidationThresholdWad",
1254
+ type: "uint256",
1255
+ indexed: false,
1256
+ internalType: "uint256",
1257
+ },
1258
+ {
1259
+ name: "autoExchangeBonusWad",
1260
+ type: "uint256",
1261
+ indexed: false,
1262
+ internalType: "uint256",
1263
+ },
1264
+ ],
1265
+ anonymous: false,
1266
+ },
1267
+ {
1268
+ type: "event",
1269
+ name: "MarginUpdate",
1270
+ inputs: [
1271
+ {
1272
+ name: "owner",
1273
+ type: "address",
1274
+ indexed: true,
1275
+ internalType: "address",
1276
+ },
1277
+ {
1278
+ name: "accountId",
1279
+ type: "uint96",
1280
+ indexed: true,
1281
+ internalType: "uint96",
1282
+ },
1283
+ {
1284
+ name: "isolatedMarginToken",
1285
+ type: "address",
1286
+ indexed: false,
1287
+ internalType: "address",
1288
+ },
1289
+ {
1290
+ name: "token",
1291
+ type: "address",
1292
+ indexed: true,
1293
+ internalType: "address",
1294
+ },
1295
+ {
1296
+ name: "marginDelta",
1297
+ type: "int256",
1298
+ indexed: false,
1299
+ internalType: "int256",
1300
+ },
1301
+ ],
1302
+ anonymous: false,
1303
+ },
1304
+ {
1305
+ type: "event",
1306
+ name: "OracleHubSetting",
1307
+ inputs: [
1308
+ {
1309
+ name: "oracleHub",
1310
+ type: "address",
1311
+ indexed: true,
1312
+ internalType: "contract IOracleHub",
1313
+ },
1314
+ ],
1315
+ anonymous: false,
1316
+ },
1317
+ {
1318
+ type: "event",
1319
+ name: "PositionLiquidated",
1320
+ inputs: [
1321
+ {
1322
+ name: "accountOwner",
1323
+ type: "address",
1324
+ indexed: true,
1325
+ internalType: "address",
1326
+ },
1327
+ {
1328
+ name: "accountId",
1329
+ type: "uint96",
1330
+ indexed: true,
1331
+ internalType: "uint96",
1332
+ },
1333
+ {
1334
+ name: "accountIsolatedMarginToken",
1335
+ type: "address",
1336
+ indexed: false,
1337
+ internalType: "address",
1338
+ },
1339
+ {
1340
+ name: "poolId",
1341
+ type: "bytes32",
1342
+ indexed: true,
1343
+ internalType: "bytes32",
1344
+ },
1345
+ {
1346
+ name: "tickLower",
1347
+ type: "int24",
1348
+ indexed: false,
1349
+ internalType: "int24",
1350
+ },
1351
+ {
1352
+ name: "tickUpper",
1353
+ type: "int24",
1354
+ indexed: false,
1355
+ internalType: "int24",
1356
+ },
1357
+ {
1358
+ name: "collateralAssetTaken",
1359
+ type: "address",
1360
+ indexed: false,
1361
+ internalType: "address",
1362
+ },
1363
+ {
1364
+ name: "liquidator",
1365
+ type: "address",
1366
+ indexed: false,
1367
+ internalType: "address",
1368
+ },
1369
+ {
1370
+ name: "collateralSeized",
1371
+ type: "uint256",
1372
+ indexed: false,
1373
+ internalType: "uint256",
1374
+ },
1375
+ {
1376
+ name: "effectiveDebtCovered",
1377
+ type: "uint256",
1378
+ indexed: false,
1379
+ internalType: "uint256",
1380
+ },
1381
+ {
1382
+ name: "fixedCovered",
1383
+ type: "uint256",
1384
+ indexed: false,
1385
+ internalType: "uint256",
1386
+ },
1387
+ ],
1388
+ anonymous: false,
1389
+ },
1390
+ {
1391
+ type: "event",
1392
+ name: "PositionSettlement",
1393
+ inputs: [
1394
+ {
1395
+ name: "owner",
1396
+ type: "address",
1397
+ indexed: true,
1398
+ internalType: "address",
1399
+ },
1400
+ {
1401
+ name: "accountId",
1402
+ type: "uint96",
1403
+ indexed: true,
1404
+ internalType: "uint96",
1405
+ },
1406
+ {
1407
+ name: "isolatedMarginToken",
1408
+ type: "address",
1409
+ indexed: false,
1410
+ internalType: "address",
1411
+ },
1412
+ {
1413
+ name: "poolId",
1414
+ type: "bytes32",
1415
+ indexed: true,
1416
+ internalType: "bytes32",
1417
+ },
1418
+ {
1419
+ name: "settlementCashflow",
1420
+ type: "int256",
1421
+ indexed: false,
1422
+ internalType: "int256",
1423
+ },
1424
+ ],
1425
+ anonymous: false,
1426
+ },
1427
+ {
1428
+ type: "event",
1429
+ name: "PositionUpdate",
1430
+ inputs: [
1431
+ {
1432
+ name: "owner",
1433
+ type: "address",
1434
+ indexed: true,
1435
+ internalType: "address",
1436
+ },
1437
+ {
1438
+ name: "accountId",
1439
+ type: "uint96",
1440
+ indexed: true,
1441
+ internalType: "uint96",
1442
+ },
1443
+ {
1444
+ name: "isolatedMarginToken",
1445
+ type: "address",
1446
+ indexed: false,
1447
+ internalType: "address",
1448
+ },
1449
+ {
1450
+ name: "poolId",
1451
+ type: "bytes32",
1452
+ indexed: true,
1453
+ internalType: "bytes32",
1454
+ },
1455
+ {
1456
+ name: "tickLower",
1457
+ type: "int24",
1458
+ indexed: false,
1459
+ internalType: "int24",
1460
+ },
1461
+ {
1462
+ name: "tickUpper",
1463
+ type: "int24",
1464
+ indexed: false,
1465
+ internalType: "int24",
1466
+ },
1467
+ {
1468
+ name: "_liquidity",
1469
+ type: "uint128",
1470
+ indexed: false,
1471
+ internalType: "uint128",
1472
+ },
1473
+ {
1474
+ name: "fixedTokenBalance",
1475
+ type: "int256",
1476
+ indexed: false,
1477
+ internalType: "int256",
1478
+ },
1479
+ {
1480
+ name: "variableTokenBalance",
1481
+ type: "int256",
1482
+ indexed: false,
1483
+ internalType: "int256",
1484
+ },
1485
+ {
1486
+ name: "accumulatedFees",
1487
+ type: "uint256",
1488
+ indexed: false,
1489
+ internalType: "uint256",
1490
+ },
1491
+ ],
1492
+ anonymous: false,
1493
+ },
1494
+ {
1495
+ type: "event",
1496
+ name: "ProtocolDeficitEliminated",
1497
+ inputs: [
1498
+ {
1499
+ name: "token",
1500
+ type: "address",
1501
+ indexed: true,
1502
+ internalType: "address",
1503
+ },
1504
+ {
1505
+ name: "amount",
1506
+ type: "uint256",
1507
+ indexed: false,
1508
+ internalType: "uint256",
1509
+ },
1510
+ {
1511
+ name: "remainingDeficit",
1512
+ type: "uint256",
1513
+ indexed: false,
1514
+ internalType: "uint256",
1515
+ },
1516
+ ],
1517
+ anonymous: false,
1518
+ },
1519
+ {
1520
+ type: "event",
1521
+ name: "ProtocolDeficitIncreased",
1522
+ inputs: [
1523
+ {
1524
+ name: "token",
1525
+ type: "address",
1526
+ indexed: true,
1527
+ internalType: "address",
1528
+ },
1529
+ {
1530
+ name: "amount",
1531
+ type: "uint256",
1532
+ indexed: false,
1533
+ internalType: "uint256",
1534
+ },
1535
+ {
1536
+ name: "totalDeficit",
1537
+ type: "uint256",
1538
+ indexed: false,
1539
+ internalType: "uint256",
1540
+ },
1541
+ ],
1542
+ anonymous: false,
1543
+ },
1544
+ {
1545
+ type: "event",
1546
+ name: "VAMMSetting",
1547
+ inputs: [
1548
+ {
1549
+ name: "vamm",
1550
+ type: "address",
1551
+ indexed: true,
1552
+ internalType: "contract IVAMM",
1553
+ },
1554
+ ],
1555
+ anonymous: false,
1556
+ },
1557
+ {
1558
+ type: "event",
1559
+ name: "WorstCaseVariableFactorConfigSet",
1560
+ inputs: [
1561
+ {
1562
+ name: "poolId",
1563
+ type: "bytes32",
1564
+ indexed: true,
1565
+ internalType: "bytes32",
1566
+ },
1567
+ {
1568
+ name: "worstCaseVariableFactorPositiveWad",
1569
+ type: "uint256",
1570
+ indexed: false,
1571
+ internalType: "uint256",
1572
+ },
1573
+ {
1574
+ name: "worstCaseVariableFactorNegativeWad",
1575
+ type: "uint256",
1576
+ indexed: false,
1577
+ internalType: "uint256",
1578
+ },
1579
+ {
1580
+ name: "worstCaseVariableFactorPositiveTick",
1581
+ type: "int24",
1582
+ indexed: false,
1583
+ internalType: "int24",
1584
+ },
1585
+ {
1586
+ name: "worstCaseVariableFactorNegativeTick",
1587
+ type: "int24",
1588
+ indexed: false,
1589
+ internalType: "int24",
1590
+ },
1591
+ ],
1592
+ anonymous: false,
1593
+ },
1594
+ {
1595
+ type: "error",
1596
+ name: "AavePoolGetReserveNormalizedIncomeReturnedZero",
1597
+ inputs: [],
1598
+ },
1599
+ {
1600
+ type: "error",
1601
+ name: "AavePoolGetReserveNormalizedVariableDebtReturnedZero",
1602
+ inputs: [],
1603
+ },
1604
+ {
1605
+ type: "error",
1606
+ name: "AaveV3PoolGetReserveNormalizedIncomeReturnedZero",
1607
+ inputs: [],
1608
+ },
1609
+ {
1610
+ type: "error",
1611
+ name: "AaveV3PoolGetReserveNormalizedVariableDebtReturnedZero",
1612
+ inputs: [],
1613
+ },
1614
+ {
1615
+ type: "error",
1616
+ name: "AprOracleZero",
1617
+ inputs: [],
1618
+ },
1619
+ {
1620
+ type: "error",
1621
+ name: "ArrayLengthMismatch",
1622
+ inputs: [],
1623
+ },
1624
+ {
1625
+ type: "error",
1626
+ name: "AssetNotConfigured",
1627
+ inputs: [
1628
+ {
1629
+ name: "asset",
1630
+ type: "address",
1631
+ internalType: "address",
1632
+ },
1633
+ ],
1634
+ },
1635
+ {
1636
+ type: "error",
1637
+ name: "CTokenExchangeRateReturnedZero",
1638
+ inputs: [],
1639
+ },
1640
+ {
1641
+ type: "error",
1642
+ name: "CanOnlyTradeIfUnlocked",
1643
+ inputs: [
1644
+ {
1645
+ name: "unlocked",
1646
+ type: "bool",
1647
+ internalType: "bool",
1648
+ },
1649
+ ],
1650
+ },
1651
+ {
1652
+ type: "error",
1653
+ name: "CannotLiquidate",
1654
+ inputs: [],
1655
+ },
1656
+ {
1657
+ type: "error",
1658
+ name: "CannotSettleBeforeMaturity",
1659
+ inputs: [],
1660
+ },
1661
+ {
1662
+ type: "error",
1663
+ name: "CollateralEngineZero",
1664
+ inputs: [],
1665
+ },
1666
+ {
1667
+ type: "error",
1668
+ name: "CompoundTokenZero",
1669
+ inputs: [],
1670
+ },
1671
+ {
1672
+ type: "error",
1673
+ name: "DebugError",
1674
+ inputs: [
1675
+ {
1676
+ name: "x",
1677
+ type: "uint256",
1678
+ internalType: "uint256",
1679
+ },
1680
+ {
1681
+ name: "y",
1682
+ type: "uint256",
1683
+ internalType: "uint256",
1684
+ },
1685
+ ],
1686
+ },
1687
+ {
1688
+ type: "error",
1689
+ name: "DustResidue",
1690
+ inputs: [],
1691
+ },
1692
+ {
1693
+ type: "error",
1694
+ name: "ESMZero",
1695
+ inputs: [],
1696
+ },
1697
+ {
1698
+ type: "error",
1699
+ name: "ExpectedOppositeSigns",
1700
+ inputs: [
1701
+ {
1702
+ name: "amount0",
1703
+ type: "int256",
1704
+ internalType: "int256",
1705
+ },
1706
+ {
1707
+ name: "amount1",
1708
+ type: "int256",
1709
+ internalType: "int256",
1710
+ },
1711
+ ],
1712
+ },
1713
+ {
1714
+ type: "error",
1715
+ name: "ExpectedSqrtPriceZeroBeforeInit",
1716
+ inputs: [
1717
+ {
1718
+ name: "sqrtPriceX96",
1719
+ type: "uint160",
1720
+ internalType: "uint160",
1721
+ },
1722
+ ],
1723
+ },
1724
+ {
1725
+ type: "error",
1726
+ name: "FeeRangeInvalid",
1727
+ inputs: [
1728
+ {
1729
+ name: "feeWad",
1730
+ type: "uint256",
1731
+ internalType: "uint256",
1732
+ },
1733
+ ],
1734
+ },
1735
+ {
1736
+ type: "error",
1737
+ name: "GlpRewardTrackerUnorderedRate",
1738
+ inputs: [],
1739
+ },
1740
+ {
1741
+ type: "error",
1742
+ name: "IRSNotionalAmountSpecifiedMustBeNonZero",
1743
+ inputs: [],
1744
+ },
1745
+ {
1746
+ type: "error",
1747
+ name: "InsufficientESMBalance",
1748
+ inputs: [
1749
+ {
1750
+ name: "poolId",
1751
+ type: "bytes32",
1752
+ internalType: "bytes32",
1753
+ },
1754
+ {
1755
+ name: "requested",
1756
+ type: "int256",
1757
+ internalType: "int256",
1758
+ },
1759
+ {
1760
+ name: "available",
1761
+ type: "int256",
1762
+ internalType: "int256",
1763
+ },
1764
+ ],
1765
+ },
1766
+ {
1767
+ type: "error",
1768
+ name: "InvalidAprRate",
1769
+ inputs: [
1770
+ {
1771
+ name: "compoundToken",
1772
+ type: "address",
1773
+ internalType: "address",
1774
+ },
1775
+ {
1776
+ name: "fromTimestamp",
1777
+ type: "uint48",
1778
+ internalType: "uint48",
1779
+ },
1780
+ {
1781
+ name: "toTimestamp",
1782
+ type: "uint48",
1783
+ internalType: "uint48",
1784
+ },
1785
+ ],
1786
+ },
1787
+ {
1788
+ type: "error",
1789
+ name: "InvalidDiscountRate",
1790
+ inputs: [
1791
+ {
1792
+ name: "rate",
1793
+ type: "uint256",
1794
+ internalType: "uint256",
1795
+ },
1796
+ ],
1797
+ },
1798
+ {
1799
+ type: "error",
1800
+ name: "InvalidMarginDelta",
1801
+ inputs: [],
1802
+ },
1803
+ {
1804
+ type: "error",
1805
+ name: "InvalidPrice",
1806
+ inputs: [
1807
+ {
1808
+ name: "asset",
1809
+ type: "address",
1810
+ internalType: "address",
1811
+ },
1812
+ ],
1813
+ },
1814
+ {
1815
+ type: "error",
1816
+ name: "InvalidTermTimestamps",
1817
+ inputs: [
1818
+ {
1819
+ name: "termStart",
1820
+ type: "uint256",
1821
+ internalType: "uint256",
1822
+ },
1823
+ {
1824
+ name: "termEnd",
1825
+ type: "uint256",
1826
+ internalType: "uint256",
1827
+ },
1828
+ ],
1829
+ },
1830
+ {
1831
+ type: "error",
1832
+ name: "IsolatedMarginModeViolation",
1833
+ inputs: [
1834
+ {
1835
+ name: "accountIsolatedToken",
1836
+ type: "address",
1837
+ internalType: "address",
1838
+ },
1839
+ {
1840
+ name: "poolUnderlyingAsset",
1841
+ type: "address",
1842
+ internalType: "address",
1843
+ },
1844
+ ],
1845
+ },
1846
+ {
1847
+ type: "error",
1848
+ name: "LidoGetPooledEthBySharesReturnedZero",
1849
+ inputs: [],
1850
+ },
1851
+ {
1852
+ type: "error",
1853
+ name: "LiquidityDeltaMustBePositiveInBurn",
1854
+ inputs: [
1855
+ {
1856
+ name: "amount",
1857
+ type: "uint128",
1858
+ internalType: "uint128",
1859
+ },
1860
+ ],
1861
+ },
1862
+ {
1863
+ type: "error",
1864
+ name: "LiquidityDeltaMustBePositiveInMint",
1865
+ inputs: [
1866
+ {
1867
+ name: "amount",
1868
+ type: "uint128",
1869
+ internalType: "uint128",
1870
+ },
1871
+ ],
1872
+ },
1873
+ {
1874
+ type: "error",
1875
+ name: "MarginLessThanMinimum",
1876
+ inputs: [
1877
+ {
1878
+ name: "marginRequirement",
1879
+ type: "int256",
1880
+ internalType: "int256",
1881
+ },
1882
+ ],
1883
+ },
1884
+ {
1885
+ type: "error",
1886
+ name: "MarginRequirementNotMet",
1887
+ inputs: [
1888
+ {
1889
+ name: "marginRequirement",
1890
+ type: "uint256",
1891
+ internalType: "uint256",
1892
+ },
1893
+ {
1894
+ name: "totalMarginValue",
1895
+ type: "uint256",
1896
+ internalType: "uint256",
1897
+ },
1898
+ ],
1899
+ },
1900
+ {
1901
+ type: "error",
1902
+ name: "MarginRequirementNotMetFCM",
1903
+ inputs: [
1904
+ {
1905
+ name: "marginRequirement",
1906
+ type: "int256",
1907
+ internalType: "int256",
1908
+ },
1909
+ ],
1910
+ },
1911
+ {
1912
+ type: "error",
1913
+ name: "MessageSenderNotAuthorized",
1914
+ inputs: [
1915
+ {
1916
+ name: "sender",
1917
+ type: "address",
1918
+ internalType: "address",
1919
+ },
1920
+ {
1921
+ name: "recipient",
1922
+ type: "address",
1923
+ internalType: "address",
1924
+ },
1925
+ ],
1926
+ },
1927
+ {
1928
+ type: "error",
1929
+ name: "NoPositionsInPool",
1930
+ inputs: [
1931
+ {
1932
+ name: "poolId",
1933
+ type: "bytes32",
1934
+ internalType: "bytes32",
1935
+ },
1936
+ ],
1937
+ },
1938
+ {
1939
+ type: "error",
1940
+ name: "NotEnoughFunds",
1941
+ inputs: [
1942
+ {
1943
+ name: "requested",
1944
+ type: "uint256",
1945
+ internalType: "uint256",
1946
+ },
1947
+ {
1948
+ name: "available",
1949
+ type: "uint256",
1950
+ internalType: "uint256",
1951
+ },
1952
+ ],
1953
+ },
1954
+ {
1955
+ type: "error",
1956
+ name: "NotEnoughFundsForFee",
1957
+ inputs: [
1958
+ {
1959
+ name: "balance",
1960
+ type: "uint256",
1961
+ internalType: "uint256",
1962
+ },
1963
+ {
1964
+ name: "fee",
1965
+ type: "int256",
1966
+ internalType: "int256",
1967
+ },
1968
+ ],
1969
+ },
1970
+ {
1971
+ type: "error",
1972
+ name: "OOO",
1973
+ inputs: [],
1974
+ },
1975
+ {
1976
+ type: "error",
1977
+ name: "OnlyCollateralEngine",
1978
+ inputs: [],
1979
+ },
1980
+ {
1981
+ type: "error",
1982
+ name: "OnlyFCM",
1983
+ inputs: [],
1984
+ },
1985
+ {
1986
+ type: "error",
1987
+ name: "OnlyOwnerCanUpdatePosition",
1988
+ inputs: [],
1989
+ },
1990
+ {
1991
+ type: "error",
1992
+ name: "OnlyVAMM",
1993
+ inputs: [],
1994
+ },
1995
+ {
1996
+ type: "error",
1997
+ name: "OnlyVAMMCaller",
1998
+ inputs: [
1999
+ {
2000
+ name: "sender",
2001
+ type: "address",
2002
+ internalType: "address",
2003
+ },
2004
+ {
2005
+ name: "vamm",
2006
+ type: "address",
2007
+ internalType: "address",
2008
+ },
2009
+ ],
2010
+ },
2011
+ {
2012
+ type: "error",
2013
+ name: "OracleHubZero",
2014
+ inputs: [],
2015
+ },
2016
+ {
2017
+ type: "error",
2018
+ name: "PoolExpired",
2019
+ inputs: [],
2020
+ },
2021
+ {
2022
+ type: "error",
2023
+ name: "PoolNotInitialized",
2024
+ inputs: [],
2025
+ },
2026
+ {
2027
+ type: "error",
2028
+ name: "PoolNotMatured",
2029
+ inputs: [
2030
+ {
2031
+ name: "currentTimestamp",
2032
+ type: "uint256",
2033
+ internalType: "uint256",
2034
+ },
2035
+ {
2036
+ name: "termEndTimestamp",
2037
+ type: "uint256",
2038
+ internalType: "uint256",
2039
+ },
2040
+ ],
2041
+ },
2042
+ {
2043
+ type: "error",
2044
+ name: "PositionNetZero",
2045
+ inputs: [],
2046
+ },
2047
+ {
2048
+ type: "error",
2049
+ name: "PositionNotInDebt",
2050
+ inputs: [],
2051
+ },
2052
+ {
2053
+ type: "error",
2054
+ name: "PositionNotSettled",
2055
+ inputs: [],
2056
+ },
2057
+ {
2058
+ type: "error",
2059
+ name: "ProtocolFeeRangeInvalid",
2060
+ inputs: [
2061
+ {
2062
+ name: "feeProtocol",
2063
+ type: "uint8",
2064
+ internalType: "uint8",
2065
+ },
2066
+ ],
2067
+ },
2068
+ {
2069
+ type: "error",
2070
+ name: "RateOracleZero",
2071
+ inputs: [],
2072
+ },
2073
+ {
2074
+ type: "error",
2075
+ name: "RedstoneLatestRoundDataReturnedNegativeOrZero",
2076
+ inputs: [],
2077
+ },
2078
+ {
2079
+ type: "error",
2080
+ name: "RocketPoolGetEthValueReturnedZero",
2081
+ inputs: [],
2082
+ },
2083
+ {
2084
+ type: "error",
2085
+ name: "SqrtPriceLimitInvalid",
2086
+ inputs: [
2087
+ {
2088
+ name: "isFT",
2089
+ type: "bool",
2090
+ internalType: "bool",
2091
+ },
2092
+ {
2093
+ name: "sqrtPriceLimitX96",
2094
+ type: "uint160",
2095
+ internalType: "uint160",
2096
+ },
2097
+ {
2098
+ name: "currentSqrtPriceX96",
2099
+ type: "uint160",
2100
+ internalType: "uint160",
2101
+ },
2102
+ ],
2103
+ },
2104
+ {
2105
+ type: "error",
2106
+ name: "SqrtPriceRatioOutOfBounds",
2107
+ inputs: [
2108
+ {
2109
+ name: "sqrtPriceX96",
2110
+ type: "uint160",
2111
+ internalType: "uint160",
2112
+ },
2113
+ ],
2114
+ },
2115
+ {
2116
+ type: "error",
2117
+ name: "TickSpacingOutOfBounds",
2118
+ inputs: [
2119
+ {
2120
+ name: "tickSpacing",
2121
+ type: "int24",
2122
+ internalType: "int24",
2123
+ },
2124
+ ],
2125
+ },
2126
+ {
2127
+ type: "error",
2128
+ name: "TokenNotWhitelisted",
2129
+ inputs: [
2130
+ {
2131
+ name: "token",
2132
+ type: "address",
2133
+ internalType: "address",
2134
+ },
2135
+ ],
2136
+ },
2137
+ {
2138
+ type: "error",
2139
+ name: "Unauthorized",
2140
+ inputs: [
2141
+ {
2142
+ name: "caller",
2143
+ type: "address",
2144
+ internalType: "address",
2145
+ },
2146
+ {
2147
+ name: "expected",
2148
+ type: "address",
2149
+ internalType: "address",
2150
+ },
2151
+ ],
2152
+ },
2153
+ {
2154
+ type: "error",
2155
+ name: "UnderlyingAssetZero",
2156
+ inputs: [],
2157
+ },
2158
+ {
2159
+ type: "error",
2160
+ name: "UnderlyingTokenZero",
2161
+ inputs: [],
2162
+ },
2163
+ {
2164
+ type: "error",
2165
+ name: "VAMMLocked",
2166
+ inputs: [],
2167
+ },
2168
+ {
2169
+ type: "error",
2170
+ name: "VAMMManagerZero",
2171
+ inputs: [],
2172
+ },
2173
+ {
2174
+ type: "error",
2175
+ name: "VAMMNotInitialized",
2176
+ inputs: [],
2177
+ },
2178
+ {
2179
+ type: "error",
2180
+ name: "VariableTokensNotFullyLiquidated",
2181
+ inputs: [],
2182
+ },
2183
+ {
2184
+ type: "error",
2185
+ name: "WithdrawalExceedsCurrentMargin",
2186
+ inputs: [
2187
+ {
2188
+ name: "currentMargin",
2189
+ type: "uint256",
2190
+ internalType: "uint256",
2191
+ },
2192
+ ],
2193
+ },
2194
+ {
2195
+ type: "error",
2196
+ name: "ZeroInputPrice",
2197
+ inputs: [],
2198
+ },
2199
+ {
2200
+ type: "error",
2201
+ name: "closeToOrBeyondMaturity",
2202
+ inputs: [],
2203
+ },
2204
+ ] as const;
2205
+
2206
+ export class ICollateralEngine__factory {
2207
+ static readonly abi = _abi;
2208
+ static createInterface(): ICollateralEngineInterface {
2209
+ return new Interface(_abi) as ICollateralEngineInterface;
2210
+ }
2211
+ static connect(
2212
+ address: string,
2213
+ runner?: ContractRunner | null
2214
+ ): ICollateralEngine {
2215
+ return new Contract(address, _abi, runner) as unknown as ICollateralEngine;
2216
+ }
2217
+ }