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