@juicedollar/jusd 3.0.0 → 4.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 (47) hide show
  1. package/contracts/Leadrate.sol +1 -1
  2. package/contracts/{MintingHubV2 → MintingHubV3}/MintingHub.sol +93 -100
  3. package/contracts/{MintingHubV2 → MintingHubV3}/Position.sol +20 -13
  4. package/contracts/{MintingHubV2 → MintingHubV3}/PositionRoller.sol +17 -37
  5. package/contracts/{MintingHubV2 → MintingHubV3}/interface/IMintingHub.sol +2 -2
  6. package/contracts/{MintingHubV2 → MintingHubV3}/interface/IPosition.sol +3 -3
  7. package/contracts/Savings.sol +36 -6
  8. package/contracts/interface/ISavingsJUSD.sol +10 -1
  9. package/contracts/test/PositionExpirationTest.sol +17 -38
  10. package/contracts/test/PositionRollingTest.sol +3 -3
  11. package/contracts/test/ReentrantAttacker.sol +1 -1
  12. package/dist/index.d.mts +5609 -3568
  13. package/dist/index.d.ts +5609 -3568
  14. package/dist/index.js +9360 -6681
  15. package/dist/index.mjs +9350 -6675
  16. package/exports/abis/shared/Equity.ts +1286 -0
  17. package/exports/abis/shared/JuiceDollar.ts +1366 -0
  18. package/exports/abis/shared/StablecoinBridge.ts +279 -0
  19. package/exports/abis/utils/StartUSD.ts +213 -213
  20. package/exports/abis/{core → v2}/FrontendGateway.ts +1 -1
  21. package/exports/abis/{core → v2}/MintingHubGateway.ts +1 -1
  22. package/exports/abis/{MintingHubV2 → v2}/PositionRoller.ts +1 -1
  23. package/exports/abis/{core → v2}/SavingsGateway.ts +1 -1
  24. package/exports/abis/{core → v2}/SavingsVaultJUSD.ts +1 -1
  25. package/exports/abis/v3/MintingHub.ts +1024 -0
  26. package/exports/abis/v3/Position.ts +1142 -0
  27. package/exports/abis/v3/PositionFactory.ts +90 -0
  28. package/exports/abis/v3/PositionRoller.ts +255 -0
  29. package/exports/abis/v3/Savings.ts +553 -0
  30. package/exports/abis/v3/SavingsVaultJUSD.ts +925 -0
  31. package/exports/address.config.ts +43 -15
  32. package/exports/index.ts +22 -14
  33. package/package.json +9 -9
  34. package/contracts/gateway/FrontendGateway.sol +0 -224
  35. package/contracts/gateway/MintingHubGateway.sol +0 -82
  36. package/contracts/gateway/SavingsGateway.sol +0 -51
  37. package/contracts/gateway/interface/IFrontendGateway.sol +0 -49
  38. package/contracts/gateway/interface/IMintingHubGateway.sol +0 -12
  39. package/exports/abis/core/Equity.ts +0 -1286
  40. package/exports/abis/core/JuiceDollar.ts +0 -1366
  41. package/exports/abis/utils/MintingHubV2.ts +0 -888
  42. package/exports/abis/utils/Savings.ts +0 -453
  43. package/exports/abis/utils/StablecoinBridge.ts +0 -279
  44. /package/contracts/{MintingHubV2 → MintingHubV3}/PositionFactory.sol +0 -0
  45. /package/contracts/{MintingHubV2 → MintingHubV3}/interface/IPositionFactory.sol +0 -0
  46. /package/exports/abis/{MintingHubV2 → v2}/PositionFactoryV2.ts +0 -0
  47. /package/exports/abis/{MintingHubV2 → v2}/PositionV2.ts +0 -0
