@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/dist/index.js CHANGED
@@ -21,7 +21,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var exports_exports = {};
22
22
  __export(exports_exports, {
23
23
  ADDRESS: () => ADDRESS,
24
- CoinLendingGatewayABI: () => CoinLendingGatewayABI,
25
24
  ERC20ABI: () => ERC20ABI,
26
25
  ERC20PermitLightABI: () => ERC20PermitLightABI,
27
26
  EquityABI: () => EquityABI,
@@ -54,24 +53,22 @@ var ADDRESS = {
54
53
  savingsGateway: import_viem.zeroAddress,
55
54
  savingsVaultJUSD: import_viem.zeroAddress,
56
55
  mintingHubGateway: import_viem.zeroAddress,
57
- coinLendingGateway: import_viem.zeroAddress,
58
56
  bridgeStartUSD: import_viem.zeroAddress,
59
57
  startUSD: import_viem.zeroAddress,
60
58
  roller: import_viem.zeroAddress,
61
59
  positionFactoryV2: import_viem.zeroAddress
62
60
  },
63
61
  5115: {
64
- juiceDollar: "0x258e525B6F9f62195478fe94d14AE20178AB2545",
65
- equity: "0xDd965FCdcb4022414204B9BDc5dF949c2761e7Cc",
66
- frontendGateway: "0xA9DAD130a5744Bc6DBD7151e184352BFfc57BC87",
67
- savingsGateway: "0x71335aa01FB04C234B7CfA72361d7CdC355fE097",
68
- savingsVaultJUSD: "0xA049fc273034D44515A81A564c8F43400B3f77B3",
69
- mintingHubGateway: "0xF2D5F2F3fA1d048284a9d669805478F8ad677e5a",
70
- coinLendingGateway: "0x16c530290662Dc04Dba3040e5e6EBD8e7D3bfe03",
71
- bridgeStartUSD: "0x568965b5f8Fa9e6EE56b670e684F85b277545EFE",
72
- startUSD: "0xD4A183699d0AbCf774b1ea23CDfC0B4b1d5cB30f",
73
- roller: "0x2017C636AA98c7BAAAa68b48195d31Ef5869e37C",
74
- positionFactoryV2: "0x171dAe92afc8AC3D581178163a1F993533a94c4B"
62
+ juiceDollar: "0x2742bb39221434bbfcac81959C8367fDE5d83ce9",
63
+ equity: "0xD6B9d4600C45eC4388e45A474C1C153828B7C018",
64
+ frontendGateway: "0x52C2d93DAC83Da412D93D035b017486DecCE782A",
65
+ savingsGateway: "0x2e1697e7BaA6CE62B0c36B015B7a5BEC6157B99e",
66
+ savingsVaultJUSD: "0x45DA5a722b591bBce0b87B192d846AB85EFA88d3",
67
+ mintingHubGateway: "0x57c4aB0f9480AC52a58C820a58ad802B0D4c23EB",
68
+ bridgeStartUSD: "0x8c5e5594c05205454BC09487ad53db4e4DB6564D",
69
+ startUSD: "0xa37f823Bd1bae4379265A4fF9cD5a68f402dE2f5",
70
+ roller: "0xB9B5f670A19E345fFb82D91e699a3f917E237f55",
71
+ positionFactoryV2: "0x70dDC84C79B724b247C10BB9a11Bd98c08Ee3C1a"
75
72
  }
76
73
  };
77
74
 
@@ -3654,7 +3651,7 @@ var MintingHubGatewayABI = [
3654
3651
  type: "address"
3655
3652
  },
3656
3653
  {
3657
- internalType: "address",
3654
+ internalType: "address payable",
3658
3655
  name: "_roller",
3659
3656
  type: "address"
3660
3657
  },
@@ -3667,6 +3664,11 @@ var MintingHubGatewayABI = [
3667
3664
  internalType: "address",
3668
3665
  name: "_gateway",
3669
3666
  type: "address"
3667
+ },
3668
+ {
3669
+ internalType: "address",
3670
+ name: "_wcbtc",
3671
+ type: "address"
3670
3672
  }
3671
3673
  ],
3672
3674
  stateMutability: "nonpayable",
@@ -3723,11 +3725,21 @@ var MintingHubGatewayABI = [
3723
3725
  name: "LeaveNoDust",
3724
3726
  type: "error"
3725
3727
  },
3728
+ {
3729
+ inputs: [],
3730
+ name: "NativeOnlyForWCBTC",
3731
+ type: "error"
3732
+ },
3726
3733
  {
3727
3734
  inputs: [],
3728
3735
  name: "UnexpectedPrice",
3729
3736
  type: "error"
3730
3737
  },
