@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,638 @@
1
+ export const UniswapV3PoolABI = [
2
+ { inputs: [], stateMutability: 'nonpayable', type: 'constructor' },
3
+ {
4
+ anonymous: false,
5
+ inputs: [
6
+ {
7
+ indexed: true,
8
+ internalType: 'address',
9
+ name: 'owner',
10
+ type: 'address',
11
+ },
12
+ {
13
+ indexed: true,
14
+ internalType: 'int24',
15
+ name: 'tickLower',
16
+ type: 'int24',
17
+ },
18
+ {
19
+ indexed: true,
20
+ internalType: 'int24',
21
+ name: 'tickUpper',
22
+ type: 'int24',
23
+ },
24
+ {
25
+ indexed: false,
26
+ internalType: 'uint128',
27
+ name: 'amount',
28
+ type: 'uint128',
29
+ },
30
+ {
31
+ indexed: false,
32
+ internalType: 'uint256',
33
+ name: 'amount0',
34
+ type: 'uint256',
35
+ },
36
+ {
37
+ indexed: false,
38
+ internalType: 'uint256',
39
+ name: 'amount1',
40
+ type: 'uint256',
41
+ },
42
+ ],
43
+ name: 'Burn',
44
+ type: 'event',
45
+ },
46
+ {
47
+ anonymous: false,
48
+ inputs: [
49
+ {
50
+ indexed: true,
51
+ internalType: 'address',
52
+ name: 'owner',
53
+ type: 'address',
54
+ },
55
+ {
56
+ indexed: false,
57
+ internalType: 'address',
58
+ name: 'recipient',
59
+ type: 'address',
60
+ },
61
+ {
62
+ indexed: true,
63
+ internalType: 'int24',
64
+ name: 'tickLower',
65
+ type: 'int24',
66
+ },
67
+ {
68
+ indexed: true,
69
+ internalType: 'int24',
70
+ name: 'tickUpper',
71
+ type: 'int24',
72
+ },
73
+ {
74
+ indexed: false,
75
+ internalType: 'uint128',
76
+ name: 'amount0',
77
+ type: 'uint128',
78
+ },
79
+ {
80
+ indexed: false,
81
+ internalType: 'uint128',
82
+ name: 'amount1',
83
+ type: 'uint128',
84
+ },
85
+ ],
86
+ name: 'Collect',
87
+ type: 'event',
88
+ },
89
+ {
90
+ anonymous: false,
91
+ inputs: [
92
+ {
93
+ indexed: true,
94
+ internalType: 'address',
95
+ name: 'sender',
96
+ type: 'address',
97
+ },
98
+ {
99
+ indexed: true,
100
+ internalType: 'address',
101
+ name: 'recipient',
102
+ type: 'address',
103
+ },
104
+ {
105
+ indexed: false,
106
+ internalType: 'uint128',
107
+ name: 'amount0',
108
+ type: 'uint128',
109
+ },
110
+ {
111
+ indexed: false,
112
+ internalType: 'uint128',
113
+ name: 'amount1',
114
+ type: 'uint128',
115
+ },
116
+ ],
117
+ name: 'CollectProtocol',
118
+ type: 'event',
119
+ },
120
+ {
121
+ anonymous: false,
122
+ inputs: [
123
+ {
124
+ indexed: true,
125
+ internalType: 'address',
126
+ name: 'sender',
127
+ type: 'address',
128
+ },
129
+ {
130
+ indexed: true,
131
+ internalType: 'address',
132
+ name: 'recipient',
133
+ type: 'address',
134
+ },
135
+ {
136
+ indexed: false,
137
+ internalType: 'uint256',
138
+ name: 'amount0',
139
+ type: 'uint256',
140
+ },
141
+ {
142
+ indexed: false,
143
+ internalType: 'uint256',
144
+ name: 'amount1',
145
+ type: 'uint256',
146
+ },
147
+ {
148
+ indexed: false,
149
+ internalType: 'uint256',
150
+ name: 'paid0',
151
+ type: 'uint256',
152
+ },
153
+ {
154
+ indexed: false,
155
+ internalType: 'uint256',
156
+ name: 'paid1',
157
+ type: 'uint256',
158
+ },
159
+ ],
160
+ name: 'Flash',
161
+ type: 'event',
162
+ },
163
+ {
164
+ anonymous: false,
165
+ inputs: [
166
+ {
167
+ indexed: false,
168
+ internalType: 'uint16',
169
+ name: 'observationCardinalityNextOld',
170
+ type: 'uint16',
171
+ },
172
+ {
173
+ indexed: false,
174
+ internalType: 'uint16',
175
+ name: 'observationCardinalityNextNew',
176
+ type: 'uint16',
177
+ },
178
+ ],
179
+ name: 'IncreaseObservationCardinalityNext',
180
+ type: 'event',
181
+ },
182
+ {
183
+ anonymous: false,
184
+ inputs: [
185
+ {
186
+ indexed: false,
187
+ internalType: 'uint160',
188
+ name: 'sqrtPriceX96',
189
+ type: 'uint160',
190
+ },
191
+ { indexed: false, internalType: 'int24', name: 'tick', type: 'int24' },
192
+ ],
193
+ name: 'Initialize',
194
+ type: 'event',
195
+ },
196
+ {
197
+ anonymous: false,
198
+ inputs: [
199
+ {
200
+ indexed: false,
201
+ internalType: 'address',
202
+ name: 'sender',
203
+ type: 'address',
204
+ },
205
+ {
206
+ indexed: true,
207
+ internalType: 'address',
208
+ name: 'owner',
209
+ type: 'address',
210
+ },
211
+ {
212
+ indexed: true,
213
+ internalType: 'int24',
214
+ name: 'tickLower',
215
+ type: 'int24',
216
+ },
217
+ {
218
+ indexed: true,
219
+ internalType: 'int24',
220
+ name: 'tickUpper',
221
+ type: 'int24',
222
+ },
223
+ {
224
+ indexed: false,
225
+ internalType: 'uint128',
226
+ name: 'amount',
227
+ type: 'uint128',
228
+ },
229
+ {
230
+ indexed: false,
231
+ internalType: 'uint256',
232
+ name: 'amount0',
233
+ type: 'uint256',
234
+ },
235
+ {
236
+ indexed: false,
237
+ internalType: 'uint256',
238
+ name: 'amount1',
239
+ type: 'uint256',
240
+ },
241
+ ],
242
+ name: 'Mint',
243
+ type: 'event',
244
+ },
245
+ {
246
+ anonymous: false,
247
+ inputs: [
248
+ {
249
+ indexed: false,
250
+ internalType: 'uint8',
251
+ name: 'feeProtocol0Old',
252
+ type: 'uint8',
253
+ },
254
+ {
255
+ indexed: false,
256
+ internalType: 'uint8',
257
+ name: 'feeProtocol1Old',
258
+ type: 'uint8',
259
+ },
260
+ {
261
+ indexed: false,
262
+ internalType: 'uint8',
263
+ name: 'feeProtocol0New',
264
+ type: 'uint8',
265
+ },
266
+ {
267
+ indexed: false,
268
+ internalType: 'uint8',
269
+ name: 'feeProtocol1New',
270
+ type: 'uint8',
271
+ },
272
+ ],
273
+ name: 'SetFeeProtocol',
274
+ type: 'event',
275
+ },
276
+ {
277
+ anonymous: false,
278
+ inputs: [
279
+ {
280
+ indexed: true,
281
+ internalType: 'address',
282
+ name: 'sender',
283
+ type: 'address',
284
+ },
285
+ {
286
+ indexed: true,
287
+ internalType: 'address',
288
+ name: 'recipient',
289
+ type: 'address',
290
+ },
291
+ {
292
+ indexed: false,
293
+ internalType: 'int256',
294
+ name: 'amount0',
295
+ type: 'int256',
296
+ },
297
+ {
298
+ indexed: false,
299
+ internalType: 'int256',
300
+ name: 'amount1',
301
+ type: 'int256',
302
+ },
303
+ {
304
+ indexed: false,
305
+ internalType: 'uint160',
306
+ name: 'sqrtPriceX96',
307
+ type: 'uint160',
308
+ },
309
+ {
310
+ indexed: false,
311
+ internalType: 'uint128',
312
+ name: 'liquidity',
313
+ type: 'uint128',
314
+ },
315
+ { indexed: false, internalType: 'int24', name: 'tick', type: 'int24' },
316
+ ],
317
+ name: 'Swap',
318
+ type: 'event',
319
+ },
320
+ {
321
+ inputs: [
322
+ { internalType: 'int24', name: 'tickLower', type: 'int24' },
323
+ { internalType: 'int24', name: 'tickUpper', type: 'int24' },
324
+ { internalType: 'uint128', name: 'amount', type: 'uint128' },
325
+ ],
326
+ name: 'burn',
327
+ outputs: [
328
+ { internalType: 'uint256', name: 'amount0', type: 'uint256' },
329
+ { internalType: 'uint256', name: 'amount1', type: 'uint256' },
330
+ ],
331
+ stateMutability: 'nonpayable',
332
+ type: 'function',
333
+ },
334
+ {
335
+ inputs: [
336
+ { internalType: 'address', name: 'recipient', type: 'address' },
337
+ { internalType: 'int24', name: 'tickLower', type: 'int24' },
338
+ { internalType: 'int24', name: 'tickUpper', type: 'int24' },
339
+ { internalType: 'uint128', name: 'amount0Requested', type: 'uint128' },
340
+ { internalType: 'uint128', name: 'amount1Requested', type: 'uint128' },
341
+ ],
342
+ name: 'collect',
343
+ outputs: [
344
+ { internalType: 'uint128', name: 'amount0', type: 'uint128' },
345
+ { internalType: 'uint128', name: 'amount1', type: 'uint128' },
346
+ ],
347
+ stateMutability: 'nonpayable',
348
+ type: 'function',
349
+ },
350
+ {
351
+ inputs: [
352
+ { internalType: 'address', name: 'recipient', type: 'address' },
353
+ { internalType: 'uint128', name: 'amount0Requested', type: 'uint128' },
354
+ { internalType: 'uint128', name: 'amount1Requested', type: 'uint128' },
355
+ ],
356
+ name: 'collectProtocol',
357
+ outputs: [
358
+ { internalType: 'uint128', name: 'amount0', type: 'uint128' },
359
+ { internalType: 'uint128', name: 'amount1', type: 'uint128' },
360
+ ],
361
+ stateMutability: 'nonpayable',
362
+ type: 'function',
363
+ },
364
+ {
365
+ inputs: [],
366
+ name: 'factory',
367
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
368
+ stateMutability: 'view',
369
+ type: 'function',
370
+ },
371
+ {
372
+ inputs: [],
373
+ name: 'fee',
374
+ outputs: [{ internalType: 'uint24', name: '', type: 'uint24' }],
375
+ stateMutability: 'view',
376
+ type: 'function',
377
+ },
378
+ {
379
+ inputs: [],
380
+ name: 'feeGrowthGlobal0X128',
381
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
382
+ stateMutability: 'view',
383
+ type: 'function',
384
+ },
385
+ {
386
+ inputs: [],
387
+ name: 'feeGrowthGlobal1X128',
388
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
389
+ stateMutability: 'view',
390
+ type: 'function',
391
+ },
392
+ {
393
+ inputs: [
394
+ { internalType: 'address', name: 'recipient', type: 'address' },
395
+ { internalType: 'uint256', name: 'amount0', type: 'uint256' },
396
+ { internalType: 'uint256', name: 'amount1', type: 'uint256' },
397
+ { internalType: 'bytes', name: 'data', type: 'bytes' },
398
+ ],
399
+ name: 'flash',
400
+ outputs: [],
401
+ stateMutability: 'nonpayable',
402
+ type: 'function',
403
+ },
404
+ {
405
+ inputs: [
406
+ {
407
+ internalType: 'uint16',
408
+ name: 'observationCardinalityNext',
409
+ type: 'uint16',
410
+ },
411
+ ],
412
+ name: 'increaseObservationCardinalityNext',
413
+ outputs: [],
414
+ stateMutability: 'nonpayable',
415
+ type: 'function',
416
+ },
417
+ {
418
+ inputs: [{ internalType: 'uint160', name: 'sqrtPriceX96', type: 'uint160' }],
419
+ name: 'initialize',
420
+ outputs: [],
421
+ stateMutability: 'nonpayable',
422
+ type: 'function',
423
+ },
424
+ {
425
+ inputs: [],
426
+ name: 'liquidity',
427
+ outputs: [{ internalType: 'uint128', name: '', type: 'uint128' }],
428
+ stateMutability: 'view',
429
+ type: 'function',
430
+ },
431
+ {
432
+ inputs: [],
433
+ name: 'maxLiquidityPerTick',
434
+ outputs: [{ internalType: 'uint128', name: '', type: 'uint128' }],
435
+ stateMutability: 'view',
436
+ type: 'function',
437
+ },
438
+ {
439
+ inputs: [
440
+ { internalType: 'address', name: 'recipient', type: 'address' },
441
+ { internalType: 'int24', name: 'tickLower', type: 'int24' },
442
+ { internalType: 'int24', name: 'tickUpper', type: 'int24' },
443
+ { internalType: 'uint128', name: 'amount', type: 'uint128' },
444
+ { internalType: 'bytes', name: 'data', type: 'bytes' },
445
+ ],
446
+ name: 'mint',
447
+ outputs: [
448
+ { internalType: 'uint256', name: 'amount0', type: 'uint256' },
449
+ { internalType: 'uint256', name: 'amount1', type: 'uint256' },
450
+ ],
451
+ stateMutability: 'nonpayable',
452
+ type: 'function',
453
+ },
454
+ {
455
+ inputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
456
+ name: 'observations',
457
+ outputs: [
458
+ { internalType: 'uint32', name: 'blockTimestamp', type: 'uint32' },
459
+ { internalType: 'int56', name: 'tickCumulative', type: 'int56' },
460
+ {
461
+ internalType: 'uint160',
462
+ name: 'secondsPerLiquidityCumulativeX128',
463
+ type: 'uint160',
464
+ },
465
+ { internalType: 'bool', name: 'initialized', type: 'bool' },
466
+ ],
467
+ stateMutability: 'view',
468
+ type: 'function',
469
+ },
470
+ {
471
+ inputs: [{ internalType: 'uint32[]', name: 'secondsAgos', type: 'uint32[]' }],
472
+ name: 'observe',
473
+ outputs: [
474
+ { internalType: 'int56[]', name: 'tickCumulatives', type: 'int56[]' },
475
+ {
476
+ internalType: 'uint160[]',
477
+ name: 'secondsPerLiquidityCumulativeX128s',
478
+ type: 'uint160[]',
479
+ },
480
+ ],
481
+ stateMutability: 'view',
482
+ type: 'function',
483
+ },
484
+ {
485
+ inputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
486
+ name: 'positions',
487
+ outputs: [
488
+ { internalType: 'uint128', name: 'liquidity', type: 'uint128' },
489
+ {
490
+ internalType: 'uint256',
491
+ name: 'feeGrowthInside0LastX128',
492
+ type: 'uint256',
493
+ },
494
+ {
495
+ internalType: 'uint256',
496
+ name: 'feeGrowthInside1LastX128',
497
+ type: 'uint256',
498
+ },
499
+ { internalType: 'uint128', name: 'tokensOwed0', type: 'uint128' },
500
+ { internalType: 'uint128', name: 'tokensOwed1', type: 'uint128' },
501
+ ],
502
+ stateMutability: 'view',
503
+ type: 'function',
504
+ },
505
+ {
506
+ inputs: [],
507
+ name: 'protocolFees',
508
+ outputs: [
509
+ { internalType: 'uint128', name: 'token0', type: 'uint128' },
510
+ { internalType: 'uint128', name: 'token1', type: 'uint128' },
511
+ ],
512
+ stateMutability: 'view',
513
+ type: 'function',
514
+ },
515
+ {
516
+ inputs: [
517
+ { internalType: 'uint8', name: 'feeProtocol0', type: 'uint8' },
518
+ { internalType: 'uint8', name: 'feeProtocol1', type: 'uint8' },
519
+ ],
520
+ name: 'setFeeProtocol',
521
+ outputs: [],
522
+ stateMutability: 'nonpayable',
523
+ type: 'function',
524
+ },
525
+ {
526
+ inputs: [],
527
+ name: 'slot0',
528
+ outputs: [
529
+ { internalType: 'uint160', name: 'sqrtPriceX96', type: 'uint160' },
530
+ { internalType: 'int24', name: 'tick', type: 'int24' },
531
+ { internalType: 'uint16', name: 'observationIndex', type: 'uint16' },
532
+ {
533
+ internalType: 'uint16',
534
+ name: 'observationCardinality',
535
+ type: 'uint16',
536
+ },
537
+ {
538
+ internalType: 'uint16',
539
+ name: 'observationCardinalityNext',
540
+ type: 'uint16',
541
+ },
542
+ { internalType: 'uint8', name: 'feeProtocol', type: 'uint8' },
543
+ { internalType: 'bool', name: 'unlocked', type: 'bool' },
544
+ ],
545
+ stateMutability: 'view',
546
+ type: 'function',
547
+ },
548
+ {
549
+ inputs: [
550
+ { internalType: 'int24', name: 'tickLower', type: 'int24' },
551
+ { internalType: 'int24', name: 'tickUpper', type: 'int24' },
552
+ ],
553
+ name: 'snapshotCumulativesInside',
554
+ outputs: [
555
+ { internalType: 'int56', name: 'tickCumulativeInside', type: 'int56' },
556
+ {
557
+ internalType: 'uint160',
558
+ name: 'secondsPerLiquidityInsideX128',
559
+ type: 'uint160',
560
+ },
561
+ { internalType: 'uint32', name: 'secondsInside', type: 'uint32' },
562
+ ],
563
+ stateMutability: 'view',
564
+ type: 'function',
565
+ },
566
+ {
567
+ inputs: [
568
+ { internalType: 'address', name: 'recipient', type: 'address' },
569
+ { internalType: 'bool', name: 'zeroForOne', type: 'bool' },
570
+ { internalType: 'int256', name: 'amountSpecified', type: 'int256' },
571
+ { internalType: 'uint160', name: 'sqrtPriceLimitX96', type: 'uint160' },
572
+ { internalType: 'bytes', name: 'data', type: 'bytes' },
573
+ ],
574
+ name: 'swap',
575
+ outputs: [
576
+ { internalType: 'int256', name: 'amount0', type: 'int256' },
577
+ { internalType: 'int256', name: 'amount1', type: 'int256' },
578
+ ],
579
+ stateMutability: 'nonpayable',
580
+ type: 'function',
581
+ },
582
+ {
583
+ inputs: [{ internalType: 'int16', name: '', type: 'int16' }],
584
+ name: 'tickBitmap',
585
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
586
+ stateMutability: 'view',
587
+ type: 'function',
588
+ },
589
+ {
590
+ inputs: [],
591
+ name: 'tickSpacing',
592
+ outputs: [{ internalType: 'int24', name: '', type: 'int24' }],
593
+ stateMutability: 'view',
594
+ type: 'function',
595
+ },
596
+ {
597
+ inputs: [{ internalType: 'int24', name: '', type: 'int24' }],
598
+ name: 'ticks',
599
+ outputs: [
600
+ { internalType: 'uint128', name: 'liquidityGross', type: 'uint128' },
601
+ { internalType: 'int128', name: 'liquidityNet', type: 'int128' },
602
+ {
603
+ internalType: 'uint256',
604
+ name: 'feeGrowthOutside0X128',
605
+ type: 'uint256',
606
+ },
607
+ {
608
+ internalType: 'uint256',
609
+ name: 'feeGrowthOutside1X128',
610
+ type: 'uint256',
611
+ },
612
+ { internalType: 'int56', name: 'tickCumulativeOutside', type: 'int56' },
613
+ {
614
+ internalType: 'uint160',
615
+ name: 'secondsPerLiquidityOutsideX128',
616
+ type: 'uint160',
617
+ },
618
+ { internalType: 'uint32', name: 'secondsOutside', type: 'uint32' },
619
+ { internalType: 'bool', name: 'initialized', type: 'bool' },
620
+ ],
621
+ stateMutability: 'view',
622
+ type: 'function',
623
+ },
624
+ {
625
+ inputs: [],
626
+ name: 'token0',
627
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
628
+ stateMutability: 'view',
629
+ type: 'function',
630
+ },
631
+ {
632
+ inputs: [],
633
+ name: 'token1',
634
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
635
+ stateMutability: 'view',
636
+ type: 'function',
637
+ },
638
+ ] as const;
@@ -0,0 +1,48 @@
1
+ import { Address, zeroAddress } from "viem";
2
+
3
+ export interface ChainAddress {
4
+ juiceDollar: Address;
5
+ equity: Address;
6
+ frontendGateway: Address;
7
+ savingsGateway: Address;
8
+ savingsVaultJUSD: Address;
9
+ mintingHubGateway: Address;
10
+ coinLendingGateway: Address;
11
+ bridgeStartUSD: Address;
12
+ startUSD: Address;
13
+ roller: Address;
14
+ positionFactoryV2: Address;
15
+ }
16
+
17
+ // Citrea Mainnet Chain ID: 62831
18
+ // Citrea Testnet Chain ID: 5115
19
+ export const ADDRESS: Record<number, ChainAddress> = {
20
+ 62831: {
21
+ // Citrea Mainnet - TODO: Add deployed contract addresses
22
+ juiceDollar: zeroAddress,
23
+ equity: zeroAddress,
24
+ frontendGateway: zeroAddress,
25
+ savingsGateway: zeroAddress,
26
+ savingsVaultJUSD: zeroAddress,
27
+ mintingHubGateway: zeroAddress,
28
+ coinLendingGateway: zeroAddress,
29
+ bridgeStartUSD: zeroAddress,
30
+ startUSD: zeroAddress,
31
+ roller: zeroAddress,
32
+ positionFactoryV2: zeroAddress,
33
+ },
34
+ 5115: {
35
+ // Citrea Testnet - Deployed 2025-11-07
36
+ juiceDollar: "0x1Dd3057888944ff1f914626aB4BD47Dc8b6285Fe",
37
+ equity: "0xD82010E94737A4E4C3fc26314326Ff606E2Dcdf4",
38
+ frontendGateway: "0xe8757e121593bBD9f784F196026259085461aB17",
39
+ savingsGateway: "0x13531a4E00B36Fdb5f9f9A7c8C85cBc08Fd8EbDb",
40
+ savingsVaultJUSD: zeroAddress, // Not yet deployed
41
+ mintingHubGateway: "0xFfcD888Eb52F0FdD894fef580370A2FF48d82279",
42
+ coinLendingGateway: zeroAddress, // Not yet deployed
43
+ bridgeStartUSD: "0xFf862f932eB215A9C4aC8F3d20dd6dAe69DeC6D8",
44
+ startUSD: "0xf0229A29172E3541F5578dFC02aa024b3Bdb96A1",
45
+ roller: "0x851FF9f1F5fb7eEf75257aAa0adD2121D6b1Bd49",
46
+ positionFactoryV2: "0x4cc067EfcD6E6386BA8D6fd31c907Cad6C005318",
47
+ },
48
+ };
@@ -0,0 +1,28 @@
1
+ // chain addresses and helpers
2
+ export * from "./address.config";
3
+
4
+ // abi exports
5
+ export * from "./abis/core/JuiceDollar";
6
+ export * from "./abis/core/Equity";
7
+ export * from "./abis/core/FrontendGateway";
8
+ export * from "./abis/core/MintingHubGateway";
9
+ export * from "./abis/core/SavingsGateway";
10
+ export * from "./abis/core/SavingsVaultJUSD";
11
+ export * from "./abis/core/CoinLendingGateway";
12
+
13
+ export * from "./abis/MintingHubV2/PositionFactoryV2";
14
+ export * from "./abis/MintingHubV2/PositionRoller";
15
+ export * from "./abis/MintingHubV2/PositionV2";
16
+
17
+ export * from "./abis/utils/ERC20";
18
+ export * from "./abis/utils/ERC20PermitLight";
19
+ export * from "./abis/utils/Ownable";
20
+ export * from "./abis/utils/Leadrate";
21
+ export * from "./abis/utils/UniswapV3Pool";
22
+ export * from "./abis/utils/StartUSD";
23
+ export * from "./abis/utils/StablecoinBridge";
24
+ export * from "./abis/utils/MintingHubV2";
25
+ export * from "./abis/utils/Savings";
26
+
27
+ // constructor args
28
+ // export * from './ignition/constructor-args/index';