@ensuro/core 2.7.0 → 2.8.0-beta2

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 (79) hide show
  1. package/README.md +13 -7
  2. package/contracts/AccessManager.sol +3 -13
  3. package/contracts/EToken.sol +29 -95
  4. package/contracts/LPManualWhitelist.sol +11 -26
  5. package/contracts/LiquidityThresholdAssetManager.sol +10 -21
  6. package/contracts/Policy.sol +10 -20
  7. package/contracts/PolicyPool.sol +110 -127
  8. package/contracts/PolicyPoolComponent.sol +9 -32
  9. package/contracts/PremiumsAccount.sol +41 -47
  10. package/contracts/Reserve.sol +10 -16
  11. package/contracts/RiskModule.sol +74 -83
  12. package/contracts/SignedBucketRiskModule.sol +18 -80
  13. package/contracts/SignedQuoteRiskModule.sol +13 -44
  14. package/contracts/TieredSignedQuoteRiskModule.sol +7 -13
  15. package/contracts/TimeScaled.sol +8 -39
  16. package/contracts/TrustfulRiskModule.sol +47 -42
  17. package/contracts/interfaces/IAccessManager.sol +2 -11
  18. package/contracts/interfaces/IEToken.sol +1 -5
  19. package/contracts/interfaces/ILPWhitelist.sol +2 -10
  20. package/contracts/interfaces/IPolicyHolder.sol +2 -11
  21. package/contracts/interfaces/IPolicyPool.sol +59 -3
  22. package/contracts/interfaces/IPremiumsAccount.sol +17 -5
  23. package/contracts/migration/LPManualWhitelistV20.sol +3 -15
  24. package/contracts/migration/LPManualWhitelistV20Upgraded.sol +1 -5
  25. package/contracts/mocks/FixedRateVault.sol +1 -6
  26. package/contracts/mocks/InterfaceIdCalculator.sol +2 -0
  27. package/contracts/mocks/PolicyHolderMock.sol +3 -13
  28. package/contracts/mocks/PolicyPoolComponentMock.sol +1 -3
  29. package/contracts/mocks/PolicyPoolMock.sol +25 -25
  30. package/contracts/mocks/RiskModuleMock.sol +39 -16
  31. package/contracts/mocks/TestNFT.sol +1 -1
  32. package/js/deploy.js +44 -39
  33. package/js/test-utils.js +30 -19
  34. package/js/utils.js +62 -29
  35. package/package.json +1 -1
  36. package/scripts/utils.sh +23 -12
  37. package/build/contracts/AccessManager.sol/AccessManager.json +0 -618
  38. package/build/contracts/ERC4626AssetManager.sol/ERC4626AssetManager.json +0 -238
  39. package/build/contracts/EToken.sol/EToken.json +0 -1277
  40. package/build/contracts/LPManualWhitelist.sol/LPManualWhitelist.json +0 -647
  41. package/build/contracts/LiquidityThresholdAssetManager.sol/LiquidityThresholdAssetManager.json +0 -222
  42. package/build/contracts/Policy.sol/Policy.json +0 -10
  43. package/build/contracts/PolicyPool.sol/PolicyPool.json +0 -1416
  44. package/build/contracts/PolicyPoolComponent.sol/PolicyPoolComponent.json +0 -332
  45. package/build/contracts/PremiumsAccount.sol/PremiumsAccount.json +0 -970
  46. package/build/contracts/Reserve.sol/Reserve.json +0 -403
  47. package/build/contracts/RiskModule.sol/RiskModule.json +0 -559
  48. package/build/contracts/SignedBucketRiskModule.sol/SignedBucketRiskModule.json +0 -1262
  49. package/build/contracts/SignedQuoteRiskModule.sol/SignedQuoteRiskModule.json +0 -1110
  50. package/build/contracts/TieredSignedQuoteRiskModule.sol/TieredSignedQuoteRiskModule.json +0 -1316
  51. package/build/contracts/TimeScaled.sol/TimeScaled.json +0 -10
  52. package/build/contracts/TrustfulRiskModule.sol/TrustfulRiskModule.json +0 -984
  53. package/build/contracts/dependencies/ERC1967Proxy.sol/ERC1967Proxy.json +0 -64
  54. package/build/contracts/dependencies/IERC20Metadata.sol/IERC20Metadata.json +0 -233
  55. package/build/contracts/dependencies/WadRayMath.sol/WadRayMath.json +0 -10
  56. package/build/contracts/interfaces/IAccessManager.sol/IAccessManager.json +0 -343
  57. package/build/contracts/interfaces/IAssetManager.sol/IAssetManager.json +0 -128
  58. package/build/contracts/interfaces/IEToken.sol/IEToken.json +0 -460
  59. package/build/contracts/interfaces/ILPWhitelist.sol/ILPWhitelist.json +0 -103
  60. package/build/contracts/interfaces/IPolicyHolder.sol/IPolicyHolder.json +0 -108
  61. package/build/contracts/interfaces/IPolicyPool.sol/IPolicyPool.json +0 -501
  62. package/build/contracts/interfaces/IPolicyPoolComponent.sol/IPolicyPoolComponent.json +0 -43
  63. package/build/contracts/interfaces/IPremiumsAccount.sol/IPremiumsAccount.json +0 -315
  64. package/build/contracts/interfaces/IRiskModule.sol/IRiskModule.json +0 -165
  65. package/build/contracts/migration/LPManualWhitelistV20.sol/LPManualWhitelistV20.json +0 -481
  66. package/build/contracts/migration/LPManualWhitelistV20Upgraded.sol/LPManualWhitelistV20Upgraded.json +0 -492
  67. package/build/contracts/mocks/FixedRateVault.sol/FixedRateVault.json +0 -736
  68. package/build/contracts/mocks/ForwardProxy.sol/ForwardProxy.json +0 -43
  69. package/build/contracts/mocks/IMintableERC20.sol/IMintableERC20.json +0 -47
  70. package/build/contracts/mocks/InterfaceIdCalculator.sol/InterfaceIdCalculator.json +0 -180
  71. package/build/contracts/mocks/PolicyHolderMock.sol/PolicyHolderMock.json +0 -319
  72. package/build/contracts/mocks/PolicyPoolComponentMock.sol/PolicyPoolComponentMock.json +0 -54
  73. package/build/contracts/mocks/PolicyPoolMock.sol/PolicyPoolMock.json +0 -721
  74. package/build/contracts/mocks/PolicyPoolMock.sol/PolicyPoolMockForward.json +0 -92
  75. package/build/contracts/mocks/RiskModuleMock.sol/RiskModuleMock.json +0 -783
  76. package/build/contracts/mocks/TestCurrency.sol/TestCurrency.json +0 -343
  77. package/build/contracts/mocks/TestNFT.sol/TestNFT.json +0 -388
  78. package/contracts/dependencies/ERC1967Proxy.sol +0 -19
  79. package/contracts/dependencies/IERC20Metadata.sol +0 -19
