@juicedollar/jusd 1.0.3 → 1.0.5
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 +123 -19
- package/contracts/MintingHubV2/PositionRoller.sol +160 -43
- package/contracts/MintingHubV2/interface/IMintingHub.sol +9 -1
- package/contracts/gateway/MintingHubGateway.sol +1 -1
- package/contracts/test/PositionExpirationTest.sol +1 -1
- package/contracts/test/PositionRollingTest.sol +1 -1
- package/dist/index.d.mts +213 -18
- package/dist/index.d.ts +213 -18
- package/dist/index.js +282 -32
- package/dist/index.mjs +282 -32
- package/exports/abis/MintingHubV2/PositionRoller.ts +90 -18
- package/exports/abis/core/MintingHubGateway.ts +91 -2
- package/exports/abis/utils/MintingHubV2.ts +91 -2
- package/exports/address.config.ts +10 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -59,16 +59,16 @@ var ADDRESS = {
|
|
|
59
59
|
positionFactoryV2: import_viem.zeroAddress
|
|
60
60
|
},
|
|
61
61
|
5115: {
|
|
62
|
-
juiceDollar: "
|
|
63
|
-
equity: "
|
|
64
|
-
frontendGateway: "
|
|
65
|
-
savingsGateway: "
|
|
66
|
-
savingsVaultJUSD: "
|
|
67
|
-
mintingHubGateway: "
|
|
68
|
-
bridgeStartUSD: "
|
|
69
|
-
startUSD: "
|
|
70
|
-
roller: "
|
|
71
|
-
positionFactoryV2: "
|
|
62
|
+
juiceDollar: "0xFdB0a83d94CD65151148a131167Eb499Cb85d015",
|
|
63
|
+
equity: "0x7b2A560bf72B0Dd2EAbE3271F829C2597c8420d5",
|
|
64
|
+
frontendGateway: "0x3EB394f950abf90aC78127C0f4c78545E0eD3DFe",
|
|
65
|
+
savingsGateway: "0xbfE44EE0471D0cF4759B97A458240f26c2D340Ca",
|
|
66
|
+
savingsVaultJUSD: "0x9580498224551E3f2e3A04330a684BF025111C53",
|
|
67
|
+
mintingHubGateway: "0x372368ca530B4d55622c24E28F0347e26caDc64A",
|
|
68
|
+
bridgeStartUSD: "0x25F8599Be1D25501212b20bD72DF1caA97b496b1",
|
|
69
|
+
startUSD: "0xDFa3153E1eDa84F966BD01bc4C6D9A4FF36AcAeA",
|
|
70
|
+
roller: "0x09d24251654e5B89d5fcd35d087f0CB4163471aC",
|
|
71
|
+
positionFactoryV2: "0xB22a0701237a226d17aE0C4FE8263Edf5Be5f20d"
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
|
|
@@ -3651,7 +3651,7 @@ var MintingHubGatewayABI = [
|
|
|
3651
3651
|
type: "address"
|
|
3652
3652
|
},
|
|
3653
3653
|
{
|
|
3654
|
-
internalType: "address",
|
|
3654
|
+
internalType: "address payable",
|
|
3655
3655
|
name: "_roller",
|
|
3656
3656
|
type: "address"
|
|
3657
3657
|
},
|
|
@@ -3730,6 +3730,11 @@ var MintingHubGatewayABI = [
|
|
|
3730
3730
|
name: "NativeOnlyForWCBTC",
|
|
3731
3731
|
type: "error"
|
|
3732
3732
|
},
|
|
3733
|
+
{
|
|
3734
|
+
inputs: [],
|
|
3735
|
+
name: "NativeTransferFailed",
|
|
3736
|
+
type: "error"
|
|
3737
|
+
},
|
|
3733
3738
|
{
|
|
3734
3739
|
inputs: [],
|
|
3735
3740
|
name: "UnexpectedPrice",
|
|
@@ -4041,6 +4046,34 @@ var MintingHubGatewayABI = [
|
|
|
4041
4046
|
stateMutability: "nonpayable",
|
|
4042
4047
|
type: "function"
|
|
4043
4048
|
},
|
|
4049
|
+
{
|
|
4050
|
+
inputs: [
|
|
4051
|
+
{
|
|
4052
|
+
internalType: "uint32",
|
|
4053
|
+
name: "_challengeNumber",
|
|
4054
|
+
type: "uint32"
|
|
4055
|
+
},
|
|
4056
|
+
{
|
|
4057
|
+
internalType: "uint256",
|
|
4058
|
+
name: "size",
|
|
4059
|
+
type: "uint256"
|
|
4060
|
+
},
|
|
4061
|
+
{
|
|
4062
|
+
internalType: "bool",
|
|
4063
|
+
name: "postponeCollateralReturn",
|
|
4064
|
+
type: "bool"
|
|
4065
|
+
},
|
|
4066
|
+
{
|
|
4067
|
+
internalType: "bool",
|
|
4068
|
+
name: "returnCollateralAsNative",
|
|
4069
|
+
type: "bool"
|
|
4070
|
+
}
|
|
4071
|
+
],
|
|
4072
|
+
name: "bid",
|
|
4073
|
+
outputs: [],
|
|
4074
|
+
stateMutability: "nonpayable",
|
|
4075
|
+
type: "function"
|
|
4076
|
+
},
|
|
4044
4077
|
{
|
|
4045
4078
|
inputs: [
|
|
4046
4079
|
{
|
|
@@ -4065,6 +4098,35 @@ var MintingHubGatewayABI = [
|
|
|
4065
4098
|
stateMutability: "nonpayable",
|
|
4066
4099
|
type: "function"
|
|
4067
4100
|
},
|
|
4101
|
+
{
|
|
4102
|
+
inputs: [
|
|
4103
|
+
{
|
|
4104
|
+
internalType: "contract IPosition",
|
|
4105
|
+
name: "pos",
|
|
4106
|
+
type: "address"
|
|
4107
|
+
},
|
|
4108
|
+
{
|
|
4109
|
+
internalType: "uint256",
|
|
4110
|
+
name: "upToAmount",
|
|
4111
|
+
type: "uint256"
|
|
4112
|
+
},
|
|
4113
|
+
{
|
|
4114
|
+
internalType: "bool",
|
|
4115
|
+
name: "receiveAsNative",
|
|
4116
|
+
type: "bool"
|
|
4117
|
+
}
|
|
4118
|
+
],
|
|
4119
|
+
name: "buyExpiredCollateral",
|
|
4120
|
+
outputs: [
|
|
4121
|
+
{
|
|
4122
|
+
internalType: "uint256",
|
|
4123
|
+
name: "",
|
|
4124
|
+
type: "uint256"
|
|
4125
|
+
}
|
|
4126
|
+
],
|
|
4127
|
+
stateMutability: "nonpayable",
|
|
4128
|
+
type: "function"
|
|
4129
|
+
},
|
|
4068
4130
|
{
|
|
4069
4131
|
inputs: [
|
|
4070
4132
|
{
|
|
@@ -4091,7 +4153,7 @@ var MintingHubGatewayABI = [
|
|
|
4091
4153
|
type: "uint256"
|
|
4092
4154
|
}
|
|
4093
4155
|
],
|
|
4094
|
-
stateMutability: "
|
|
4156
|
+
stateMutability: "payable",
|
|
4095
4157
|
type: "function"
|
|
4096
4158
|
},
|
|
4097
4159
|
{
|
|
@@ -4429,6 +4491,29 @@ var MintingHubGatewayABI = [
|
|
|
4429
4491
|
stateMutability: "view",
|
|
4430
4492
|
type: "function"
|
|
4431
4493
|
},
|
|
4494
|
+
{
|
|
4495
|
+
inputs: [
|
|
4496
|
+
{
|
|
4497
|
+
internalType: "address",
|
|
4498
|
+
name: "collateral",
|
|
4499
|
+
type: "address"
|
|
4500
|
+
},
|
|
4501
|
+
{
|
|
4502
|
+
internalType: "address",
|
|
4503
|
+
name: "target",
|
|
4504
|
+
type: "address"
|
|
4505
|
+
},
|
|
4506
|
+
{
|
|
4507
|
+
internalType: "bool",
|
|
4508
|
+
name: "asNative",
|
|
4509
|
+
type: "bool"
|
|
4510
|
+
}
|
|
4511
|
+
],
|
|
4512
|
+
name: "returnPostponedCollateral",
|
|
4513
|
+
outputs: [],
|
|
4514
|
+
stateMutability: "nonpayable",
|
|
4515
|
+
type: "function"
|
|
4516
|
+
},
|
|
4432
4517
|
{
|
|
4433
4518
|
inputs: [
|
|
4434
4519
|
{
|
|
@@ -4465,6 +4550,10 @@ var MintingHubGatewayABI = [
|
|
|
4465
4550
|
],
|
|
4466
4551
|
stateMutability: "view",
|
|
4467
4552
|
type: "function"
|
|
4553
|
+
},
|
|
4554
|
+
{
|
|
4555
|
+
stateMutability: "payable",
|
|
4556
|
+
type: "receive"
|
|
4468
4557
|
}
|
|
4469
4558
|
];
|
|
4470
4559
|
|
|
@@ -6057,24 +6146,8 @@ var PositionRollerABI = [
|
|
|
6057
6146
|
type: "constructor"
|
|
6058
6147
|
},
|
|
6059
6148
|
{
|
|
6060
|
-
inputs: [
|
|
6061
|
-
|
|
6062
|
-
internalType: "uint256",
|
|
6063
|
-
name: "",
|
|
6064
|
-
type: "uint256"
|
|
6065
|
-
},
|
|
6066
|
-
{
|
|
6067
|
-
internalType: "uint256",
|
|
6068
|
-
name: "",
|
|
6069
|
-
type: "uint256"
|
|
6070
|
-
},
|
|
6071
|
-
{
|
|
6072
|
-
internalType: "uint256",
|
|
6073
|
-
name: "",
|
|
6074
|
-
type: "uint256"
|
|
6075
|
-
}
|
|
6076
|
-
],
|
|
6077
|
-
name: "Log",
|
|
6149
|
+
inputs: [],
|
|
6150
|
+
name: "NativeTransferFailed",
|
|
6078
6151
|
type: "error"
|
|
6079
6152
|
},
|
|
6080
6153
|
{
|
|
@@ -6203,6 +6276,47 @@ var PositionRollerABI = [
|
|
|
6203
6276
|
stateMutability: "nonpayable",
|
|
6204
6277
|
type: "function"
|
|
6205
6278
|
},
|
|
6279
|
+
{
|
|
6280
|
+
inputs: [
|
|
6281
|
+
{
|
|
6282
|
+
internalType: "contract IPosition",
|
|
6283
|
+
name: "source",
|
|
6284
|
+
type: "address"
|
|
6285
|
+
},
|
|
6286
|
+
{
|
|
6287
|
+
internalType: "contract IPosition",
|
|
6288
|
+
name: "target",
|
|
6289
|
+
type: "address"
|
|
6290
|
+
}
|
|
6291
|
+
],
|
|
6292
|
+
name: "rollFullyNative",
|
|
6293
|
+
outputs: [],
|
|
6294
|
+
stateMutability: "payable",
|
|
6295
|
+
type: "function"
|
|
6296
|
+
},
|
|
6297
|
+
{
|
|
6298
|
+
inputs: [
|
|
6299
|
+
{
|
|
6300
|
+
internalType: "contract IPosition",
|
|
6301
|
+
name: "source",
|
|
6302
|
+
type: "address"
|
|
6303
|
+
},
|
|
6304
|
+
{
|
|
6305
|
+
internalType: "contract IPosition",
|
|
6306
|
+
name: "target",
|
|
6307
|
+
type: "address"
|
|
6308
|
+
},
|
|
6309
|
+
{
|
|
6310
|
+
internalType: "uint40",
|
|
6311
|
+
name: "expiration",
|
|
6312
|
+
type: "uint40"
|
|
6313
|
+
}
|
|
6314
|
+
],
|
|
6315
|
+
name: "rollFullyNativeWithExpiration",
|
|
6316
|
+
outputs: [],
|
|
6317
|
+
stateMutability: "payable",
|
|
6318
|
+
type: "function"
|
|
6319
|
+
},
|
|
6206
6320
|
{
|
|
6207
6321
|
inputs: [
|
|
6208
6322
|
{
|
|
@@ -6225,6 +6339,53 @@ var PositionRollerABI = [
|
|
|
6225
6339
|
outputs: [],
|
|
6226
6340
|
stateMutability: "nonpayable",
|
|
6227
6341
|
type: "function"
|
|
6342
|
+
},
|
|
6343
|
+
{
|
|
6344
|
+
inputs: [
|
|
6345
|
+
{
|
|
6346
|
+
internalType: "contract IPosition",
|
|
6347
|
+
name: "source",
|
|
6348
|
+
type: "address"
|
|
6349
|
+
},
|
|
6350
|
+
{
|
|
6351
|
+
internalType: "uint256",
|
|
6352
|
+
name: "repay",
|
|
6353
|
+
type: "uint256"
|
|
6354
|
+
},
|
|
6355
|
+
{
|
|
6356
|
+
internalType: "uint256",
|
|
6357
|
+
name: "collWithdraw",
|
|
6358
|
+
type: "uint256"
|
|
6359
|
+
},
|
|
6360
|
+
{
|
|
6361
|
+
internalType: "contract IPosition",
|
|
6362
|
+
name: "target",
|
|
6363
|
+
type: "address"
|
|
6364
|
+
},
|
|
6365
|
+
{
|
|
6366
|
+
internalType: "uint256",
|
|
6367
|
+
name: "mint",
|
|
6368
|
+
type: "uint256"
|
|
6369
|
+
},
|
|
6370
|
+
{
|
|
6371
|
+
internalType: "uint256",
|
|
6372
|
+
name: "collDeposit",
|
|
6373
|
+
type: "uint256"
|
|
6374
|
+
},
|
|
6375
|
+
{
|
|
6376
|
+
internalType: "uint40",
|
|
6377
|
+
name: "expiration",
|
|
6378
|
+
type: "uint40"
|
|
6379
|
+
}
|
|
6380
|
+
],
|
|
6381
|
+
name: "rollNative",
|
|
6382
|
+
outputs: [],
|
|
6383
|
+
stateMutability: "payable",
|
|
6384
|
+
type: "function"
|
|
6385
|
+
},
|
|
6386
|
+
{
|
|
6387
|
+
stateMutability: "payable",
|
|
6388
|
+
type: "receive"
|
|
6228
6389
|
}
|
|
6229
6390
|
];
|
|
6230
6391
|
|
|
@@ -9618,7 +9779,7 @@ var MintingHubV2ABI = [
|
|
|
9618
9779
|
type: "address"
|
|
9619
9780
|
},
|
|
9620
9781
|
{
|
|
9621
|
-
internalType: "address",
|
|
9782
|
+
internalType: "address payable",
|
|
9622
9783
|
name: "_roller",
|
|
9623
9784
|
type: "address"
|
|
9624
9785
|
},
|
|
@@ -9692,6 +9853,11 @@ var MintingHubV2ABI = [
|
|
|
9692
9853
|
name: "NativeOnlyForWCBTC",
|
|
9693
9854
|
type: "error"
|
|
9694
9855
|
},
|
|
9856
|
+
{
|
|
9857
|
+
inputs: [],
|
|
9858
|
+
name: "NativeTransferFailed",
|
|
9859
|
+
type: "error"
|
|
9860
|
+
},
|
|
9695
9861
|
{
|
|
9696
9862
|
inputs: [],
|
|
9697
9863
|
name: "UnexpectedPrice",
|
|
@@ -9990,6 +10156,58 @@ var MintingHubV2ABI = [
|
|
|
9990
10156
|
stateMutability: "nonpayable",
|
|
9991
10157
|
type: "function"
|
|
9992
10158
|
},
|
|
10159
|
+
{
|
|
10160
|
+
inputs: [
|
|
10161
|
+
{
|
|
10162
|
+
internalType: "uint32",
|
|
10163
|
+
name: "_challengeNumber",
|
|
10164
|
+
type: "uint32"
|
|
10165
|
+
},
|
|
10166
|
+
{
|
|
10167
|
+
internalType: "uint256",
|
|
10168
|
+
name: "size",
|
|
10169
|
+
type: "uint256"
|
|
10170
|
+
},
|
|
10171
|
+
{
|
|
10172
|
+
internalType: "bool",
|
|
10173
|
+
name: "postponeCollateralReturn",
|
|
10174
|
+
type: "bool"
|
|
10175
|
+
},
|
|
10176
|
+
{
|
|
10177
|
+
internalType: "bool",
|
|
10178
|
+
name: "returnCollateralAsNative",
|
|
10179
|
+
type: "bool"
|
|
10180
|
+
}
|
|
10181
|
+
],
|
|
10182
|
+
name: "bid",
|
|
10183
|
+
outputs: [],
|
|
10184
|
+
stateMutability: "nonpayable",
|
|
10185
|
+
type: "function"
|
|
10186
|
+
},
|
|
10187
|
+
{
|
|
10188
|
+
inputs: [
|
|
10189
|
+
{
|
|
10190
|
+
internalType: "contract IPosition",
|
|
10191
|
+
name: "pos",
|
|
10192
|
+
type: "address"
|
|
10193
|
+
},
|
|
10194
|
+
{
|
|
10195
|
+
internalType: "uint256",
|
|
10196
|
+
name: "upToAmount",
|
|
10197
|
+
type: "uint256"
|
|
10198
|
+
}
|
|
10199
|
+
],
|
|
10200
|
+
name: "buyExpiredCollateral",
|
|
10201
|
+
outputs: [
|
|
10202
|
+
{
|
|
10203
|
+
internalType: "uint256",
|
|
10204
|
+
name: "",
|
|
10205
|
+
type: "uint256"
|
|
10206
|
+
}
|
|
10207
|
+
],
|
|
10208
|
+
stateMutability: "nonpayable",
|
|
10209
|
+
type: "function"
|
|
10210
|
+
},
|
|
9993
10211
|
{
|
|
9994
10212
|
inputs: [
|
|
9995
10213
|
{
|
|
@@ -10001,6 +10219,11 @@ var MintingHubV2ABI = [
|
|
|
10001
10219
|
internalType: "uint256",
|
|
10002
10220
|
name: "upToAmount",
|
|
10003
10221
|
type: "uint256"
|
|
10222
|
+
},
|
|
10223
|
+
{
|
|
10224
|
+
internalType: "bool",
|
|
10225
|
+
name: "receiveAsNative",
|
|
10226
|
+
type: "bool"
|
|
10004
10227
|
}
|
|
10005
10228
|
],
|
|
10006
10229
|
name: "buyExpiredCollateral",
|
|
@@ -10040,7 +10263,7 @@ var MintingHubV2ABI = [
|
|
|
10040
10263
|
type: "uint256"
|
|
10041
10264
|
}
|
|
10042
10265
|
],
|
|
10043
|
-
stateMutability: "
|
|
10266
|
+
stateMutability: "payable",
|
|
10044
10267
|
type: "function"
|
|
10045
10268
|
},
|
|
10046
10269
|
{
|
|
@@ -10247,6 +10470,29 @@ var MintingHubV2ABI = [
|
|
|
10247
10470
|
stateMutability: "view",
|
|
10248
10471
|
type: "function"
|
|
10249
10472
|
},
|
|
10473
|
+
{
|
|
10474
|
+
inputs: [
|
|
10475
|
+
{
|
|
10476
|
+
internalType: "address",
|
|
10477
|
+
name: "collateral",
|
|
10478
|
+
type: "address"
|
|
10479
|
+
},
|
|
10480
|
+
{
|
|
10481
|
+
internalType: "address",
|
|
10482
|
+
name: "target",
|
|
10483
|
+
type: "address"
|
|
10484
|
+
},
|
|
10485
|
+
{
|
|
10486
|
+
internalType: "bool",
|
|
10487
|
+
name: "asNative",
|
|
10488
|
+
type: "bool"
|
|
10489
|
+
}
|
|
10490
|
+
],
|
|
10491
|
+
name: "returnPostponedCollateral",
|
|
10492
|
+
outputs: [],
|
|
10493
|
+
stateMutability: "nonpayable",
|
|
10494
|
+
type: "function"
|
|
10495
|
+
},
|
|
10250
10496
|
{
|
|
10251
10497
|
inputs: [
|
|
10252
10498
|
{
|
|
@@ -10283,6 +10529,10 @@ var MintingHubV2ABI = [
|
|
|
10283
10529
|
],
|
|
10284
10530
|
stateMutability: "view",
|
|
10285
10531
|
type: "function"
|
|
10532
|
+
},
|
|
10533
|
+
{
|
|
10534
|
+
stateMutability: "payable",
|
|
10535
|
+
type: "receive"
|
|
10286
10536
|
}
|
|
10287
10537
|
];
|
|
10288
10538
|
|