@juicedollar/jusd 1.0.2 → 1.0.4
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.
- package/contracts/MintingHubV2/MintingHub.sol +58 -17
- package/contracts/MintingHubV2/Position.sol +94 -24
- package/contracts/MintingHubV2/PositionFactory.sol +2 -2
- package/contracts/MintingHubV2/PositionRoller.sol +160 -42
- package/contracts/MintingHubV2/interface/IMintingHub.sol +3 -1
- package/contracts/MintingHubV2/interface/IPosition.sol +5 -3
- package/contracts/gateway/MintingHubGateway.sol +14 -19
- package/contracts/gateway/interface/IMintingHubGateway.sol +2 -2
- package/contracts/interface/IWrappedNative.sol +10 -0
- package/contracts/test/PositionExpirationTest.sol +3 -3
- package/contracts/test/ReentrantAttacker.sol +74 -0
- package/contracts/test/RejectNative.sol +17 -0
- package/dist/index.d.mts +225 -497
- package/dist/index.d.ts +225 -497
- package/dist/index.js +286 -641
- package/dist/index.mjs +286 -640
- package/exports/abis/MintingHubV2/PositionRoller.ts +90 -18
- package/exports/abis/MintingHubV2/PositionV2.ts +68 -26
- package/exports/abis/core/MintingHubGateway.ts +41 -76
- package/exports/abis/utils/MintingHubV2.ts +36 -37
- package/exports/address.config.ts +10 -13
- package/exports/index.ts +0 -1
- package/package.json +1 -1
- package/contracts/gateway/CoinLendingGateway.sol +0 -223
- package/contracts/gateway/interface/ICoinLendingGateway.sol +0 -73
- package/exports/abis/core/CoinLendingGateway.ts +0 -427
|
@@ -11,24 +11,8 @@ export const PositionRollerABI = [
|
|
|
11
11
|
type: 'constructor',
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
|
-
inputs: [
|
|
15
|
-
|
|
16
|
-
internalType: 'uint256',
|
|
17
|
-
name: '',
|
|
18
|
-
type: 'uint256',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
internalType: 'uint256',
|
|
22
|
-
name: '',
|
|
23
|
-
type: 'uint256',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
internalType: 'uint256',
|
|
27
|
-
name: '',
|
|
28
|
-
type: 'uint256',
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
name: 'Log',
|
|
14
|
+
inputs: [],
|
|
15
|
+
name: 'NativeTransferFailed',
|
|
32
16
|
type: 'error',
|
|
33
17
|
},
|
|
34
18
|
{
|
|
@@ -157,6 +141,47 @@ export const PositionRollerABI = [
|
|
|
157
141
|
stateMutability: 'nonpayable',
|
|
158
142
|
type: 'function',
|
|
159
143
|
},
|
|
144
|
+
{
|
|
145
|
+
inputs: [
|
|
146
|
+
{
|
|
147
|
+
internalType: 'contract IPosition',
|
|
148
|
+
name: 'source',
|
|
149
|
+
type: 'address',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
internalType: 'contract IPosition',
|
|
153
|
+
name: 'target',
|
|
154
|
+
type: 'address',
|
|
155
|
+
},
|
|
156
|
+
],
|
|
157
|
+
name: 'rollFullyNative',
|
|
158
|
+
outputs: [],
|
|
159
|
+
stateMutability: 'payable',
|
|
160
|
+
type: 'function',
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
inputs: [
|
|
164
|
+
{
|
|
165
|
+
internalType: 'contract IPosition',
|
|
166
|
+
name: 'source',
|
|
167
|
+
type: 'address',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
internalType: 'contract IPosition',
|
|
171
|
+
name: 'target',
|
|
172
|
+
type: 'address',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
internalType: 'uint40',
|
|
176
|
+
name: 'expiration',
|
|
177
|
+
type: 'uint40',
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
name: 'rollFullyNativeWithExpiration',
|
|
181
|
+
outputs: [],
|
|
182
|
+
stateMutability: 'payable',
|
|
183
|
+
type: 'function',
|
|
184
|
+
},
|
|
160
185
|
{
|
|
161
186
|
inputs: [
|
|
162
187
|
{
|
|
@@ -180,4 +205,51 @@ export const PositionRollerABI = [
|
|
|
180
205
|
stateMutability: 'nonpayable',
|
|
181
206
|
type: 'function',
|
|
182
207
|
},
|
|
208
|
+
{
|
|
209
|
+
inputs: [
|
|
210
|
+
{
|
|
211
|
+
internalType: 'contract IPosition',
|
|
212
|
+
name: 'source',
|
|
213
|
+
type: 'address',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
internalType: 'uint256',
|
|
217
|
+
name: 'repay',
|
|
218
|
+
type: 'uint256',
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
internalType: 'uint256',
|
|
222
|
+
name: 'collWithdraw',
|
|
223
|
+
type: 'uint256',
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
internalType: 'contract IPosition',
|
|
227
|
+
name: 'target',
|
|
228
|
+
type: 'address',
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
internalType: 'uint256',
|
|
232
|
+
name: 'mint',
|
|
233
|
+
type: 'uint256',
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
internalType: 'uint256',
|
|
237
|
+
name: 'collDeposit',
|
|
238
|
+
type: 'uint256',
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
internalType: 'uint40',
|
|
242
|
+
name: 'expiration',
|
|
243
|
+
type: 'uint40',
|
|
244
|
+
},
|
|
245
|
+
],
|
|
246
|
+
name: 'rollNative',
|
|
247
|
+
outputs: [],
|
|
248
|
+
stateMutability: 'payable',
|
|
249
|
+
type: 'function',
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
stateMutability: 'payable',
|
|
253
|
+
type: 'receive',
|
|
254
|
+
},
|
|
183
255
|
] as const;
|
|
@@ -75,6 +75,11 @@ export const PositionV2ABI = [
|
|
|
75
75
|
name: 'AlreadyInitialized',
|
|
76
76
|
type: 'error',
|
|
77
77
|
},
|
|
78
|
+
{
|
|
79
|
+
inputs: [],
|
|
80
|
+
name: 'CannotRescueCollateral',
|
|
81
|
+
type: 'error',
|
|
82
|
+
},
|
|
78
83
|
{
|
|
79
84
|
inputs: [],
|
|
80
85
|
name: 'ChallengeTooSmall',
|
|
@@ -153,6 +158,11 @@ export const PositionV2ABI = [
|
|
|
153
158
|
name: 'LimitExceeded',
|
|
154
159
|
type: 'error',
|
|
155
160
|
},
|
|
161
|
+
{
|
|
162
|
+
inputs: [],
|
|
163
|
+
name: 'NativeTransferFailed',
|
|
164
|
+
type: 'error',
|
|
165
|
+
},
|
|
156
166
|
{
|
|
157
167
|
inputs: [],
|
|
158
168
|
name: 'NotHub',
|
|
@@ -297,24 +307,32 @@ export const PositionV2ABI = [
|
|
|
297
307
|
name: 'newPrice',
|
|
298
308
|
type: 'uint256',
|
|
299
309
|
},
|
|
310
|
+
{
|
|
311
|
+
internalType: 'bool',
|
|
312
|
+
name: 'withdrawAsNative',
|
|
313
|
+
type: 'bool',
|
|
314
|
+
},
|
|
300
315
|
],
|
|
301
316
|
name: 'adjust',
|
|
302
317
|
outputs: [],
|
|
303
|
-
stateMutability: '
|
|
318
|
+
stateMutability: 'payable',
|
|
304
319
|
type: 'function',
|
|
305
320
|
},
|
|
306
321
|
{
|
|
307
322
|
inputs: [
|
|
308
323
|
{
|
|
309
324
|
internalType: 'uint256',
|
|
310
|
-
name: '
|
|
311
|
-
type: 'uint256',
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
internalType: 'uint256',
|
|
315
|
-
name: 'newCollateral',
|
|
325
|
+
name: 'newPrice',
|
|
316
326
|
type: 'uint256',
|
|
317
327
|
},
|
|
328
|
+
],
|
|
329
|
+
name: 'adjustPrice',
|
|
330
|
+
outputs: [],
|
|
331
|
+
stateMutability: 'nonpayable',
|
|
332
|
+
type: 'function',
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
inputs: [
|
|
318
336
|
{
|
|
319
337
|
internalType: 'uint256',
|
|
320
338
|
name: 'newPrice',
|
|
@@ -326,7 +344,7 @@ export const PositionV2ABI = [
|
|
|
326
344
|
type: 'address',
|
|
327
345
|
},
|
|
328
346
|
],
|
|
329
|
-
name: '
|
|
347
|
+
name: 'adjustPriceWithReference',
|
|
330
348
|
outputs: [],
|
|
331
349
|
stateMutability: 'nonpayable',
|
|
332
350
|
type: 'function',
|
|
@@ -335,17 +353,14 @@ export const PositionV2ABI = [
|
|
|
335
353
|
inputs: [
|
|
336
354
|
{
|
|
337
355
|
internalType: 'uint256',
|
|
338
|
-
name: '
|
|
356
|
+
name: 'newPrincipal',
|
|
357
|
+
type: 'uint256',
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
internalType: 'uint256',
|
|
361
|
+
name: 'newCollateral',
|
|
339
362
|
type: 'uint256',
|
|
340
363
|
},
|
|
341
|
-
],
|
|
342
|
-
name: 'adjustPrice',
|
|
343
|
-
outputs: [],
|
|
344
|
-
stateMutability: 'nonpayable',
|
|
345
|
-
type: 'function',
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
inputs: [
|
|
349
364
|
{
|
|
350
365
|
internalType: 'uint256',
|
|
351
366
|
name: 'newPrice',
|
|
@@ -356,10 +371,15 @@ export const PositionV2ABI = [
|
|
|
356
371
|
name: 'referencePosition',
|
|
357
372
|
type: 'address',
|
|
358
373
|
},
|
|
374
|
+
{
|
|
375
|
+
internalType: 'bool',
|
|
376
|
+
name: 'withdrawAsNative',
|
|
377
|
+
type: 'bool',
|
|
378
|
+
},
|
|
359
379
|
],
|
|
360
|
-
name: '
|
|
380
|
+
name: 'adjustWithReference',
|
|
361
381
|
outputs: [],
|
|
362
|
-
stateMutability: '
|
|
382
|
+
stateMutability: 'payable',
|
|
363
383
|
type: 'function',
|
|
364
384
|
},
|
|
365
385
|
{
|
|
@@ -947,6 +967,29 @@ export const PositionV2ABI = [
|
|
|
947
967
|
stateMutability: 'nonpayable',
|
|
948
968
|
type: 'function',
|
|
949
969
|
},
|
|
970
|
+
{
|
|
971
|
+
inputs: [
|
|
972
|
+
{
|
|
973
|
+
internalType: 'address',
|
|
974
|
+
name: 'token',
|
|
975
|
+
type: 'address',
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
internalType: 'address',
|
|
979
|
+
name: 'target',
|
|
980
|
+
type: 'address',
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
internalType: 'uint256',
|
|
984
|
+
name: 'amount',
|
|
985
|
+
type: 'uint256',
|
|
986
|
+
},
|
|
987
|
+
],
|
|
988
|
+
name: 'rescueToken',
|
|
989
|
+
outputs: [],
|
|
990
|
+
stateMutability: 'nonpayable',
|
|
991
|
+
type: 'function',
|
|
992
|
+
},
|
|
950
993
|
{
|
|
951
994
|
inputs: [],
|
|
952
995
|
name: 'reserveContribution',
|
|
@@ -1032,11 +1075,6 @@ export const PositionV2ABI = [
|
|
|
1032
1075
|
},
|
|
1033
1076
|
{
|
|
1034
1077
|
inputs: [
|
|
1035
|
-
{
|
|
1036
|
-
internalType: 'address',
|
|
1037
|
-
name: 'token',
|
|
1038
|
-
type: 'address',
|
|
1039
|
-
},
|
|
1040
1078
|
{
|
|
1041
1079
|
internalType: 'address',
|
|
1042
1080
|
name: 'target',
|
|
@@ -1048,7 +1086,7 @@ export const PositionV2ABI = [
|
|
|
1048
1086
|
type: 'uint256',
|
|
1049
1087
|
},
|
|
1050
1088
|
],
|
|
1051
|
-
name: '
|
|
1089
|
+
name: 'withdrawCollateral',
|
|
1052
1090
|
outputs: [],
|
|
1053
1091
|
stateMutability: 'nonpayable',
|
|
1054
1092
|
type: 'function',
|
|
@@ -1066,9 +1104,13 @@ export const PositionV2ABI = [
|
|
|
1066
1104
|
type: 'uint256',
|
|
1067
1105
|
},
|
|
1068
1106
|
],
|
|
1069
|
-
name: '
|
|
1107
|
+
name: 'withdrawCollateralAsNative',
|
|
1070
1108
|
outputs: [],
|
|
1071
1109
|
stateMutability: 'nonpayable',
|
|
1072
1110
|
type: 'function',
|
|
1073
1111
|
},
|
|
1112
|
+
{
|
|
1113
|
+
stateMutability: 'payable',
|
|
1114
|
+
type: 'receive',
|
|
1115
|
+
},
|
|
1074
1116
|
] as const;
|
|
@@ -12,7 +12,7 @@ export const MintingHubGatewayABI = [
|
|
|
12
12
|
type: 'address',
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
|
-
internalType: 'address',
|
|
15
|
+
internalType: 'address payable',
|
|
16
16
|
name: '_roller',
|
|
17
17
|
type: 'address',
|
|
18
18
|
},
|
|
@@ -26,6 +26,11 @@ export const MintingHubGatewayABI = [
|
|
|
26
26
|
name: '_gateway',
|
|
27
27
|
type: 'address',
|
|
28
28
|
},
|
|
29
|
+
{
|
|
30
|
+
internalType: 'address',
|
|
31
|
+
name: '_wcbtc',
|
|
32
|
+
type: 'address',
|
|
33
|
+
},
|
|
29
34
|
],
|
|
30
35
|
stateMutability: 'nonpayable',
|
|
31
36
|
type: 'constructor',
|
|
@@ -81,11 +86,21 @@ export const MintingHubGatewayABI = [
|
|
|
81
86
|
name: 'LeaveNoDust',
|
|
82
87
|
type: 'error',
|
|
83
88
|
},
|
|
89
|
+
{
|
|
90
|
+
inputs: [],
|
|
91
|
+
name: 'NativeOnlyForWCBTC',
|
|
92
|
+
type: 'error',
|
|
93
|
+
},
|
|
84
94
|
{
|
|
85
95
|
inputs: [],
|
|
86
96
|
name: 'UnexpectedPrice',
|
|
87
97
|
type: 'error',
|
|
88
98
|
},
|
|
99
|
+
{
|
|
100
|
+
inputs: [],
|
|
101
|
+
name: 'ValueMismatch',
|
|
102
|
+
type: 'error',
|
|
103
|
+
},
|
|
89
104
|
{
|
|
90
105
|
anonymous: false,
|
|
91
106
|
inputs: [
|
|
@@ -351,6 +366,19 @@ export const MintingHubGatewayABI = [
|
|
|
351
366
|
stateMutability: 'view',
|
|
352
367
|
type: 'function',
|
|
353
368
|
},
|
|
369
|
+
{
|
|
370
|
+
inputs: [],
|
|
371
|
+
name: 'WCBTC',
|
|
372
|
+
outputs: [
|
|
373
|
+
{
|
|
374
|
+
internalType: 'address',
|
|
375
|
+
name: '',
|
|
376
|
+
type: 'address',
|
|
377
|
+
},
|
|
378
|
+
],
|
|
379
|
+
stateMutability: 'view',
|
|
380
|
+
type: 'function',
|
|
381
|
+
},
|
|
354
382
|
{
|
|
355
383
|
inputs: [
|
|
356
384
|
{
|
|
@@ -465,38 +493,9 @@ export const MintingHubGatewayABI = [
|
|
|
465
493
|
inputs: [
|
|
466
494
|
{
|
|
467
495
|
internalType: 'address',
|
|
468
|
-
name: '
|
|
469
|
-
type: 'address',
|
|
470
|
-
},
|
|
471
|
-
{
|
|
472
|
-
internalType: 'uint256',
|
|
473
|
-
name: '_initialCollateral',
|
|
474
|
-
type: 'uint256',
|
|
475
|
-
},
|
|
476
|
-
{
|
|
477
|
-
internalType: 'uint256',
|
|
478
|
-
name: '_initialMint',
|
|
479
|
-
type: 'uint256',
|
|
480
|
-
},
|
|
481
|
-
{
|
|
482
|
-
internalType: 'uint40',
|
|
483
|
-
name: 'expiration',
|
|
484
|
-
type: 'uint40',
|
|
485
|
-
},
|
|
486
|
-
],
|
|
487
|
-
name: 'clone',
|
|
488
|
-
outputs: [
|
|
489
|
-
{
|
|
490
|
-
internalType: 'address',
|
|
491
|
-
name: '',
|
|
496
|
+
name: 'owner',
|
|
492
497
|
type: 'address',
|
|
493
498
|
},
|
|
494
|
-
],
|
|
495
|
-
stateMutability: 'nonpayable',
|
|
496
|
-
type: 'function',
|
|
497
|
-
},
|
|
498
|
-
{
|
|
499
|
-
inputs: [
|
|
500
499
|
{
|
|
501
500
|
internalType: 'address',
|
|
502
501
|
name: 'parent',
|
|
@@ -518,9 +517,9 @@ export const MintingHubGatewayABI = [
|
|
|
518
517
|
type: 'uint40',
|
|
519
518
|
},
|
|
520
519
|
{
|
|
521
|
-
internalType: '
|
|
522
|
-
name: '
|
|
523
|
-
type: '
|
|
520
|
+
internalType: 'uint256',
|
|
521
|
+
name: '_liqPrice',
|
|
522
|
+
type: 'uint256',
|
|
524
523
|
},
|
|
525
524
|
],
|
|
526
525
|
name: 'clone',
|
|
@@ -531,7 +530,7 @@ export const MintingHubGatewayABI = [
|
|
|
531
530
|
type: 'address',
|
|
532
531
|
},
|
|
533
532
|
],
|
|
534
|
-
stateMutability: '
|
|
533
|
+
stateMutability: 'payable',
|
|
535
534
|
type: 'function',
|
|
536
535
|
},
|
|
537
536
|
{
|
|
@@ -561,49 +560,15 @@ export const MintingHubGatewayABI = [
|
|
|
561
560
|
name: 'expiration',
|
|
562
561
|
type: 'uint40',
|
|
563
562
|
},
|
|
564
|
-
{
|
|
565
|
-
internalType: 'bytes32',
|
|
566
|
-
name: 'frontendCode',
|
|
567
|
-
type: 'bytes32',
|
|
568
|
-
},
|
|
569
|
-
],
|
|
570
|
-
name: 'clone',
|
|
571
|
-
outputs: [
|
|
572
|
-
{
|
|
573
|
-
internalType: 'address',
|
|
574
|
-
name: '',
|
|
575
|
-
type: 'address',
|
|
576
|
-
},
|
|
577
|
-
],
|
|
578
|
-
stateMutability: 'nonpayable',
|
|
579
|
-
type: 'function',
|
|
580
|
-
},
|
|
581
|
-
{
|
|
582
|
-
inputs: [
|
|
583
|
-
{
|
|
584
|
-
internalType: 'address',
|
|
585
|
-
name: 'owner',
|
|
586
|
-
type: 'address',
|
|
587
|
-
},
|
|
588
|
-
{
|
|
589
|
-
internalType: 'address',
|
|
590
|
-
name: 'parent',
|
|
591
|
-
type: 'address',
|
|
592
|
-
},
|
|
593
563
|
{
|
|
594
564
|
internalType: 'uint256',
|
|
595
|
-
name: '
|
|
596
|
-
type: 'uint256',
|
|
597
|
-
},
|
|
598
|
-
{
|
|
599
|
-
internalType: 'uint256',
|
|
600
|
-
name: '_initialMint',
|
|
565
|
+
name: '_liqPrice',
|
|
601
566
|
type: 'uint256',
|
|
602
567
|
},
|
|
603
568
|
{
|
|
604
|
-
internalType: '
|
|
605
|
-
name: '
|
|
606
|
-
type: '
|
|
569
|
+
internalType: 'bytes32',
|
|
570
|
+
name: 'frontendCode',
|
|
571
|
+
type: 'bytes32',
|
|
607
572
|
},
|
|
608
573
|
],
|
|
609
574
|
name: 'clone',
|
|
@@ -614,7 +579,7 @@ export const MintingHubGatewayABI = [
|
|
|
614
579
|
type: 'address',
|
|
615
580
|
},
|
|
616
581
|
],
|
|
617
|
-
stateMutability: '
|
|
582
|
+
stateMutability: 'payable',
|
|
618
583
|
type: 'function',
|
|
619
584
|
},
|
|
620
585
|
{
|
|
@@ -710,7 +675,7 @@ export const MintingHubGatewayABI = [
|
|
|
710
675
|
type: 'address',
|
|
711
676
|
},
|
|
712
677
|
],
|
|
713
|
-
stateMutability: '
|
|
678
|
+
stateMutability: 'payable',
|
|
714
679
|
type: 'function',
|
|
715
680
|
},
|
|
716
681
|
{
|
|
@@ -779,7 +744,7 @@ export const MintingHubGatewayABI = [
|
|
|
779
744
|
type: 'address',
|
|
780
745
|
},
|
|
781
746
|
],
|
|
782
|
-
stateMutability: '
|
|
747
|
+
stateMutability: 'payable',
|
|
783
748
|
type: 'function',
|
|
784
749
|
},
|
|
785
750
|
{
|
|
@@ -12,7 +12,7 @@ export const MintingHubV2ABI = [
|
|
|
12
12
|
type: 'address',
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
|
-
internalType: 'address',
|
|
15
|
+
internalType: 'address payable',
|
|
16
16
|
name: '_roller',
|
|
17
17
|
type: 'address',
|
|
18
18
|
},
|
|
@@ -21,6 +21,11 @@ export const MintingHubV2ABI = [
|
|
|
21
21
|
name: '_factory',
|
|
22
22
|
type: 'address',
|
|
23
23
|
},
|
|
24
|
+
{
|
|
25
|
+
internalType: 'address',
|
|
26
|
+
name: '_wcbtc',
|
|
27
|
+
type: 'address',
|
|
28
|
+
},
|
|
24
29
|
],
|
|
25
30
|
stateMutability: 'nonpayable',
|
|
26
31
|
type: 'constructor',
|
|
@@ -76,11 +81,21 @@ export const MintingHubV2ABI = [
|
|
|
76
81
|
name: 'LeaveNoDust',
|
|
77
82
|
type: 'error',
|
|
78
83
|
},
|
|
84
|
+
{
|
|
85
|
+
inputs: [],
|
|
86
|
+
name: 'NativeOnlyForWCBTC',
|
|
87
|
+
type: 'error',
|
|
88
|
+
},
|
|
79
89
|
{
|
|
80
90
|
inputs: [],
|
|
81
91
|
name: 'UnexpectedPrice',
|
|
82
92
|
type: 'error',
|
|
83
93
|
},
|
|
94
|
+
{
|
|
95
|
+
inputs: [],
|
|
96
|
+
name: 'ValueMismatch',
|
|
97
|
+
type: 'error',
|
|
98
|
+
},
|
|
84
99
|
{
|
|
85
100
|
anonymous: false,
|
|
86
101
|
inputs: [
|
|
@@ -333,6 +348,19 @@ export const MintingHubV2ABI = [
|
|
|
333
348
|
stateMutability: 'view',
|
|
334
349
|
type: 'function',
|
|
335
350
|
},
|
|
351
|
+
{
|
|
352
|
+
inputs: [],
|
|
353
|
+
name: 'WCBTC',
|
|
354
|
+
outputs: [
|
|
355
|
+
{
|
|
356
|
+
internalType: 'address',
|
|
357
|
+
name: '',
|
|
358
|
+
type: 'address',
|
|
359
|
+
},
|
|
360
|
+
],
|
|
361
|
+
stateMutability: 'view',
|
|
362
|
+
type: 'function',
|
|
363
|
+
},
|
|
336
364
|
{
|
|
337
365
|
inputs: [
|
|
338
366
|
{
|
|
@@ -443,40 +471,6 @@ export const MintingHubV2ABI = [
|
|
|
443
471
|
stateMutability: 'view',
|
|
444
472
|
type: 'function',
|
|
445
473
|
},
|
|
446
|
-
{
|
|
447
|
-
inputs: [
|
|
448
|
-
{
|
|
449
|
-
internalType: 'address',
|
|
450
|
-
name: 'parent',
|
|
451
|
-
type: 'address',
|
|
452
|
-
},
|
|
453
|
-
{
|
|
454
|
-
internalType: 'uint256',
|
|
455
|
-
name: '_initialCollateral',
|
|
456
|
-
type: 'uint256',
|
|
457
|
-
},
|
|
458
|
-
{
|
|
459
|
-
internalType: 'uint256',
|
|
460
|
-
name: '_initialMint',
|
|
461
|
-
type: 'uint256',
|
|
462
|
-
},
|
|
463
|
-
{
|
|
464
|
-
internalType: 'uint40',
|
|
465
|
-
name: 'expiration',
|
|
466
|
-
type: 'uint40',
|
|
467
|
-
},
|
|
468
|
-
],
|
|
469
|
-
name: 'clone',
|
|
470
|
-
outputs: [
|
|
471
|
-
{
|
|
472
|
-
internalType: 'address',
|
|
473
|
-
name: '',
|
|
474
|
-
type: 'address',
|
|
475
|
-
},
|
|
476
|
-
],
|
|
477
|
-
stateMutability: 'nonpayable',
|
|
478
|
-
type: 'function',
|
|
479
|
-
},
|
|
480
474
|
{
|
|
481
475
|
inputs: [
|
|
482
476
|
{
|
|
@@ -504,6 +498,11 @@ export const MintingHubV2ABI = [
|
|
|
504
498
|
name: 'expiration',
|
|
505
499
|
type: 'uint40',
|
|
506
500
|
},
|
|
501
|
+
{
|
|
502
|
+
internalType: 'uint256',
|
|
503
|
+
name: '_liqPrice',
|
|
504
|
+
type: 'uint256',
|
|
505
|
+
},
|
|
507
506
|
],
|
|
508
507
|
name: 'clone',
|
|
509
508
|
outputs: [
|
|
@@ -513,7 +512,7 @@ export const MintingHubV2ABI = [
|
|
|
513
512
|
type: 'address',
|
|
514
513
|
},
|
|
515
514
|
],
|
|
516
|
-
stateMutability: '
|
|
515
|
+
stateMutability: 'payable',
|
|
517
516
|
type: 'function',
|
|
518
517
|
},
|
|
519
518
|
{
|
|
@@ -596,7 +595,7 @@ export const MintingHubV2ABI = [
|
|
|
596
595
|
type: 'address',
|
|
597
596
|
},
|
|
598
597
|
],
|
|
599
|
-
stateMutability: '
|
|
598
|
+
stateMutability: 'payable',
|
|
600
599
|
type: 'function',
|
|
601
600
|
},
|
|
602
601
|
{
|
|
@@ -7,7 +7,6 @@ export interface ChainAddress {
|
|
|
7
7
|
savingsGateway: Address;
|
|
8
8
|
savingsVaultJUSD: Address;
|
|
9
9
|
mintingHubGateway: Address;
|
|
10
|
-
coinLendingGateway: Address;
|
|
11
10
|
bridgeStartUSD: Address;
|
|
12
11
|
startUSD: Address;
|
|
13
12
|
roller: Address;
|
|
@@ -25,23 +24,21 @@ export const ADDRESS: Record<number, ChainAddress> = {
|
|
|
25
24
|
savingsGateway: zeroAddress,
|
|
26
25
|
savingsVaultJUSD: zeroAddress,
|
|
27
26
|
mintingHubGateway: zeroAddress,
|
|
28
|
-
coinLendingGateway: zeroAddress,
|
|
29
27
|
bridgeStartUSD: zeroAddress,
|
|
30
28
|
startUSD: zeroAddress,
|
|
31
29
|
roller: zeroAddress,
|
|
32
30
|
positionFactoryV2: zeroAddress,
|
|
33
31
|
},
|
|
34
32
|
5115: {
|
|
35
|
-
juiceDollar: "
|
|
36
|
-
equity: "
|
|
37
|
-
frontendGateway: "
|
|
38
|
-
savingsGateway: "
|
|
39
|
-
savingsVaultJUSD: "
|
|
40
|
-
mintingHubGateway: "
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
positionFactoryV2: "0x171dAe92afc8AC3D581178163a1F993533a94c4B",
|
|
33
|
+
juiceDollar: "0x2742bb39221434bbfcac81959C8367fDE5d83ce9",
|
|
34
|
+
equity: "0xD6B9d4600C45eC4388e45A474C1C153828B7C018",
|
|
35
|
+
frontendGateway: "0x52C2d93DAC83Da412D93D035b017486DecCE782A",
|
|
36
|
+
savingsGateway: "0x2e1697e7BaA6CE62B0c36B015B7a5BEC6157B99e",
|
|
37
|
+
savingsVaultJUSD: "0x45DA5a722b591bBce0b87B192d846AB85EFA88d3",
|
|
38
|
+
mintingHubGateway: "0x57c4aB0f9480AC52a58C820a58ad802B0D4c23EB",
|
|
39
|
+
bridgeStartUSD: "0x8c5e5594c05205454BC09487ad53db4e4DB6564D",
|
|
40
|
+
startUSD: "0xa37f823Bd1bae4379265A4fF9cD5a68f402dE2f5",
|
|
41
|
+
roller: "0xB9B5f670A19E345fFb82D91e699a3f917E237f55",
|
|
42
|
+
positionFactoryV2: "0x70dDC84C79B724b247C10BB9a11Bd98c08Ee3C1a",
|
|
46
43
|
},
|
|
47
44
|
};
|
package/exports/index.ts
CHANGED
|
@@ -8,7 +8,6 @@ export * from "./abis/core/FrontendGateway";
|
|
|
8
8
|
export * from "./abis/core/MintingHubGateway";
|
|
9
9
|
export * from "./abis/core/SavingsGateway";
|
|
10
10
|
export * from "./abis/core/SavingsVaultJUSD";
|
|
11
|
-
export * from "./abis/core/CoinLendingGateway";
|
|
12
11
|
|
|
13
12
|
export * from "./abis/MintingHubV2/PositionFactoryV2";
|
|
14
13
|
export * from "./abis/MintingHubV2/PositionRoller";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juicedollar/jusd",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "JuiceDollar (JUSD) - Oracle-free, Bitcoin-collateralized stablecoin on Citrea. Decentralized minting with democratic governance.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|