@@ -1,481 +0,0 @@
1
- {
2
- "_format": "hh-sol-artifact-1",
3
- "contractName": "LPManualWhitelistV20",
4
- "sourceName": "contracts/migration/LPManualWhitelistV20.sol",
5
- "abi": [
6
- {
7
- "anonymous": false,
8
- "inputs": [
9
- {
10
- "indexed": false,
11
- "internalType": "address",
12
- "name": "previousAdmin",
13
- "type": "address"
14
- },
15
- {
16
- "indexed": false,
17
- "internalType": "address",
18
- "name": "newAdmin",
19
- "type": "address"
20
- }
21
- ],
22
- "name": "AdminChanged",
23
- "type": "event"
24
- },
25
- {
26
- "anonymous": false,
27
- "inputs": [
28
- {
29
- "indexed": true,
30
- "internalType": "address",
31
- "name": "beacon",
32
- "type": "address"
33
- }
34
- ],
35
- "name": "BeaconUpgraded",
36
- "type": "event"
37
- },
38
- {
39
- "anonymous": false,
40
- "inputs": [
41
- {
42
- "indexed": true,
43
- "internalType": "enum IAccessManager.GovernanceActions",
44
- "name": "action",
45
- "type": "uint8"
46
- },
47
- {
48
- "indexed": false,
49
- "internalType": "address",
50
- "name": "value",
51
- "type": "address"
52
- }
53
- ],
54
- "name": "ComponentChanged",
55
- "type": "event"
56
- },
57
- {
58
- "anonymous": false,
59
- "inputs": [
60
- {
61
- "indexed": true,
62
- "internalType": "enum IAccessManager.GovernanceActions",
63
- "name": "action",
64
- "type": "uint8"
65
- },
66
- {
67
- "indexed": false,
68
- "internalType": "uint256",
69
- "name": "value",
70
- "type": "uint256"
71
- }
72
- ],
73
- "name": "GovernanceAction",
74
- "type": "event"
75
- },
76
- {
77
- "anonymous": false,
78
- "inputs": [
79
- {
80
- "indexed": false,
81
- "internalType": "uint8",
82
- "name": "version",
83
- "type": "uint8"
84
- }
85
- ],
86
- "name": "Initialized",
87
- "type": "event"
88
- },
89
- {
90
- "anonymous": false,
91
- "inputs": [
92
- {
93
- "indexed": false,
94
- "internalType": "address",
95
- "name": "provider",
96
- "type": "address"
97
- },
98
- {
99
- "indexed": false,
100
- "internalType": "bool",
101
- "name": "whitelisted",
102
- "type": "bool"
103
- }
104
- ],
105
- "name": "LPWhitelisted",
106
- "type": "event"
107
- },
108
- {
109
- "anonymous": false,
110
- "inputs": [
111
- {
112
- "indexed": false,
113
- "internalType": "address",
114
- "name": "account",
115
- "type": "address"
116
- }
117
- ],
118
- "name": "Paused",
119
- "type": "event"
120
- },
121
- {
122
- "anonymous": false,
123
- "inputs": [
124
- {
125
- "indexed": false,
126
- "internalType": "address",
127
- "name": "account",
128
- "type": "address"
129
- }
130
- ],
131
- "name": "Unpaused",
132
- "type": "event"
133
- },
134
- {
135
- "anonymous": false,
136
- "inputs": [
137
- {
138
- "indexed": true,
139
- "internalType": "address",
140
- "name": "implementation",
141
- "type": "address"
142
- }
143
- ],
144
- "name": "Upgraded",
145
- "type": "event"
146
- },
147
- {
148
- "inputs": [],
149
- "name": "GUARDIAN_ROLE",
150
- "outputs": [
151
- {
152
- "internalType": "bytes32",
153
- "name": "",
154
- "type": "bytes32"
155
- }
156
- ],
157
- "stateMutability": "view",
158
- "type": "function"
159
- },
160
- {
161
- "inputs": [],
162
- "name": "LEVEL1_ROLE",
163
- "outputs": [
164
- {
165
- "internalType": "bytes32",
166
- "name": "",
167
- "type": "bytes32"
168
- }
169
- ],
170
- "stateMutability": "view",
171
- "type": "function"
172
- },
173
- {
174
- "inputs": [],
175
- "name": "LEVEL2_ROLE",
176
- "outputs": [
177
- {
178
- "internalType": "bytes32",
179
- "name": "",
180
- "type": "bytes32"
181
- }
182
- ],
183
- "stateMutability": "view",
184
- "type": "function"
185
- },
186
- {
187
- "inputs": [],
188
- "name": "LEVEL3_ROLE",
189
- "outputs": [
190
- {
191
- "internalType": "bytes32",
192
- "name": "",
193
- "type": "bytes32"
194
- }
195
- ],
196
- "stateMutability": "view",
197
- "type": "function"
198
- },
199
- {
200
- "inputs": [],
201
- "name": "LP_WHITELIST_ROLE",
202
- "outputs": [
203
- {
204
- "internalType": "bytes32",
205
- "name": "",
206
- "type": "bytes32"
207
- }
208
- ],
209
- "stateMutability": "view",
210
- "type": "function"
211
- },
212
- {
213
- "inputs": [],
214
- "name": "TWEAK_EXPIRATION",
215
- "outputs": [
216
- {
217
- "internalType": "uint40",
218
- "name": "",
219
- "type": "uint40"
220
- }
221
- ],
222
- "stateMutability": "view",
223
- "type": "function"
224
- },
225
- {
226
- "inputs": [
227
- {
228
- "internalType": "contract IEToken",
229
- "name": "",
230
- "type": "address"
231
- },
232
- {
233
- "internalType": "address",
234
- "name": "provider",
235
- "type": "address"
236
- },
237
- {
238
- "internalType": "uint256",
239
- "name": "",
240
- "type": "uint256"
241
- }
242
- ],
243
- "name": "acceptsDeposit",
244
- "outputs": [
245
- {
246
- "internalType": "bool",
247
- "name": "",
248
- "type": "bool"
249
- }
250
- ],
251
- "stateMutability": "view",
252
- "type": "function"
253
- },
254
- {
255
- "inputs": [
256
- {
257
- "internalType": "contract IEToken",
258
- "name": "",
259
- "type": "address"
260
- },
261
- {
262
- "internalType": "address",
263
- "name": "",
264
- "type": "address"
265
- },
266
- {
267
- "internalType": "address",
268
- "name": "providerTo",
269
- "type": "address"
270
- },
271
- {
272
- "internalType": "uint256",
273
- "name": "",
274
- "type": "uint256"
275
- }
276
- ],
277
- "name": "acceptsTransfer",
278
- "outputs": [
279
- {
280
- "internalType": "bool",
281
- "name": "",
282
- "type": "bool"
283
- }
284
- ],
285
- "stateMutability": "view",
286
- "type": "function"
287
- },
288
- {
289
- "inputs": [
290
- {
291
- "internalType": "contract IEToken",
292
- "name": "etoken",
293
- "type": "address"
294
- },
295
- {
296
- "internalType": "address",
297
- "name": "provider",
298
- "type": "address"
299
- },
300
- {
301
- "internalType": "uint256",
302
- "name": "amount",
303
- "type": "uint256"
304
- }
305
- ],
306
- "name": "acceptsWithdrawal",
307
- "outputs": [
308
- {
309
- "internalType": "bool",
310
- "name": "",
311
- "type": "bool"
312
- }
313
- ],
314
- "stateMutability": "view",
315
- "type": "function"
316
- },
317
- {
318
- "inputs": [],
319
- "name": "currency",
320
- "outputs": [
321
- {
322
- "internalType": "contract IERC20Metadata",
323
- "name": "",
324
- "type": "address"
325
- }
326
- ],
327
- "stateMutability": "view",
328
- "type": "function"
329
- },
330
- {
331
- "inputs": [],
332
- "name": "initialize",
333
- "outputs": [],
334
- "stateMutability": "nonpayable",
335
- "type": "function"
336
- },
337
- {
338
- "inputs": [],
339
- "name": "lastTweak",
340
- "outputs": [
341
- {
342
- "internalType": "uint40",
343
- "name": "",
344
- "type": "uint40"
345
- },
346
- {
347
- "internalType": "uint56",
348
- "name": "",
349
- "type": "uint56"
350
- }
351
- ],
352
- "stateMutability": "view",
353
- "type": "function"
354
- },
355
- {
356
- "inputs": [],
357
- "name": "pause",
358
- "outputs": [],
359
- "stateMutability": "nonpayable",
360
- "type": "function"
361
- },
362
- {
363
- "inputs": [],
364
- "name": "paused",
365
- "outputs": [
366
- {
367
- "internalType": "bool",
368
- "name": "",
369
- "type": "bool"
370
- }
371
- ],
372
- "stateMutability": "view",
373
- "type": "function"
374
- },
375
- {
376
- "inputs": [],
377
- "name": "policyPool",
378
- "outputs": [
379
- {
380
- "internalType": "contract IPolicyPool",
381
- "name": "",
382
- "type": "address"
383
- }
384
- ],
385
- "stateMutability": "view",
386
- "type": "function"
387
- },
388
- {
389
- "inputs": [],
390
- "name": "proxiableUUID",
391
- "outputs": [
392
- {
393
- "internalType": "bytes32",
394
- "name": "",
395
- "type": "bytes32"
396
- }
397
- ],
398
- "stateMutability": "view",
399
- "type": "function"
400
- },
401
- {
402
- "inputs": [
403
- {
404
- "internalType": "bytes4",
405
- "name": "interfaceId",
406
- "type": "bytes4"
407
- }
408
- ],
409
- "name": "supportsInterface",
410
- "outputs": [
411
- {
412
- "internalType": "bool",
413
- "name": "",
414
- "type": "bool"
415
- }
416
- ],
417
- "stateMutability": "view",
418
- "type": "function"
419
- },
420
- {
421
- "inputs": [],
422
- "name": "unpause",
423
- "outputs": [],
424
- "stateMutability": "nonpayable",
425
- "type": "function"
426
- },
427
- {
428
- "inputs": [
429
- {
430
- "internalType": "address",
431
- "name": "newImplementation",
432
- "type": "address"
433
- }
434
- ],
435
- "name": "upgradeTo",
436
- "outputs": [],
437
- "stateMutability": "nonpayable",
438
- "type": "function"
439
- },
440
- {
441
- "inputs": [
442
- {
443
- "internalType": "address",
444
- "name": "newImplementation",
445
- "type": "address"
446
- },
447
- {
448
- "internalType": "bytes",
449
- "name": "data",
450
- "type": "bytes"
451
- }
452
- ],
453
- "name": "upgradeToAndCall",
454
- "outputs": [],
455
- "stateMutability": "payable",
456
- "type": "function"
457
- },
458
- {
459
- "inputs": [
460
- {
461
- "internalType": "address",
462
- "name": "provider",
463
- "type": "address"
464
- },
465
- {
466
- "internalType": "bool",
467
- "name": "whitelisted",
468
- "type": "bool"
469
- }
470
- ],
471
- "name": "whitelistAddress",
472
- "outputs": [],
473
- "stateMutability": "nonpayable",
474
- "type": "function"
475
- }
476
- ],
477
- "bytecode": "0x",
478
- "deployedBytecode": "0x",
479
- "linkReferences": {},
480
- "deployedLinkReferences": {}
481
- }