@juicedollar/jusd 3.0.1 → 4.0.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.
Files changed (47) hide show
  1. package/contracts/Leadrate.sol +1 -1
  2. package/contracts/{MintingHubV2 → MintingHubV3}/MintingHub.sol +93 -100
  3. package/contracts/{MintingHubV2 → MintingHubV3}/Position.sol +20 -13
  4. package/contracts/{MintingHubV2 → MintingHubV3}/PositionRoller.sol +17 -37
  5. package/contracts/{MintingHubV2 → MintingHubV3}/interface/IMintingHub.sol +2 -2
  6. package/contracts/{MintingHubV2 → MintingHubV3}/interface/IPosition.sol +3 -3
  7. package/contracts/Savings.sol +36 -6
  8. package/contracts/interface/ISavingsJUSD.sol +10 -1
  9. package/contracts/test/PositionExpirationTest.sol +17 -38
  10. package/contracts/test/PositionRollingTest.sol +3 -3
  11. package/contracts/test/ReentrantAttacker.sol +1 -1
  12. package/dist/index.d.mts +5609 -3568
  13. package/dist/index.d.ts +5609 -3568
  14. package/dist/index.js +9361 -6680
  15. package/dist/index.mjs +9351 -6674
  16. package/exports/abis/shared/Equity.ts +1286 -0
  17. package/exports/abis/shared/JuiceDollar.ts +1366 -0
  18. package/exports/abis/shared/StablecoinBridge.ts +279 -0
  19. package/exports/abis/utils/StartUSD.ts +213 -213
  20. package/exports/abis/{core → v2}/FrontendGateway.ts +1 -1
  21. package/exports/abis/{core → v2}/MintingHubGateway.ts +1 -1
  22. package/exports/abis/{MintingHubV2 → v2}/PositionRoller.ts +1 -1
  23. package/exports/abis/{core → v2}/SavingsGateway.ts +1 -1
  24. package/exports/abis/{core → v2}/SavingsVaultJUSD.ts +1 -1
  25. package/exports/abis/v3/MintingHub.ts +1024 -0
  26. package/exports/abis/v3/Position.ts +1142 -0
  27. package/exports/abis/v3/PositionFactory.ts +90 -0
  28. package/exports/abis/v3/PositionRoller.ts +255 -0
  29. package/exports/abis/v3/Savings.ts +553 -0
  30. package/exports/abis/v3/SavingsVaultJUSD.ts +925 -0
  31. package/exports/address.config.ts +44 -16
  32. package/exports/index.ts +22 -14
  33. package/package.json +7 -9
  34. package/contracts/gateway/FrontendGateway.sol +0 -224
  35. package/contracts/gateway/MintingHubGateway.sol +0 -82
  36. package/contracts/gateway/SavingsGateway.sol +0 -51
  37. package/contracts/gateway/interface/IFrontendGateway.sol +0 -49
  38. package/contracts/gateway/interface/IMintingHubGateway.sol +0 -12
  39. package/exports/abis/core/Equity.ts +0 -1286
  40. package/exports/abis/core/JuiceDollar.ts +0 -1366
  41. package/exports/abis/utils/MintingHubV2.ts +0 -888
  42. package/exports/abis/utils/Savings.ts +0 -453
  43. package/exports/abis/utils/StablecoinBridge.ts +0 -279
  44. /package/contracts/{MintingHubV2 → MintingHubV3}/PositionFactory.sol +0 -0
  45. /package/contracts/{MintingHubV2 → MintingHubV3}/interface/IPositionFactory.sol +0 -0
  46. /package/exports/abis/{MintingHubV2 → v2}/PositionFactoryV2.ts +0 -0
  47. /package/exports/abis/{MintingHubV2 → v2}/PositionV2.ts +0 -0