@@ -0,0 +1,279 @@
1
+ export const StablecoinBridgeABI = [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "address",
6
+ "name": "other",
7
+ "type": "address"
8
+ },
9
+ {
10
+ "internalType": "address",
11
+ "name": "JUSDAddress",
12
+ "type": "address"
13
+ },
14
+ {
15
+ "internalType": "uint256",
16
+ "name": "limit_",
17
+ "type": "uint256"
18
+ },
19
+ {
20
+ "internalType": "uint256",
21
+ "name": "weeks_",
22
+ "type": "uint256"
23
+ }
24
+ ],
25
+ "stateMutability": "nonpayable",
26
+ "type": "constructor"
27
+ },
28
+ {
29
+ "inputs": [],
30
+ "name": "AlreadyStopped",
31
+ "type": "error"
32
+ },
33
+ {
34
+ "inputs": [
35
+ {
36
+ "internalType": "uint256",
37
+ "name": "time",
38
+ "type": "uint256"
39
+ },
40
+ {
41
+ "internalType": "uint256",
42
+ "name": "expiration",
43
+ "type": "uint256"
44
+ }
45
+ ],
46
+ "name": "Expired",
47
+ "type": "error"
48
+ },
49
+ {
50
+ "inputs": [
51
+ {
52
+ "internalType": "uint256",
53
+ "name": "amount",
54
+ "type": "uint256"
55
+ },
56
+ {
57
+ "internalType": "uint256",
58
+ "name": "limit",
59
+ "type": "uint256"
60
+ }
61
+ ],
62
+ "name": "Limit",
63
+ "type": "error"
64
+ },
65
+ {
66
+ "inputs": [],
67
+ "name": "NoGovernance",
68
+ "type": "error"
69
+ },
70
+ {
71
+ "inputs": [],
72
+ "name": "NotQualified",
73
+ "type": "error"
74
+ },
75
+ {
76
+ "inputs": [
77
+ {
78
+ "internalType": "address",
79
+ "name": "token",
80
+ "type": "address"
81
+ }
82
+ ],
83
+ "name": "SafeERC20FailedOperation",
84
+ "type": "error"
85
+ },
86
+ {
87
+ "inputs": [],
88
+ "name": "Stopped",
89
+ "type": "error"
90
+ },
91
+ {
92
+ "inputs": [
93
+ {
94
+ "internalType": "address",
95
+ "name": "token",
96
+ "type": "address"
97
+ }
98
+ ],
99
+ "name": "UnsupportedToken",
100
+ "type": "error"
101
+ },
102
+ {
103
+ "anonymous": false,
104
+ "inputs": [
105
+ {
106
+ "indexed": true,
107
+ "internalType": "address",
108
+ "name": "caller",
109
+ "type": "address"
110
+ },
111
+ {
112
+ "indexed": false,
113
+ "internalType": "string",
114
+ "name": "message",
115
+ "type": "string"
116
+ }
117
+ ],
118
+ "name": "EmergencyStopped",
119
+ "type": "event"
120
+ },
121
+ {
122
+ "inputs": [],
123
+ "name": "JUSD",
124
+ "outputs": [
125
+ {
126
+ "internalType": "contract IJuiceDollar",
127
+ "name": "",
128
+ "type": "address"
129
+ }
130
+ ],
131
+ "stateMutability": "view",
132
+ "type": "function"
133
+ },
134
+ {
135
+ "inputs": [
136
+ {
137
+ "internalType": "uint256",
138
+ "name": "amount",
139
+ "type": "uint256"
140
+ }
141
+ ],
142
+ "name": "burn",
143
+ "outputs": [],
144
+ "stateMutability": "nonpayable",
145
+ "type": "function"
146
+ },
147
+ {
148
+ "inputs": [
149
+ {
150
+ "internalType": "address",
151
+ "name": "target",
152
+ "type": "address"
153
+ },
154
+ {
155
+ "internalType": "uint256",
156
+ "name": "amount",
157
+ "type": "uint256"
158
+ }
159
+ ],
160
+ "name": "burnAndSend",
161
+ "outputs": [],
162
+ "stateMutability": "nonpayable",
163
+ "type": "function"
164
+ },
165
+ {
166
+ "inputs": [
167
+ {
168
+ "internalType": "address[]",
169
+ "name": "_helpers",
170
+ "type": "address[]"
171
+ },
172
+ {
173
+ "internalType": "string",
174
+ "name": "_message",
175
+ "type": "string"
176
+ }
177
+ ],
178
+ "name": "emergencyStop",
179
+ "outputs": [],
180
+ "stateMutability": "nonpayable",
181
+ "type": "function"
182
+ },
183
+ {
184
+ "inputs": [],
185
+ "name": "horizon",
186
+ "outputs": [
187
+ {
188
+ "internalType": "uint256",
189
+ "name": "",
190
+ "type": "uint256"
191
+ }
192
+ ],
193
+ "stateMutability": "view",
194
+ "type": "function"
195
+ },
196
+ {
197
+ "inputs": [],
198
+ "name": "limit",
199
+ "outputs": [
200
+ {
201
+ "internalType": "uint256",
202
+ "name": "",
203
+ "type": "uint256"
204
+ }
205
+ ],
206
+ "stateMutability": "view",
207
+ "type": "function"
208
+ },
209
+ {
210
+ "inputs": [
211
+ {
212
+ "internalType": "uint256",
213
+ "name": "amount",
214
+ "type": "uint256"
215
+ }
216
+ ],
217
+ "name": "mint",
218
+ "outputs": [],
219
+ "stateMutability": "nonpayable",
220
+ "type": "function"
221
+ },
222
+ {
223
+ "inputs": [
224
+ {
225
+ "internalType": "address",
226
+ "name": "target",
227
+ "type": "address"
228
+ },
229
+ {
230
+ "internalType": "uint256",
231
+ "name": "amount",
232
+ "type": "uint256"
233
+ }
234
+ ],
235
+ "name": "mintTo",
236
+ "outputs": [],
237
+ "stateMutability": "nonpayable",
238
+ "type": "function"
239
+ },
240
+ {
241
+ "inputs": [],
242
+ "name": "minted",
243
+ "outputs": [
244
+ {
245
+ "internalType": "uint256",
246
+ "name": "",
247
+ "type": "uint256"
248
+ }
249
+ ],
250
+ "stateMutability": "view",
251
+ "type": "function"
252
+ },
253
+ {
254
+ "inputs": [],
255
+ "name": "stopped",
256
+ "outputs": [
257
+ {
258
+ "internalType": "bool",
259
+ "name": "",
260
+ "type": "bool"
261
+ }
262
+ ],
263
+ "stateMutability": "view",
264
+ "type": "function"
265
+ },
266
+ {
267
+ "inputs": [],
268
+ "name": "usd",
269
+ "outputs": [
270
+ {
271
+ "internalType": "contract IERC20",
272
+ "name": "",
273
+ "type": "address"
274
+ }
275
+ ],
276
+ "stateMutability": "view",
277
+ "type": "function"
278
+ }
279
+ ] as const;