3738
+ {
3739
+ inputs: [],
3740
+ name: "ValueMismatch",
3741
+ type: "error"
3742
+ },
3731
3743
  {
3732
3744
  anonymous: false,
3733
3745
  inputs: [
@@ -3993,6 +4005,19 @@ var MintingHubGatewayABI = [
3993
4005
  stateMutability: "view",
3994
4006
  type: "function"
3995
4007
  },
4008
+ {
4009
+ inputs: [],
4010
+ name: "WCBTC",
4011
+ outputs: [
4012
+ {
4013
+ internalType: "address",
4014
+ name: "",
4015
+ type: "address"
4016
+ }
4017
+ ],
4018
+ stateMutability: "view",
4019
+ type: "function"
4020
+ },
3996
4021
  {
3997
4022
  inputs: [
3998
4023
  {
@@ -4107,38 +4132,9 @@ var MintingHubGatewayABI = [
4107
4132
  inputs: [
4108
4133
  {
4109
4134
  internalType: "address",
4110
- name: "parent",
4135
+ name: "owner",
4111
4136
  type: "address"
4112
4137
  },
4113
- {
4114
- internalType: "uint256",
4115
- name: "_initialCollateral",
4116
- type: "uint256"
4117
- },
4118
- {
4119
- internalType: "uint256",
4120
- name: "_initialMint",
4121
- type: "uint256"
4122
- },
4123
- {
4124
- internalType: "uint40",
4125
- name: "expiration",
4126
- type: "uint40"
4127
- }
4128
- ],
4129
- name: "clone",
4130
- outputs: [
4131
- {
4132
- internalType: "address",
4133
- name: "",
4134
- type: "address"
4135
- }
4136
- ],
4137
- stateMutability: "nonpayable",
4138
- type: "function"
4139
- },
4140
- {
4141
- inputs: [
4142
4138
  {
4143
4139
  internalType: "address",
4144
4140
  name: "parent",
@@ -4160,9 +4156,9 @@ var MintingHubGatewayABI = [
4160
4156
  type: "uint40"
4161
4157
  },
4162
4158
  {
4163
- internalType: "bytes32",
4164
- name: "frontendCode",
4165
- type: "bytes32"
4159
+ internalType: "uint256",
4160
+ name: "_liqPrice",
4161
+ type: "uint256"
4166
4162
  }
4167
4163
  ],
4168
4164
  name: "clone",
@@ -4173,7 +4169,7 @@ var MintingHubGatewayABI = [
4173
4169
  type: "address"
4174
4170
  }
4175
4171
  ],
4176
- stateMutability: "nonpayable",
4172
+ stateMutability: "payable",
4177
4173
  type: "function"
4178
4174
  },
4179
4175
  {
@@ -4203,49 +4199,15 @@ var MintingHubGatewayABI = [
4203
4199
  name: "expiration",
4204
4200
  type: "uint40"
4205
4201
  },
4206
- {
4207
- internalType: "bytes32",
4208
- name: "frontendCode",
4209
- type: "bytes32"
4210
- }
4211
- ],
4212
- name: "clone",
4213
- outputs: [
4214
- {
4215
- internalType: "address",
4216
- name: "",
4217
- type: "address"
4218
- }
4219
- ],
4220
- stateMutability: "nonpayable",
4221
- type: "function"
4222
- },
4223
- {
4224
- inputs: [
4225
- {
4226
- internalType: "address",
4227
- name: "owner",
4228
- type: "address"
4229
- },
4230
- {
4231
- internalType: "address",
4232
- name: "parent",
4233
- type: "address"
4234
- },
4235
- {
4236
- internalType: "uint256",
4237
- name: "_initialCollateral",
4238
- type: "uint256"
4239
- },
4240
4202
  {
4241
4203
  internalType: "uint256",
4242
- name: "_initialMint",
4204
+ name: "_liqPrice",
4243
4205
  type: "uint256"
4244
4206
  },
4245
4207
  {
4246
- internalType: "uint40",
4247
- name: "expiration",
4248
- type: "uint40"
4208
+ internalType: "bytes32",
4209
+ name: "frontendCode",
4210
+ type: "bytes32"
4249
4211
  }
4250
4212
  ],
4251
4213
  name: "clone",
@@ -4256,7 +4218,7 @@ var MintingHubGatewayABI = [
4256
4218
  type: "address"
4257
4219
  }
4258
4220
  ],
4259
- stateMutability: "nonpayable",
4221
+ stateMutability: "payable",
4260
4222
  type: "function"
4261
4223
  },
4262
4224
  {
@@ -4352,7 +4314,7 @@ var MintingHubGatewayABI = [
4352
4314
  type: "address"
4353
4315
  }
4354
4316
  ],
4355
- stateMutability: "nonpayable",
4317
+ stateMutability: "payable",
4356
4318
  type: "function"
4357
4319
  },
4358
4320
  {
@@ -4421,7 +4383,7 @@ var MintingHubGatewayABI = [
4421
4383
  type: "address"
4422
4384
  }
4423
4385
  ],
4424
- stateMutability: "nonpayable",
4386
+ stateMutability: "payable",
4425
4387
  type: "function"
4426
4388
  },
4427
4389
  {
@@ -5989,506 +5951,77 @@ var SavingsVaultJUSDABI = [
5989
5951
  }
5990
5952
  ];
5991
5953
 
5992
- // exports/abis/core/CoinLendingGateway.ts
5993
- var CoinLendingGatewayABI = [
5954
+ // exports/abis/MintingHubV2/PositionFactoryV2.ts
5955
+ var PositionFactoryV2ABI = [
5994
5956
  {
5995
5957
  inputs: [
5996
5958
  {
5997
5959
  internalType: "address",
5998
- name: "_mintingHub",
5999
- type: "address"
6000
- },
6001
- {
6002
- internalType: "address",
6003
- name: "_wcbtc",
5960
+ name: "_parent",
6004
5961
  type: "address"
6005
- },
5962
+ }
5963
+ ],
5964
+ name: "clonePosition",
5965
+ outputs: [
6006
5966
  {
6007
5967
  internalType: "address",
6008
- name: "_jusd",
5968
+ name: "",
6009
5969
  type: "address"
6010
5970
  }
6011
5971
  ],
6012
5972
  stateMutability: "nonpayable",
6013
- type: "constructor"
6014
- },
6015
- {
6016
- inputs: [],
6017
- name: "DirectCBTCNotAccepted",
6018
- type: "error"
6019
- },
6020
- {
6021
- inputs: [],
6022
- name: "EnforcedPause",
6023
- type: "error"
6024
- },
6025
- {
6026
- inputs: [],
6027
- name: "ExpectedPause",
6028
- type: "error"
6029
- },
6030
- {
6031
- inputs: [],
6032
- name: "InsufficientCoin",
6033
- type: "error"
6034
- },
6035
- {
6036
- inputs: [],
6037
- name: "InvalidPosition",
6038
- type: "error"
5973
+ type: "function"
6039
5974
  },
6040
5975
  {
6041
5976
  inputs: [
6042
5977
  {
6043
5978
  internalType: "address",
6044
- name: "owner",
5979
+ name: "_owner",
6045
5980
  type: "address"
6046
- }
6047
- ],
6048
- name: "OwnableInvalidOwner",
6049
- type: "error"
6050
- },
6051
- {
6052
- inputs: [
5981
+ },
6053
5982
  {
6054
5983
  internalType: "address",
6055
- name: "account",
5984
+ name: "_jusd",
6056
5985
  type: "address"
6057
- }
6058
- ],
6059
- name: "OwnableUnauthorizedAccount",
6060
- type: "error"
6061
- },
6062
- {
6063
- inputs: [],
6064
- name: "PriceAdjustmentFailed",
6065
- type: "error"
6066
- },
6067
- {
6068
- inputs: [],
6069
- name: "ReentrancyGuardReentrantCall",
6070
- type: "error"
6071
- },
6072
- {
6073
- inputs: [],
6074
- name: "TransferFailed",
6075
- type: "error"
6076
- },
6077
- {
6078
- anonymous: false,
6079
- inputs: [
5986
+ },
6080
5987
  {
6081
- indexed: true,
6082
5988
  internalType: "address",
6083
- name: "to",
5989
+ name: "_collateral",
6084
5990
  type: "address"
6085
5991
  },
6086
5992
  {
6087
- indexed: false,
6088
5993
  internalType: "uint256",
6089
- name: "amount",
5994
+ name: "_minCollateral",
6090
5995
  type: "uint256"
6091
- }
6092
- ],
6093
- name: "CoinRescued",
6094
- type: "event"
6095
- },
6096
- {
6097
- anonymous: false,
6098
- inputs: [
6099
- {
6100
- indexed: true,
6101
- internalType: "address",
6102
- name: "previousOwner",
6103
- type: "address"
6104
5996
  },
6105
5997
  {
6106
- indexed: true,
6107
- internalType: "address",
6108
- name: "newOwner",
6109
- type: "address"
6110
- }
6111
- ],
6112
- name: "OwnershipTransferred",
6113
- type: "event"
6114
- },
6115
- {
6116
- anonymous: false,
6117
- inputs: [
5998
+ internalType: "uint256",
5999
+ name: "_initialLimit",
6000
+ type: "uint256"
6001
+ },
6118
6002
  {
6119
- indexed: false,
6120
- internalType: "address",
6121
- name: "account",
6122
- type: "address"
6123
- }
6124
- ],
6125
- name: "Paused",
6126
- type: "event"
6127
- },
6128
- {
6129
- anonymous: false,
6130
- inputs: [
6003
+ internalType: "uint40",
6004
+ name: "_initPeriod",
6005
+ type: "uint40"
6006
+ },
6131
6007
  {
6132
- indexed: true,
6133
- internalType: "address",
6134
- name: "owner",
6135
- type: "address"
6008
+ internalType: "uint40",
6009
+ name: "_duration",
6010
+ type: "uint40"
6136
6011
  },
6137
6012
  {
6138
- indexed: true,
6139
- internalType: "address",
6140
- name: "position",
6141
- type: "address"
6013
+ internalType: "uint40",
6014
+ name: "_challengePeriod",
6015
+ type: "uint40"
6142
6016
  },
6143
6017
  {
6144
- indexed: false,
6145
- internalType: "uint256",
6146
- name: "coinAmount",
6147
- type: "uint256"
6018
+ internalType: "uint24",
6019
+ name: "_riskPremiumPPM",
6020
+ type: "uint24"
6148
6021
  },
6149
6022
  {
6150
- indexed: false,
6151
6023
  internalType: "uint256",
6152
- name: "mintAmount",
6153
- type: "uint256"
6154
- },
6155
- {
6156
- indexed: false,
6157
- internalType: "uint256",
6158
- name: "liquidationPrice",
6159
- type: "uint256"
6160
- }
6161
- ],
6162
- name: "PositionCreatedWithCoin",
6163
- type: "event"
6164
- },
6165
- {
6166
- anonymous: false,
6167
- inputs: [
6168
- {
6169
- indexed: true,
6170
- internalType: "address",
6171
- name: "token",
6172
- type: "address"
6173
- },
6174
- {
6175
- indexed: true,
6176
- internalType: "address",
6177
- name: "to",
6178
- type: "address"
6179
- },
6180
- {
6181
- indexed: false,
6182
- internalType: "uint256",
6183
- name: "amount",
6184
- type: "uint256"
6185
- }
6186
- ],
6187
- name: "TokenRescued",
6188
- type: "event"
6189
- },
6190
- {
6191
- anonymous: false,
6192
- inputs: [
6193
- {
6194
- indexed: false,
6195
- internalType: "address",
6196
- name: "account",
6197
- type: "address"
6198
- }
6199
- ],
6200
- name: "Unpaused",
6201
- type: "event"
6202
- },
6203
- {
6204
- inputs: [],
6205
- name: "JUSD",
6206
- outputs: [
6207
- {
6208
- internalType: "contract IJuiceDollar",
6209
- name: "",
6210
- type: "address"
6211
- }
6212
- ],
6213
- stateMutability: "view",
6214
- type: "function"
6215
- },
6216
- {
6217
- inputs: [],
6218
- name: "MINTING_HUB",
6219
- outputs: [
6220
- {
6221
- internalType: "contract IMintingHubGateway",
6222
- name: "",
6223
- type: "address"
6224
- }
6225
- ],
6226
- stateMutability: "view",
6227
- type: "function"
6228
- },
6229
- {
6230
- inputs: [],
6231
- name: "WCBTC",
6232
- outputs: [
6233
- {
6234
- internalType: "contract IWrappedCBTC",
6235
- name: "",
6236
- type: "address"
6237
- }
6238
- ],
6239
- stateMutability: "view",
6240
- type: "function"
6241
- },
6242
- {
6243
- inputs: [
6244
- {
6245
- internalType: "address",
6246
- name: "parent",
6247
- type: "address"
6248
- },
6249
- {
6250
- internalType: "uint256",
6251
- name: "initialMint",
6252
- type: "uint256"
6253
- },
6254
- {
6255
- internalType: "uint40",
6256
- name: "expiration",
6257
- type: "uint40"
6258
- },
6259
- {
6260
- internalType: "bytes32",
6261
- name: "frontendCode",
6262
- type: "bytes32"
6263
- },
6264
- {
6265
- internalType: "uint256",
6266
- name: "liquidationPrice",
6267
- type: "uint256"
6268
- }
6269
- ],
6270
- name: "lendWithCoin",
6271
- outputs: [
6272
- {
6273
- internalType: "address",
6274
- name: "position",
6275
- type: "address"
6276
- }
6277
- ],
6278
- stateMutability: "payable",
6279
- type: "function"
6280
- },
6281
- {
6282
- inputs: [
6283
- {
6284
- internalType: "address",
6285
- name: "owner",
6286
- type: "address"
6287
- },
6288
- {
6289
- internalType: "address",
6290
- name: "parent",
6291
- type: "address"
6292
- },
6293
- {
6294
- internalType: "uint256",
6295
- name: "initialMint",
6296
- type: "uint256"
6297
- },
6298
- {
6299
- internalType: "uint40",
6300
- name: "expiration",
6301
- type: "uint40"
6302
- },
6303
- {
6304
- internalType: "bytes32",
6305
- name: "frontendCode",
6306
- type: "bytes32"
6307
- },
6308
- {
6309
- internalType: "uint256",
6310
- name: "liquidationPrice",
6311
- type: "uint256"
6312
- }
6313
- ],
6314
- name: "lendWithCoinFor",
6315
- outputs: [
6316
- {
6317
- internalType: "address",
6318
- name: "position",
6319
- type: "address"
6320
- }
6321
- ],
6322
- stateMutability: "payable",
6323
- type: "function"
6324
- },
6325
- {
6326
- inputs: [],
6327
- name: "owner",
6328
- outputs: [
6329
- {
6330
- internalType: "address",
6331
- name: "",
6332
- type: "address"
6333
- }
6334
- ],
6335
- stateMutability: "view",
6336
- type: "function"
6337
- },
6338
- {
6339
- inputs: [],
6340
- name: "pause",
6341
- outputs: [],
6342
- stateMutability: "nonpayable",
6343
- type: "function"
6344
- },
6345
- {
6346
- inputs: [],
6347
- name: "paused",
6348
- outputs: [
6349
- {
6350
- internalType: "bool",
6351
- name: "",
6352
- type: "bool"
6353
- }
6354
- ],
6355
- stateMutability: "view",
6356
- type: "function"
6357
- },
6358
- {
6359
- inputs: [],
6360
- name: "renounceOwnership",
6361
- outputs: [],
6362
- stateMutability: "nonpayable",
6363
- type: "function"
6364
- },
6365
- {
6366
- inputs: [],
6367
- name: "rescueCoin",
6368
- outputs: [],
6369
- stateMutability: "nonpayable",
6370
- type: "function"
6371
- },
6372
- {
6373
- inputs: [
6374
- {
6375
- internalType: "address",
6376
- name: "token",
6377
- type: "address"
6378
- },
6379
- {
6380
- internalType: "address",
6381
- name: "to",
6382
- type: "address"
6383
- },
6384
- {
6385
- internalType: "uint256",
6386
- name: "amount",
6387
- type: "uint256"
6388
- }
6389
- ],
6390
- name: "rescueToken",
6391
- outputs: [],
6392
- stateMutability: "nonpayable",
6393
- type: "function"
6394
- },
6395
- {
6396
- inputs: [
6397
- {
6398
- internalType: "address",
6399
- name: "newOwner",
6400
- type: "address"
6401
- }
6402
- ],
6403
- name: "transferOwnership",
6404
- outputs: [],
6405
- stateMutability: "nonpayable",
6406
- type: "function"
6407
- },
6408
- {
6409
- inputs: [],
6410
- name: "unpause",
6411
- outputs: [],
6412
- stateMutability: "nonpayable",
6413
- type: "function"
6414
- },
6415
- {
6416
- stateMutability: "payable",
6417
- type: "receive"
6418
- }
6419
- ];
6420
-
6421
- // exports/abis/MintingHubV2/PositionFactoryV2.ts
6422
- var PositionFactoryV2ABI = [
6423
- {
6424
- inputs: [
6425
- {
6426
- internalType: "address",
6427
- name: "_parent",
6428
- type: "address"
6429
- }
6430
- ],
6431
- name: "clonePosition",
6432
- outputs: [
6433
- {
6434
- internalType: "address",
6435
- name: "",
6436
- type: "address"
6437
- }
6438
- ],
6439
- stateMutability: "nonpayable",
6440
- type: "function"
6441
- },
6442
- {
6443
- inputs: [
6444
- {
6445
- internalType: "address",
6446
- name: "_owner",
6447
- type: "address"
6448
- },
6449
- {
6450
- internalType: "address",
6451
- name: "_jusd",
6452
- type: "address"
6453
- },
6454
- {
6455
- internalType: "address",
6456
- name: "_collateral",
6457
- type: "address"
6458
- },
6459
- {
6460
- internalType: "uint256",
6461
- name: "_minCollateral",
6462
- type: "uint256"
6463
- },
6464
- {
6465
- internalType: "uint256",
6466
- name: "_initialLimit",
6467
- type: "uint256"
6468
- },
6469
- {
6470
- internalType: "uint40",
6471
- name: "_initPeriod",
6472
- type: "uint40"
6473
- },
6474
- {
6475
- internalType: "uint40",
6476
- name: "_duration",
6477
- type: "uint40"
6478
- },
6479
- {
6480
- internalType: "uint40",
6481
- name: "_challengePeriod",
6482
- type: "uint40"
6483
- },
6484
- {
6485
- internalType: "uint24",
6486
- name: "_riskPremiumPPM",
6487
- type: "uint24"
6488
- },
6489
- {
6490
- internalType: "uint256",
6491
- name: "_liqPrice",
6024
+ name: "_liqPrice",
6492
6025
  type: "uint256"
6493
6026
  },
6494
6027
  {
@@ -6515,33 +6048,17 @@ var PositionRollerABI = [
6515
6048
  {
6516
6049
  inputs: [
6517
6050
  {
6518
- internalType: "address",
6519
- name: "jusd_",
6520
- type: "address"
6521
- }
6522
- ],
6523
- stateMutability: "nonpayable",
6524
- type: "constructor"
6525
- },
6526
- {
6527
- inputs: [
6528
- {
6529
- internalType: "uint256",
6530
- name: "",
6531
- type: "uint256"
6532
- },
6533
- {
6534
- internalType: "uint256",
6535
- name: "",
6536
- type: "uint256"
6537
- },
6538
- {
6539
- internalType: "uint256",
6540
- name: "",
6541
- type: "uint256"
6051
+ internalType: "address",
6052
+ name: "jusd_",
6053
+ type: "address"
6542
6054
  }
6543
6055
  ],
6544
- name: "Log",
6056
+ stateMutability: "nonpayable",
6057
+ type: "constructor"
6058
+ },
6059
+ {
6060
+ inputs: [],
6061
+ name: "NativeTransferFailed",
6545
6062
  type: "error"
6546
6063
  },
6547
6064
  {
@@ -6670,6 +6187,47 @@ var PositionRollerABI = [
6670
6187
  stateMutability: "nonpayable",
6671
6188
  type: "function"
6672
6189
  },
6190
+ {
6191
+ inputs: [
6192
+ {
6193
+ internalType: "contract IPosition",
6194
+ name: "source",
6195
+ type: "address"
6196
+ },
6197
+ {
6198
+ internalType: "contract IPosition",
6199
+ name: "target",
6200
+ type: "address"
6201
+ }
6202
+ ],
6203
+ name: "rollFullyNative",
6204
+ outputs: [],
6205
+ stateMutability: "payable",
6206
+ type: "function"
6207
+ },
6208
+ {
6209
+ inputs: [
6210
+ {
6211
+ internalType: "contract IPosition",
6212
+ name: "source",
6213
+ type: "address"
6214
+ },
6215
+ {
6216
+ internalType: "contract IPosition",
6217
+ name: "target",
6218
+ type: "address"
6219
+ },
6220
+ {
6221
+ internalType: "uint40",
6222
+ name: "expiration",
6223
+ type: "uint40"
6224
+ }
6225
+ ],
6226
+ name: "rollFullyNativeWithExpiration",
6227
+ outputs: [],
6228
+ stateMutability: "payable",
6229
+ type: "function"
6230
+ },
6673
6231
  {
6674
6232
  inputs: [
6675
6233
  {
@@ -6692,6 +6250,53 @@ var PositionRollerABI = [
6692
6250
  outputs: [],
6693
6251
  stateMutability: "nonpayable",
6694
6252
  type: "function"
6253
+ },
6254
+ {
6255
+ inputs: [
6256
+ {
6257
+ internalType: "contract IPosition",
6258
+ name: "source",
6259
+ type: "address"
6260
+ },
6261
+ {
6262
+ internalType: "uint256",
6263
+ name: "repay",
6264
+ type: "uint256"
6265
+ },
6266
+ {
6267
+ internalType: "uint256",
6268
+ name: "collWithdraw",
6269
+ type: "uint256"
6270
+ },
6271
+ {
6272
+ internalType: "contract IPosition",
6273
+ name: "target",
6274
+ type: "address"
6275
+ },
6276
+ {
6277
+ internalType: "uint256",
6278
+ name: "mint",
6279
+ type: "uint256"
6280
+ },
6281
+ {
6282
+ internalType: "uint256",
6283
+ name: "collDeposit",
6284
+ type: "uint256"
6285
+ },
6286
+ {
6287
+ internalType: "uint40",
6288
+ name: "expiration",
6289
+ type: "uint40"
6290
+ }
6291
+ ],
6292
+ name: "rollNative",
6293
+ outputs: [],
6294
+ stateMutability: "payable",
6295
+ type: "function"
6296
+ },
6297
+ {
6298
+ stateMutability: "payable",
6299
+ type: "receive"
6695
6300
  }
6696
6301
  ];
6697
6302
 
@@ -6773,6 +6378,11 @@ var PositionV2ABI = [
6773
6378
  name: "AlreadyInitialized",
6774
6379
  type: "error"
6775
6380
  },
6381
+ {
6382
+ inputs: [],
6383
+ name: "CannotRescueCollateral",
6384
+ type: "error"
6385
+ },
6776
6386
  {
6777
6387
  inputs: [],
6778
6388
  name: "ChallengeTooSmall",
@@ -6851,6 +6461,11 @@ var PositionV2ABI = [
6851
6461
  name: "LimitExceeded",
6852
6462
  type: "error"
6853
6463
  },
6464
+ {
6465
+ inputs: [],
6466
+ name: "NativeTransferFailed",
6467
+ type: "error"
6468
+ },
6854
6469
  {
6855
6470
  inputs: [],
6856
6471
  name: "NotHub",
@@ -6994,37 +6609,27 @@ var PositionV2ABI = [
6994
6609
  internalType: "uint256",
6995
6610
  name: "newPrice",
6996
6611
  type: "uint256"
6612
+ },
6613
+ {
6614
+ internalType: "bool",
6615
+ name: "withdrawAsNative",
6616
+ type: "bool"
6997
6617
  }
6998
6618
  ],
6999
6619
  name: "adjust",
7000
6620
  outputs: [],
7001
- stateMutability: "nonpayable",
6621
+ stateMutability: "payable",
7002
6622
  type: "function"
7003
6623
  },
7004
6624
  {
7005
6625
  inputs: [
7006
- {
7007
- internalType: "uint256",
7008
- name: "newPrincipal",
7009
- type: "uint256"
7010
- },
7011
- {
7012
- internalType: "uint256",
7013
- name: "newCollateral",
7014
- type: "uint256"
7015
- },
7016
6626
  {
7017
6627
  internalType: "uint256",
7018
6628
  name: "newPrice",
7019
6629
  type: "uint256"
7020
- },
7021
- {
7022
- internalType: "address",
7023
- name: "referencePosition",
7024
- type: "address"
7025
6630
  }
7026
6631
  ],
7027
- name: "adjust",
6632
+ name: "adjustPrice",
7028
6633
  outputs: [],
7029
6634
  stateMutability: "nonpayable",
7030
6635
  type: "function"
@@ -7035,15 +6640,30 @@ var PositionV2ABI = [
7035
6640
  internalType: "uint256",
7036
6641
  name: "newPrice",
7037
6642
  type: "uint256"
6643
+ },
6644
+ {
6645
+ internalType: "address",
6646
+ name: "referencePosition",
6647
+ type: "address"
7038
6648
  }
7039
6649
  ],
7040
- name: "adjustPrice",
6650
+ name: "adjustPriceWithReference",
7041
6651
  outputs: [],
7042
6652
  stateMutability: "nonpayable",
7043
6653
  type: "function"
7044
6654
  },
7045
6655
  {
7046
6656
  inputs: [
6657
+ {
6658
+ internalType: "uint256",
6659
+ name: "newPrincipal",
6660
+ type: "uint256"
6661
+ },
6662
+ {
6663
+ internalType: "uint256",
6664
+ name: "newCollateral",
6665
+ type: "uint256"
6666
+ },
7047
6667
  {
7048
6668
  internalType: "uint256",
7049
6669
  name: "newPrice",
@@ -7053,11 +6673,16 @@ var PositionV2ABI = [
7053
6673
  internalType: "address",
7054
6674
  name: "referencePosition",
7055
6675
  type: "address"
6676
+ },
6677
+ {
6678
+ internalType: "bool",
6679
+ name: "withdrawAsNative",
6680
+ type: "bool"
7056
6681
  }
7057
6682
  ],
7058
- name: "adjustPriceWithReference",
6683
+ name: "adjustWithReference",
7059
6684
  outputs: [],
7060
- stateMutability: "nonpayable",
6685
+ stateMutability: "payable",
7061
6686
  type: "function"
7062
6687
  },
7063
6688
  {
@@ -7645,6 +7270,29 @@ var PositionV2ABI = [
7645
7270
  stateMutability: "nonpayable",
7646
7271
  type: "function"
7647
7272
  },
7273
+ {
7274
+ inputs: [
7275
+ {
7276
+ internalType: "address",
7277
+ name: "token",
7278
+ type: "address"
7279
+ },
7280
+ {
7281
+ internalType: "address",
7282
+ name: "target",
7283
+ type: "address"
7284
+ },
7285
+ {
7286
+ internalType: "uint256",
7287
+ name: "amount",
7288
+ type: "uint256"
7289
+ }
7290
+ ],
7291
+ name: "rescueToken",
7292
+ outputs: [],
7293
+ stateMutability: "nonpayable",
7294
+ type: "function"
7295
+ },
7648
7296
  {
7649
7297
  inputs: [],
7650
7298
  name: "reserveContribution",
@@ -7730,11 +7378,6 @@ var PositionV2ABI = [
7730
7378
  },
7731
7379
  {
7732
7380
  inputs: [
7733
- {
7734
- internalType: "address",
7735
- name: "token",
7736
- type: "address"
7737
- },
7738
7381
  {
7739
7382
  internalType: "address",
7740
7383
  name: "target",
@@ -7746,7 +7389,7 @@ var PositionV2ABI = [
7746
7389
  type: "uint256"
7747
7390
  }
7748
7391
  ],
7749
- name: "withdraw",
7392
+ name: "withdrawCollateral",
7750
7393
  outputs: [],
7751
7394
  stateMutability: "nonpayable",
7752
7395
  type: "function"
@@ -7764,10 +7407,14 @@ var PositionV2ABI = [
7764
7407
  type: "uint256"
7765
7408
  }
7766
7409
  ],
7767
- name: "withdrawCollateral",
7410
+ name: "withdrawCollateralAsNative",
7768
7411
  outputs: [],
7769
7412
  stateMutability: "nonpayable",
7770
7413
  type: "function"
7414
+ },
7415
+ {
7416
+ stateMutability: "payable",
7417
+ type: "receive"
7771
7418
  }
7772
7419
  ];
7773
7420
 
@@ -10043,7 +9690,7 @@ var MintingHubV2ABI = [
10043
9690
  type: "address"
10044
9691
  },
10045
9692
  {
10046
- internalType: "address",
9693
+ internalType: "address payable",
10047
9694
  name: "_roller",
10048
9695
  type: "address"
10049
9696
  },
@@ -10051,6 +9698,11 @@ var MintingHubV2ABI = [
10051
9698
  internalType: "address",
10052
9699
  name: "_factory",
10053
9700
  type: "address"
9701
+ },
9702
+ {
9703
+ internalType: "address",
9704
+ name: "_wcbtc",
9705
+ type: "address"
10054
9706
  }
10055
9707
  ],
10056
9708
  stateMutability: "nonpayable",
@@ -10107,11 +9759,21 @@ var MintingHubV2ABI = [
10107
9759
  name: "LeaveNoDust",
10108
9760
  type: "error"
10109
9761
  },
9762
+ {
9763
+ inputs: [],
9764
+ name: "NativeOnlyForWCBTC",
9765
+ type: "error"
9766
+ },
10110
9767
  {
10111
9768
  inputs: [],
10112
9769
  name: "UnexpectedPrice",
10113
9770
  type: "error"
10114
9771
  },
9772
+ {
9773
+ inputs: [],
9774
+ name: "ValueMismatch",
9775
+ type: "error"
9776
+ },
10115
9777
  {
10116
9778
  anonymous: false,
10117
9779
  inputs: [
@@ -10364,6 +10026,19 @@ var MintingHubV2ABI = [
10364
10026
  stateMutability: "view",
10365
10027
  type: "function"
10366
10028
  },
10029
+ {
10030
+ inputs: [],
10031
+ name: "WCBTC",
10032
+ outputs: [
10033
+ {
10034
+ internalType: "address",
10035
+ name: "",
10036
+ type: "address"
10037
+ }
10038
+ ],
10039
+ stateMutability: "view",
10040
+ type: "function"
10041
+ },
10367
10042
  {
10368
10043
  inputs: [
10369
10044
  {
@@ -10474,40 +10149,6 @@ var MintingHubV2ABI = [
10474
10149
  stateMutability: "view",
10475
10150
  type: "function"
10476
10151
  },
10477
- {
10478
- inputs: [
10479
- {
10480
- internalType: "address",
10481
- name: "parent",
10482
- type: "address"
10483
- },
10484
- {
10485
- internalType: "uint256",
10486
- name: "_initialCollateral",
10487
- type: "uint256"
10488
- },
10489
- {
10490
- internalType: "uint256",
10491
- name: "_initialMint",
10492
- type: "uint256"
10493
- },
10494
- {
10495
- internalType: "uint40",
10496
- name: "expiration",
10497
- type: "uint40"
10498
- }
10499
- ],
10500
- name: "clone",
10501
- outputs: [
10502
- {
10503
- internalType: "address",
10504
- name: "",
10505
- type: "address"
10506
- }
10507
- ],
10508
- stateMutability: "nonpayable",
10509
- type: "function"
10510
- },
10511
10152
  {
10512
10153
  inputs: [
10513
10154
  {
@@ -10534,6 +10175,11 @@ var MintingHubV2ABI = [
10534
10175
  internalType: "uint40",
10535
10176
  name: "expiration",
10536
10177
  type: "uint40"
10178
+ },
10179
+ {
10180
+ internalType: "uint256",
10181
+ name: "_liqPrice",
10182
+ type: "uint256"
10537
10183
  }
10538
10184
  ],
10539
10185
  name: "clone",
@@ -10544,7 +10190,7 @@ var MintingHubV2ABI = [
10544
10190
  type: "address"
10545
10191
  }
10546
10192
  ],
10547
- stateMutability: "nonpayable",
10193
+ stateMutability: "payable",
10548
10194
  type: "function"
10549
10195
  },
10550
10196
  {
@@ -10627,7 +10273,7 @@ var MintingHubV2ABI = [
10627
10273
  type: "address"
10628
10274
  }
10629
10275
  ],
10630
- stateMutability: "nonpayable",
10276
+ stateMutability: "payable",
10631
10277
  type: "function"
10632
10278
  },
10633
10279
  {
@@ -11169,7 +10815,6 @@ var SavingsABI = [
11169
10815
  // Annotate the CommonJS export names for ESM import in node:
11170
10816
  0 && (module.exports = {
11171
10817
  ADDRESS,
11172
- CoinLendingGatewayABI,
11173
10818
  ERC20ABI,
11174
10819
  ERC20PermitLightABI,
11175
10820
  EquityABI,