@@ -0,0 +1,1024 @@
1
+ export const MintingHubV3ABI = [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "address",
6
+ "name": "_jusd",
7
+ "type": "address"
8
+ },
9
+ {
10
+ "internalType": "uint24",
11
+ "name": "_initialRatePPM",
12
+ "type": "uint24"
13
+ },
14
+ {
15
+ "internalType": "address payable",
16
+ "name": "_roller",
17
+ "type": "address"
18
+ },
19
+ {
20
+ "internalType": "address",
21
+ "name": "_factory",
22
+ "type": "address"
23
+ },
24
+ {
25
+ "internalType": "address",
26
+ "name": "_wcbtc",
27
+ "type": "address"
28
+ }
29
+ ],
30
+ "stateMutability": "nonpayable",
31
+ "type": "constructor"
32
+ },
33
+ {
34
+ "inputs": [],
35
+ "name": "ChallengeTimeTooShort",
36
+ "type": "error"
37
+ },
38
+ {
39
+ "inputs": [],
40
+ "name": "ChangeNotReady",
41
+ "type": "error"
42
+ },
43
+ {
44
+ "inputs": [],
45
+ "name": "IncompatibleCollateral",
46
+ "type": "error"
47
+ },
48
+ {
49
+ "inputs": [],
50
+ "name": "InitPeriodTooShort",
51
+ "type": "error"
52
+ },
53
+ {
54
+ "inputs": [],
55
+ "name": "InsufficientCollateral",
56
+ "type": "error"
57
+ },
58
+ {
59
+ "inputs": [],
60
+ "name": "InvalidCollateralDecimals",
61
+ "type": "error"
62
+ },
63
+ {
64
+ "inputs": [],
65
+ "name": "InvalidPos",
66
+ "type": "error"
67
+ },
68
+ {
69
+ "inputs": [],
70
+ "name": "InvalidReservePPM",
71
+ "type": "error"
72
+ },
73
+ {
74
+ "inputs": [],
75
+ "name": "InvalidRiskPremium",
76
+ "type": "error"
77
+ },
78
+ {
79
+ "inputs": [
80
+ {
81
+ "internalType": "uint256",
82
+ "name": "amount",
83
+ "type": "uint256"
84
+ }
85
+ ],
86
+ "name": "LeaveNoDust",
87
+ "type": "error"
88
+ },
89
+ {
90
+ "inputs": [],
91
+ "name": "NativeOnlyForWCBTC",
92
+ "type": "error"
93
+ },
94
+ {
95
+ "inputs": [],
96
+ "name": "NativeTransferFailed",
97
+ "type": "error"
98
+ },
99
+ {
100
+ "inputs": [],
101
+ "name": "NoPendingChange",
102
+ "type": "error"
103
+ },
104
+ {
105
+ "inputs": [],
106
+ "name": "UnexpectedPrice",
107
+ "type": "error"
108
+ },
109
+ {
110
+ "inputs": [],
111
+ "name": "ValueMismatch",
112
+ "type": "error"
113
+ },
114
+ {
115
+ "anonymous": false,
116
+ "inputs": [
117
+ {
118
+ "indexed": true,
119
+ "internalType": "address",
120
+ "name": "position",
121
+ "type": "address"
122
+ },
123
+ {
124
+ "indexed": false,
125
+ "internalType": "uint256",
126
+ "name": "number",
127
+ "type": "uint256"
128
+ },
129
+ {
130
+ "indexed": false,
131
+ "internalType": "uint256",
132
+ "name": "size",
133
+ "type": "uint256"
134
+ }
135
+ ],
136
+ "name": "ChallengeAverted",
137
+ "type": "event"
138
+ },
139
+ {
140
+ "anonymous": false,
141
+ "inputs": [
142
+ {
143
+ "indexed": true,
144
+ "internalType": "address",
145
+ "name": "challenger",
146
+ "type": "address"
147
+ },
148
+ {
149
+ "indexed": true,
150
+ "internalType": "address",
151
+ "name": "position",
152
+ "type": "address"
153
+ },
154
+ {
155
+ "indexed": false,
156
+ "internalType": "uint256",
157
+ "name": "size",
158
+ "type": "uint256"
159
+ },
160
+ {
161
+ "indexed": false,
162
+ "internalType": "uint256",
163
+ "name": "number",
164
+ "type": "uint256"
165
+ }
166
+ ],
167
+ "name": "ChallengeStarted",
168
+ "type": "event"
169
+ },
170
+ {
171
+ "anonymous": false,
172
+ "inputs": [
173
+ {
174
+ "indexed": true,
175
+ "internalType": "address",
176
+ "name": "position",
177
+ "type": "address"
178
+ },
179
+ {
180
+ "indexed": false,
181
+ "internalType": "uint256",
182
+ "name": "number",
183
+ "type": "uint256"
184
+ },
185
+ {
186
+ "indexed": false,
187
+ "internalType": "uint256",
188
+ "name": "bid",
189
+ "type": "uint256"
190
+ },
191
+ {
192
+ "indexed": false,
193
+ "internalType": "uint256",
194
+ "name": "acquiredCollateral",
195
+ "type": "uint256"
196
+ },
197
+ {
198
+ "indexed": false,
199
+ "internalType": "uint256",
200
+ "name": "challengeSize",
201
+ "type": "uint256"
202
+ }
203
+ ],
204
+ "name": "ChallengeSucceeded",
205
+ "type": "event"
206
+ },
207
+ {
208
+ "anonymous": false,
209
+ "inputs": [
210
+ {
211
+ "indexed": false,
212
+ "internalType": "address",
213
+ "name": "pos",
214
+ "type": "address"
215
+ },
216
+ {
217
+ "indexed": false,
218
+ "internalType": "uint256",
219
+ "name": "amount",
220
+ "type": "uint256"
221
+ },
222
+ {
223
+ "indexed": false,
224
+ "internalType": "uint256",
225
+ "name": "priceE36MinusDecimals",
226
+ "type": "uint256"
227
+ }
228
+ ],
229
+ "name": "ForcedSale",
230
+ "type": "event"
231
+ },
232
+ {
233
+ "anonymous": false,
234
+ "inputs": [
235
+ {
236
+ "indexed": true,
237
+ "internalType": "address",
238
+ "name": "position",
239
+ "type": "address"
240
+ },
241
+ {
242
+ "indexed": true,
243
+ "internalType": "address",
244
+ "name": "denier",
245
+ "type": "address"
246
+ },
247
+ {
248
+ "indexed": false,
249
+ "internalType": "string",
250
+ "name": "message",
251
+ "type": "string"
252
+ }
253
+ ],
254
+ "name": "PositionDeniedByGovernance",
255
+ "type": "event"
256
+ },
257
+ {
258
+ "anonymous": false,
259
+ "inputs": [
260
+ {
261
+ "indexed": true,
262
+ "internalType": "address",
263
+ "name": "owner",
264
+ "type": "address"
265
+ },
266
+ {
267
+ "indexed": true,
268
+ "internalType": "address",
269
+ "name": "position",
270
+ "type": "address"
271
+ },
272
+ {
273
+ "indexed": false,
274
+ "internalType": "address",
275
+ "name": "original",
276
+ "type": "address"
277
+ },
278
+ {
279
+ "indexed": false,
280
+ "internalType": "address",
281
+ "name": "collateral",
282
+ "type": "address"
283
+ }
284
+ ],
285
+ "name": "PositionOpened",
286
+ "type": "event"
287
+ },
288
+ {
289
+ "anonymous": false,
290
+ "inputs": [
291
+ {
292
+ "indexed": true,
293
+ "internalType": "address",
294
+ "name": "position",
295
+ "type": "address"
296
+ },
297
+ {
298
+ "indexed": false,
299
+ "internalType": "uint256",
300
+ "name": "collateral",
301
+ "type": "uint256"
302
+ },
303
+ {
304
+ "indexed": false,
305
+ "internalType": "uint256",
306
+ "name": "price",
307
+ "type": "uint256"
308
+ },
309
+ {
310
+ "indexed": false,
311
+ "internalType": "uint256",
312
+ "name": "principal",
313
+ "type": "uint256"
314
+ }
315
+ ],
316
+ "name": "PositionUpdate",
317
+ "type": "event"
318
+ },
319
+ {
320
+ "anonymous": false,
321
+ "inputs": [
322
+ {
323
+ "indexed": false,
324
+ "internalType": "address",
325
+ "name": "collateral",
326
+ "type": "address"
327
+ },
328
+ {
329
+ "indexed": true,
330
+ "internalType": "address",
331
+ "name": "beneficiary",
332
+ "type": "address"
333
+ },
334
+ {
335
+ "indexed": false,
336
+ "internalType": "uint256",
337
+ "name": "amount",
338
+ "type": "uint256"
339
+ }
340
+ ],
341
+ "name": "PostponedReturn",
342
+ "type": "event"
343
+ },
344
+ {
345
+ "anonymous": false,
346
+ "inputs": [
347
+ {
348
+ "indexed": false,
349
+ "internalType": "uint24",
350
+ "name": "newRate",
351
+ "type": "uint24"
352
+ }
353
+ ],
354
+ "name": "RateChanged",
355
+ "type": "event"
356
+ },
357
+ {
358
+ "anonymous": false,
359
+ "inputs": [
360
+ {
361
+ "indexed": false,
362
+ "internalType": "address",
363
+ "name": "who",
364
+ "type": "address"
365
+ },
366
+ {
367
+ "indexed": false,
368
+ "internalType": "uint24",
369
+ "name": "nextRate",
370
+ "type": "uint24"
371
+ },
372
+ {
373
+ "indexed": false,
374
+ "internalType": "uint40",
375
+ "name": "nextChange",
376
+ "type": "uint40"
377
+ }
378
+ ],
379
+ "name": "RateProposed",
380
+ "type": "event"
381
+ },
382
+ {
383
+ "inputs": [],
384
+ "name": "CHALLENGER_REWARD",
385
+ "outputs": [
386
+ {
387
+ "internalType": "uint256",
388
+ "name": "",
389
+ "type": "uint256"
390
+ }
391
+ ],
392
+ "stateMutability": "view",
393
+ "type": "function"
394
+ },
395
+ {
396
+ "inputs": [],
397
+ "name": "EXPIRED_PRICE_FACTOR",
398
+ "outputs": [
399
+ {
400
+ "internalType": "uint256",
401
+ "name": "",
402
+ "type": "uint256"
403
+ }
404
+ ],
405
+ "stateMutability": "view",
406
+ "type": "function"
407
+ },
408
+ {
409
+ "inputs": [],
410
+ "name": "JUSD",
411
+ "outputs": [
412
+ {
413
+ "internalType": "contract IJuiceDollar",
414
+ "name": "",
415
+ "type": "address"
416
+ }
417
+ ],
418
+ "stateMutability": "view",
419
+ "type": "function"
420
+ },
421
+ {
422
+ "inputs": [],
423
+ "name": "OPENING_FEE",
424
+ "outputs": [
425
+ {
426
+ "internalType": "uint256",
427
+ "name": "",
428
+ "type": "uint256"
429
+ }
430
+ ],
431
+ "stateMutability": "view",
432
+ "type": "function"
433
+ },
434
+ {
435
+ "inputs": [],
436
+ "name": "RATE",
437
+ "outputs": [
438
+ {
439
+ "internalType": "contract ILeadrate",
440
+ "name": "",
441
+ "type": "address"
442
+ }
443
+ ],
444
+ "stateMutability": "view",
445
+ "type": "function"
446
+ },
447
+ {
448
+ "inputs": [],
449
+ "name": "ROLLER",
450
+ "outputs": [
451
+ {
452
+ "internalType": "contract PositionRoller",
453
+ "name": "",
454
+ "type": "address"
455
+ }
456
+ ],
457
+ "stateMutability": "view",
458
+ "type": "function"
459
+ },
460
+ {
461
+ "inputs": [],
462
+ "name": "WCBTC",
463
+ "outputs": [
464
+ {
465
+ "internalType": "address",
466
+ "name": "",
467
+ "type": "address"
468
+ }
469
+ ],
470
+ "stateMutability": "view",
471
+ "type": "function"
472
+ },
473
+ {
474
+ "inputs": [],
475
+ "name": "applyChange",
476
+ "outputs": [],
477
+ "stateMutability": "nonpayable",
478
+ "type": "function"
479
+ },
480
+ {
481
+ "inputs": [
482
+ {
483
+ "internalType": "uint256",
484
+ "name": "_challengeNumber",
485
+ "type": "uint256"
486
+ },
487
+ {
488
+ "internalType": "uint256",
489
+ "name": "size",
490
+ "type": "uint256"
491
+ },
492
+ {
493
+ "internalType": "bool",
494
+ "name": "postponeCollateralReturn",
495
+ "type": "bool"
496
+ }
497
+ ],
498
+ "name": "bid",
499
+ "outputs": [],
500
+ "stateMutability": "nonpayable",
501
+ "type": "function"
502
+ },
503
+ {
504
+ "inputs": [
505
+ {
506
+ "internalType": "uint256",
507
+ "name": "_challengeNumber",
508
+ "type": "uint256"
509
+ },
510
+ {
511
+ "internalType": "uint256",
512
+ "name": "size",
513
+ "type": "uint256"
514
+ },
515
+ {
516
+ "internalType": "bool",
517
+ "name": "postponeCollateralReturn",
518
+ "type": "bool"
519
+ },
520
+ {
521
+ "internalType": "bool",
522
+ "name": "returnCollateralAsNative",
523
+ "type": "bool"
524
+ }
525
+ ],
526
+ "name": "bid",
527
+ "outputs": [],
528
+ "stateMutability": "nonpayable",
529
+ "type": "function"
530
+ },
531
+ {
532
+ "inputs": [
533
+ {
534
+ "internalType": "contract IPosition",
535
+ "name": "pos",
536
+ "type": "address"
537
+ },
538
+ {
539
+ "internalType": "uint256",
540
+ "name": "upToAmount",
541
+ "type": "uint256"
542
+ }
543
+ ],
544
+ "name": "buyExpiredCollateral",
545
+ "outputs": [
546
+ {
547
+ "internalType": "uint256",
548
+ "name": "",
549
+ "type": "uint256"
550
+ }
551
+ ],
552
+ "stateMutability": "nonpayable",
553
+ "type": "function"
554
+ },
555
+ {
556
+ "inputs": [
557
+ {
558
+ "internalType": "contract IPosition",
559
+ "name": "pos",
560
+ "type": "address"
561
+ },
562
+ {
563
+ "internalType": "uint256",
564
+ "name": "upToAmount",
565
+ "type": "uint256"
566
+ },
567
+ {
568
+ "internalType": "bool",
569
+ "name": "receiveAsNative",
570
+ "type": "bool"
571
+ }
572
+ ],
573
+ "name": "buyExpiredCollateral",
574
+ "outputs": [
575
+ {
576
+ "internalType": "uint256",
577
+ "name": "",
578
+ "type": "uint256"
579
+ }
580
+ ],
581
+ "stateMutability": "nonpayable",
582
+ "type": "function"
583
+ },
584
+ {
585
+ "inputs": [
586
+ {
587
+ "internalType": "address",
588
+ "name": "_positionAddr",
589
+ "type": "address"
590
+ },
591
+ {
592
+ "internalType": "uint256",
593
+ "name": "_collateralAmount",
594
+ "type": "uint256"
595
+ },
596
+ {
597
+ "internalType": "uint256",
598
+ "name": "minimumPrice",
599
+ "type": "uint256"
600
+ }
601
+ ],
602
+ "name": "challenge",
603
+ "outputs": [
604
+ {
605
+ "internalType": "uint256",
606
+ "name": "",
607
+ "type": "uint256"
608
+ }
609
+ ],
610
+ "stateMutability": "payable",
611
+ "type": "function"
612
+ },
613
+ {
614
+ "inputs": [
615
+ {
616
+ "internalType": "uint256",
617
+ "name": "",
618
+ "type": "uint256"
619
+ }
620
+ ],
621
+ "name": "challenges",
622
+ "outputs": [
623
+ {
624
+ "internalType": "address",
625
+ "name": "challenger",
626
+ "type": "address"
627
+ },
628
+ {
629
+ "internalType": "uint40",
630
+ "name": "start",
631
+ "type": "uint40"
632
+ },
633
+ {
634
+ "internalType": "contract IPosition",
635
+ "name": "position",
636
+ "type": "address"
637
+ },
638
+ {
639
+ "internalType": "uint256",
640
+ "name": "size",
641
+ "type": "uint256"
642
+ }
643
+ ],
644
+ "stateMutability": "view",
645
+ "type": "function"
646
+ },
647
+ {
648
+ "inputs": [
649
+ {
650
+ "internalType": "address",
651
+ "name": "owner",
652
+ "type": "address"
653
+ },
654
+ {
655
+ "internalType": "address",
656
+ "name": "parent",
657
+ "type": "address"
658
+ },
659
+ {
660
+ "internalType": "uint256",
661
+ "name": "_initialCollateral",
662
+ "type": "uint256"
663
+ },
664
+ {
665
+ "internalType": "uint256",
666
+ "name": "_initialMint",
667
+ "type": "uint256"
668
+ },
669
+ {
670
+ "internalType": "uint40",
671
+ "name": "expiration",
672
+ "type": "uint40"
673
+ },
674
+ {
675
+ "internalType": "uint256",
676
+ "name": "_liqPrice",
677
+ "type": "uint256"
678
+ }
679
+ ],
680
+ "name": "clone",
681
+ "outputs": [
682
+ {
683
+ "internalType": "address",
684
+ "name": "",
685
+ "type": "address"
686
+ }
687
+ ],
688
+ "stateMutability": "payable",
689
+ "type": "function"
690
+ },
691
+ {
692
+ "inputs": [],
693
+ "name": "currentRatePPM",
694
+ "outputs": [
695
+ {
696
+ "internalType": "uint24",
697
+ "name": "",
698
+ "type": "uint24"
699
+ }
700
+ ],
701
+ "stateMutability": "view",
702
+ "type": "function"
703
+ },
704
+ {
705
+ "inputs": [],
706
+ "name": "currentTicks",
707
+ "outputs": [
708
+ {
709
+ "internalType": "uint64",
710
+ "name": "",
711
+ "type": "uint64"
712
+ }
713
+ ],
714
+ "stateMutability": "view",
715
+ "type": "function"
716
+ },
717
+ {
718
+ "inputs": [
719
+ {
720
+ "internalType": "address",
721
+ "name": "denier",
722
+ "type": "address"
723
+ },
724
+ {
725
+ "internalType": "string",
726
+ "name": "message",
727
+ "type": "string"
728
+ }
729
+ ],
730
+ "name": "emitPositionDenied",
731
+ "outputs": [],
732
+ "stateMutability": "nonpayable",
733
+ "type": "function"
734
+ },
735
+ {
736
+ "inputs": [
737
+ {
738
+ "internalType": "uint256",
739
+ "name": "_collateral",
740
+ "type": "uint256"
741
+ },
742
+ {
743
+ "internalType": "uint256",
744
+ "name": "_price",
745
+ "type": "uint256"
746
+ },
747
+ {
748
+ "internalType": "uint256",
749
+ "name": "_principal",
750
+ "type": "uint256"
751
+ }
752
+ ],
753
+ "name": "emitPositionUpdate",
754
+ "outputs": [],
755
+ "stateMutability": "nonpayable",
756
+ "type": "function"
757
+ },
758
+ {
759
+ "inputs": [],
760
+ "name": "equity",
761
+ "outputs": [
762
+ {
763
+ "internalType": "contract IReserve",
764
+ "name": "",
765
+ "type": "address"
766
+ }
767
+ ],
768
+ "stateMutability": "view",
769
+ "type": "function"
770
+ },
771
+ {
772
+ "inputs": [
773
+ {
774
+ "internalType": "contract IPosition",
775
+ "name": "pos",
776
+ "type": "address"
777
+ }
778
+ ],
779
+ "name": "expiredPurchasePrice",
780
+ "outputs": [
781
+ {
782
+ "internalType": "uint256",
783
+ "name": "",
784
+ "type": "uint256"
785
+ }
786
+ ],
787
+ "stateMutability": "view",
788
+ "type": "function"
789
+ },
790
+ {
791
+ "inputs": [],
792
+ "name": "nextChange",
793
+ "outputs": [
794
+ {
795
+ "internalType": "uint40",
796
+ "name": "",
797
+ "type": "uint40"
798
+ }
799
+ ],
800
+ "stateMutability": "view",
801
+ "type": "function"
802
+ },
803
+ {
804
+ "inputs": [],
805
+ "name": "nextRatePPM",
806
+ "outputs": [
807
+ {
808
+ "internalType": "uint24",
809
+ "name": "",
810
+ "type": "uint24"
811
+ }
812
+ ],
813
+ "stateMutability": "view",
814
+ "type": "function"
815
+ },
816
+ {
817
+ "inputs": [
818
+ {
819
+ "internalType": "address",
820
+ "name": "_collateralAddress",
821
+ "type": "address"
822
+ },
823
+ {
824
+ "internalType": "uint256",
825
+ "name": "_minCollateral",
826
+ "type": "uint256"
827
+ },
828
+ {
829
+ "internalType": "uint256",
830
+ "name": "_initialCollateral",
831
+ "type": "uint256"
832
+ },
833
+ {
834
+ "internalType": "uint256",
835
+ "name": "_mintingMaximum",
836
+ "type": "uint256"
837
+ },
838
+ {
839
+ "internalType": "uint40",
840
+ "name": "_initPeriodSeconds",
841
+ "type": "uint40"
842
+ },
843
+ {
844
+ "internalType": "uint40",
845
+ "name": "_expirationSeconds",
846
+ "type": "uint40"
847
+ },
848
+ {
849
+ "internalType": "uint40",
850
+ "name": "_challengeSeconds",
851
+ "type": "uint40"
852
+ },
853
+ {
854
+ "internalType": "uint24",
855
+ "name": "_riskPremium",
856
+ "type": "uint24"
857
+ },
858
+ {
859
+ "internalType": "uint256",
860
+ "name": "_liqPrice",
861
+ "type": "uint256"
862
+ },
863
+ {
864
+ "internalType": "uint24",
865
+ "name": "_reservePPM",
866
+ "type": "uint24"
867
+ }
868
+ ],
869
+ "name": "openPosition",
870
+ "outputs": [
871
+ {
872
+ "internalType": "address",
873
+ "name": "",
874
+ "type": "address"
875
+ }
876
+ ],
877
+ "stateMutability": "payable",
878
+ "type": "function"
879
+ },
880
+ {
881
+ "inputs": [
882
+ {
883
+ "internalType": "address",
884
+ "name": "collateral",
885
+ "type": "address"
886
+ },
887
+ {
888
+ "internalType": "address",
889
+ "name": "owner",
890
+ "type": "address"
891
+ }
892
+ ],
893
+ "name": "pendingReturns",
894
+ "outputs": [
895
+ {
896
+ "internalType": "uint256",
897
+ "name": "amount",
898
+ "type": "uint256"
899
+ }
900
+ ],
901
+ "stateMutability": "view",
902
+ "type": "function"
903
+ },
904
+ {
905
+ "inputs": [
906
+ {
907
+ "internalType": "uint256",
908
+ "name": "challengeNumber",
909
+ "type": "uint256"
910
+ }
911
+ ],
912
+ "name": "price",
913
+ "outputs": [
914
+ {
915
+ "internalType": "uint256",
916
+ "name": "",
917
+ "type": "uint256"
918
+ }
919
+ ],
920
+ "stateMutability": "view",
921
+ "type": "function"
922
+ },
923
+ {
924
+ "inputs": [
925
+ {
926
+ "internalType": "uint24",
927
+ "name": "newRatePPM_",
928
+ "type": "uint24"
929
+ },
930
+ {
931
+ "internalType": "address[]",
932
+ "name": "helpers",
933
+ "type": "address[]"
934
+ }
935
+ ],
936
+ "name": "proposeChange",
937
+ "outputs": [],
938
+ "stateMutability": "nonpayable",
939
+ "type": "function"
940
+ },
941
+ {
942
+ "inputs": [
943
+ {
944
+ "internalType": "address",
945
+ "name": "collateral",
946
+ "type": "address"
947
+ },
948
+ {
949
+ "internalType": "address",
950
+ "name": "target",
951
+ "type": "address"
952
+ },
953
+ {
954
+ "internalType": "bool",
955
+ "name": "asNative",
956
+ "type": "bool"
957
+ }
958
+ ],
959
+ "name": "returnPostponedCollateral",
960
+ "outputs": [],
961
+ "stateMutability": "nonpayable",
962
+ "type": "function"
963
+ },
964
+ {
965
+ "inputs": [
966
+ {
967
+ "internalType": "address",
968
+ "name": "collateral",
969
+ "type": "address"
970
+ },
971
+ {
972
+ "internalType": "address",
973
+ "name": "target",
974
+ "type": "address"
975
+ }
976
+ ],
977
+ "name": "returnPostponedCollateral",
978
+ "outputs": [],
979
+ "stateMutability": "nonpayable",
980
+ "type": "function"
981
+ },
982
+ {
983
+ "inputs": [
984
+ {
985
+ "internalType": "bytes4",
986
+ "name": "interfaceId",
987
+ "type": "bytes4"
988
+ }
989
+ ],
990
+ "name": "supportsInterface",
991
+ "outputs": [
992
+ {
993
+ "internalType": "bool",
994
+ "name": "",
995
+ "type": "bool"
996
+ }
997
+ ],
998
+ "stateMutability": "view",
999
+ "type": "function"
1000
+ },
1001
+ {
1002
+ "inputs": [
1003
+ {
1004
+ "internalType": "uint256",
1005
+ "name": "timestamp",
1006
+ "type": "uint256"
1007
+ }
1008
+ ],
1009
+ "name": "ticks",
1010
+ "outputs": [
1011
+ {
1012
+ "internalType": "uint64",
1013
+ "name": "",
1014
+ "type": "uint64"
1015
+ }
1016
+ ],
1017
+ "stateMutability": "view",
1018
+ "type": "function"
1019
+ },
1020
+ {
1021
+ "stateMutability": "payable",
1022
+ "type": "receive"
1023
+ }
1024
+ ] as const;