@ensuro/core 2.8.0 → 2.8.2

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 (52) hide show
  1. package/build/contracts/AccessManager.sol/AccessManager.json +618 -0
  2. package/build/contracts/ERC4626AssetManager.sol/ERC4626AssetManager.json +238 -0
  3. package/build/contracts/EToken.sol/EToken.json +1287 -0
  4. package/build/contracts/LPManualWhitelist.sol/LPManualWhitelist.json +657 -0
  5. package/build/contracts/LiquidityThresholdAssetManager.sol/LiquidityThresholdAssetManager.json +222 -0
  6. package/build/contracts/Policy.sol/Policy.json +10 -0
  7. package/build/contracts/PolicyPool.sol/PolicyPool.json +1775 -0
  8. package/build/contracts/PolicyPoolComponent.sol/PolicyPoolComponent.json +342 -0
  9. package/build/contracts/PremiumsAccount.sol/PremiumsAccount.json +1142 -0
  10. package/build/contracts/Reserve.sol/Reserve.json +413 -0
  11. package/build/contracts/RiskModule.sol/RiskModule.json +589 -0
  12. package/build/contracts/SignedBucketRiskModule.sol/SignedBucketRiskModule.json +1251 -0
  13. package/build/contracts/SignedQuoteRiskModule.sol/SignedQuoteRiskModule.json +1145 -0
  14. package/build/contracts/TimeScaled.sol/TimeScaled.json +10 -0
  15. package/build/contracts/TrustfulRiskModule.sol/TrustfulRiskModule.json +1143 -0
  16. package/build/contracts/dependencies/WadRayMath.sol/WadRayMath.json +10 -0
  17. package/build/contracts/interfaces/IAccessManager.sol/IAccessManager.json +343 -0
  18. package/build/contracts/interfaces/IAssetManager.sol/IAssetManager.json +128 -0
  19. package/build/contracts/interfaces/IEToken.sol/IEToken.json +460 -0
  20. package/build/contracts/interfaces/ILPWhitelist.sol/ILPWhitelist.json +103 -0
  21. package/build/contracts/interfaces/IPolicyHolder.sol/IPolicyHolder.json +108 -0
  22. package/build/contracts/interfaces/IPolicyHolderV2.sol/IPolicyHolderV2.json +142 -0
  23. package/build/contracts/interfaces/IPolicyPool.sol/IPolicyPool.json +820 -0
  24. package/build/contracts/interfaces/IPolicyPoolComponent.sol/IPolicyPoolComponent.json +43 -0
  25. package/build/contracts/interfaces/IPremiumsAccount.sol/IPremiumsAccount.json +477 -0
  26. package/build/contracts/interfaces/IRiskModule.sol/IRiskModule.json +165 -0
  27. package/build/contracts/migration/LPManualWhitelistV20.sol/LPManualWhitelistV20.json +491 -0
  28. package/build/contracts/migration/LPManualWhitelistV20Upgraded.sol/LPManualWhitelistV20Upgraded.json +502 -0
  29. package/build/contracts/mocks/FixedRateVault.sol/FixedRateVault.json +736 -0
  30. package/build/contracts/mocks/ForwardProxy.sol/ForwardProxy.json +43 -0
  31. package/build/contracts/mocks/IMintableERC20.sol/IMintableERC20.json +47 -0
  32. package/build/contracts/mocks/InterfaceIdCalculator.sol/InterfaceIdCalculator.json +193 -0
  33. package/build/contracts/mocks/PolicyHolderMock.sol/PolicyHolderMock.json +457 -0
  34. package/build/contracts/mocks/PolicyPoolComponentMock.sol/PolicyPoolComponentMock.json +54 -0
  35. package/build/contracts/mocks/PolicyPoolMock.sol/PolicyPoolMock.json +929 -0
  36. package/build/contracts/mocks/PolicyPoolMock.sol/PolicyPoolMockForward.json +92 -0
  37. package/build/contracts/mocks/RiskModuleMock.sol/RiskModuleMock.json +1316 -0
  38. package/build/contracts/mocks/TestCurrency.sol/TestCurrency.json +343 -0
  39. package/build/contracts/mocks/TestNFT.sol/TestNFT.json +388 -0
  40. package/contracts/Policy.sol +58 -21
  41. package/contracts/PolicyPool.sol +155 -37
  42. package/contracts/PolicyPoolComponent.sol +5 -2
  43. package/contracts/RiskModule.sol +27 -30
  44. package/contracts/SignedBucketRiskModule.sol +32 -95
  45. package/contracts/SignedQuoteRiskModule.sol +3 -1
  46. package/contracts/interfaces/IPolicyHolder.sol +2 -2
  47. package/contracts/interfaces/IPolicyHolderV2.sol +29 -0
  48. package/contracts/mocks/PolicyHolderMock.sol +71 -10
  49. package/js/deploy.js +6 -25
  50. package/js/utils.js +9 -4
  51. package/package.json +3 -5
  52. package/contracts/TieredSignedQuoteRiskModule.sol +0 -159
@@ -0,0 +1,589 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "RiskModule",
4
+ "sourceName": "contracts/RiskModule.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [],
8
+ "name": "ExposureLimitCannotBeLessThanActiveExposure",
9
+ "type": "error"
10
+ },
11
+ {
12
+ "inputs": [],
13
+ "name": "NoZeroPolicyPool",
14
+ "type": "error"
15
+ },
16
+ {
17
+ "inputs": [],
18
+ "name": "NoZeroWallet",
19
+ "type": "error"
20
+ },
21
+ {
22
+ "inputs": [],
23
+ "name": "PremiumsAccountMustBePartOfThePool",
24
+ "type": "error"
25
+ },
26
+ {
27
+ "inputs": [],
28
+ "name": "UpgradeCannotChangePolicyPool",
29
+ "type": "error"
30
+ },
31
+ {
32
+ "inputs": [],
33
+ "name": "UpgradeCannotChangePremiumsAccount",
34
+ "type": "error"
35
+ },
36
+ {
37
+ "anonymous": false,
38
+ "inputs": [
39
+ {
40
+ "indexed": false,
41
+ "internalType": "address",
42
+ "name": "previousAdmin",
43
+ "type": "address"
44
+ },
45
+ {
46
+ "indexed": false,
47
+ "internalType": "address",
48
+ "name": "newAdmin",
49
+ "type": "address"
50
+ }
51
+ ],
52
+ "name": "AdminChanged",
53
+ "type": "event"
54
+ },
55
+ {
56
+ "anonymous": false,
57
+ "inputs": [
58
+ {
59
+ "indexed": true,
60
+ "internalType": "address",
61
+ "name": "beacon",
62
+ "type": "address"
63
+ }
64
+ ],
65
+ "name": "BeaconUpgraded",
66
+ "type": "event"
67
+ },
68
+ {
69
+ "anonymous": false,
70
+ "inputs": [
71
+ {
72
+ "indexed": true,
73
+ "internalType": "enum IAccessManager.GovernanceActions",
74
+ "name": "action",
75
+ "type": "uint8"
76
+ },
77
+ {
78
+ "indexed": false,
79
+ "internalType": "address",
80
+ "name": "value",
81
+ "type": "address"
82
+ }
83
+ ],
84
+ "name": "ComponentChanged",
85
+ "type": "event"
86
+ },
87
+ {
88
+ "anonymous": false,
89
+ "inputs": [
90
+ {
91
+ "indexed": true,
92
+ "internalType": "enum IAccessManager.GovernanceActions",
93
+ "name": "action",
94
+ "type": "uint8"
95
+ },
96
+ {
97
+ "indexed": false,
98
+ "internalType": "uint256",
99
+ "name": "value",
100
+ "type": "uint256"
101
+ }
102
+ ],
103
+ "name": "GovernanceAction",
104
+ "type": "event"
105
+ },
106
+ {
107
+ "anonymous": false,
108
+ "inputs": [
109
+ {
110
+ "indexed": false,
111
+ "internalType": "uint8",
112
+ "name": "version",
113
+ "type": "uint8"
114
+ }
115
+ ],
116
+ "name": "Initialized",
117
+ "type": "event"
118
+ },
119
+ {
120
+ "anonymous": false,
121
+ "inputs": [
122
+ {
123
+ "indexed": false,
124
+ "internalType": "address",
125
+ "name": "account",
126
+ "type": "address"
127
+ }
128
+ ],
129
+ "name": "Paused",
130
+ "type": "event"
131
+ },
132
+ {
133
+ "anonymous": false,
134
+ "inputs": [
135
+ {
136
+ "indexed": false,
137
+ "internalType": "address",
138
+ "name": "account",
139
+ "type": "address"
140
+ }
141
+ ],
142
+ "name": "Unpaused",
143
+ "type": "event"
144
+ },
145
+ {
146
+ "anonymous": false,
147
+ "inputs": [
148
+ {
149
+ "indexed": true,
150
+ "internalType": "address",
151
+ "name": "implementation",
152
+ "type": "address"
153
+ }
154
+ ],
155
+ "name": "Upgraded",
156
+ "type": "event"
157
+ },
158
+ {
159
+ "inputs": [],
160
+ "name": "GUARDIAN_ROLE",
161
+ "outputs": [
162
+ {
163
+ "internalType": "bytes32",
164
+ "name": "",
165
+ "type": "bytes32"
166
+ }
167
+ ],
168
+ "stateMutability": "view",
169
+ "type": "function"
170
+ },
171
+ {
172
+ "inputs": [],
173
+ "name": "LEVEL1_ROLE",
174
+ "outputs": [
175
+ {
176
+ "internalType": "bytes32",
177
+ "name": "",
178
+ "type": "bytes32"
179
+ }
180
+ ],
181
+ "stateMutability": "view",
182
+ "type": "function"
183
+ },
184
+ {
185
+ "inputs": [],
186
+ "name": "LEVEL2_ROLE",
187
+ "outputs": [
188
+ {
189
+ "internalType": "bytes32",
190
+ "name": "",
191
+ "type": "bytes32"
192
+ }
193
+ ],
194
+ "stateMutability": "view",
195
+ "type": "function"
196
+ },
197
+ {
198
+ "inputs": [],
199
+ "name": "LEVEL3_ROLE",
200
+ "outputs": [
201
+ {
202
+ "internalType": "bytes32",
203
+ "name": "",
204
+ "type": "bytes32"
205
+ }
206
+ ],
207
+ "stateMutability": "view",
208
+ "type": "function"
209
+ },
210
+ {
211
+ "inputs": [],
212
+ "name": "RM_PROVIDER_ROLE",
213
+ "outputs": [
214
+ {
215
+ "internalType": "bytes32",
216
+ "name": "",
217
+ "type": "bytes32"
218
+ }
219
+ ],
220
+ "stateMutability": "view",
221
+ "type": "function"
222
+ },
223
+ {
224
+ "inputs": [],
225
+ "name": "TWEAK_EXPIRATION",
226
+ "outputs": [
227
+ {
228
+ "internalType": "uint40",
229
+ "name": "",
230
+ "type": "uint40"
231
+ }
232
+ ],
233
+ "stateMutability": "view",
234
+ "type": "function"
235
+ },
236
+ {
237
+ "inputs": [],
238
+ "name": "activeExposure",
239
+ "outputs": [
240
+ {
241
+ "internalType": "uint256",
242
+ "name": "",
243
+ "type": "uint256"
244
+ }
245
+ ],
246
+ "stateMutability": "view",
247
+ "type": "function"
248
+ },
249
+ {
250
+ "inputs": [],
251
+ "name": "currency",
252
+ "outputs": [
253
+ {
254
+ "internalType": "contract IERC20Metadata",
255
+ "name": "",
256
+ "type": "address"
257
+ }
258
+ ],
259
+ "stateMutability": "view",
260
+ "type": "function"
261
+ },
262
+ {
263
+ "inputs": [],
264
+ "name": "exposureLimit",
265
+ "outputs": [
266
+ {
267
+ "internalType": "uint256",
268
+ "name": "",
269
+ "type": "uint256"
270
+ }
271
+ ],
272
+ "stateMutability": "view",
273
+ "type": "function"
274
+ },
275
+ {
276
+ "inputs": [
277
+ {
278
+ "internalType": "uint256",
279
+ "name": "payout",
280
+ "type": "uint256"
281
+ },
282
+ {
283
+ "internalType": "uint256",
284
+ "name": "lossProb",
285
+ "type": "uint256"
286
+ },
287
+ {
288
+ "internalType": "uint40",
289
+ "name": "expiration",
290
+ "type": "uint40"
291
+ }
292
+ ],
293
+ "name": "getMinimumPremium",
294
+ "outputs": [
295
+ {
296
+ "internalType": "uint256",
297
+ "name": "",
298
+ "type": "uint256"
299
+ }
300
+ ],
301
+ "stateMutability": "view",
302
+ "type": "function"
303
+ },
304
+ {
305
+ "inputs": [],
306
+ "name": "lastTweak",
307
+ "outputs": [
308
+ {
309
+ "internalType": "uint40",
310
+ "name": "",
311
+ "type": "uint40"
312
+ },
313
+ {
314
+ "internalType": "uint56",
315
+ "name": "",
316
+ "type": "uint56"
317
+ }
318
+ ],
319
+ "stateMutability": "view",
320
+ "type": "function"
321
+ },
322
+ {
323
+ "inputs": [],
324
+ "name": "maxDuration",
325
+ "outputs": [
326
+ {
327
+ "internalType": "uint256",
328
+ "name": "",
329
+ "type": "uint256"
330
+ }
331
+ ],
332
+ "stateMutability": "view",
333
+ "type": "function"
334
+ },
335
+ {
336
+ "inputs": [],
337
+ "name": "maxPayoutPerPolicy",
338
+ "outputs": [
339
+ {
340
+ "internalType": "uint256",
341
+ "name": "",
342
+ "type": "uint256"
343
+ }
344
+ ],
345
+ "stateMutability": "view",
346
+ "type": "function"
347
+ },
348
+ {
349
+ "inputs": [],
350
+ "name": "name",
351
+ "outputs": [
352
+ {
353
+ "internalType": "string",
354
+ "name": "",
355
+ "type": "string"
356
+ }
357
+ ],
358
+ "stateMutability": "view",
359
+ "type": "function"
360
+ },
361
+ {
362
+ "inputs": [],
363
+ "name": "params",
364
+ "outputs": [
365
+ {
366
+ "components": [
367
+ {
368
+ "internalType": "uint256",
369
+ "name": "moc",
370
+ "type": "uint256"
371
+ },
372
+ {
373
+ "internalType": "uint256",
374
+ "name": "jrCollRatio",
375
+ "type": "uint256"
376
+ },
377
+ {
378
+ "internalType": "uint256",
379
+ "name": "collRatio",
380
+ "type": "uint256"
381
+ },
382
+ {
383
+ "internalType": "uint256",
384
+ "name": "ensuroPpFee",
385
+ "type": "uint256"
386
+ },
387
+ {
388
+ "internalType": "uint256",
389
+ "name": "ensuroCocFee",
390
+ "type": "uint256"
391
+ },
392
+ {
393
+ "internalType": "uint256",
394
+ "name": "jrRoc",
395
+ "type": "uint256"
396
+ },
397
+ {
398
+ "internalType": "uint256",
399
+ "name": "srRoc",
400
+ "type": "uint256"
401
+ }
402
+ ],
403
+ "internalType": "struct IRiskModule.Params",
404
+ "name": "ret",
405
+ "type": "tuple"
406
+ }
407
+ ],
408
+ "stateMutability": "view",
409
+ "type": "function"
410
+ },
411
+ {
412
+ "inputs": [],
413
+ "name": "pause",
414
+ "outputs": [],
415
+ "stateMutability": "nonpayable",
416
+ "type": "function"
417
+ },
418
+ {
419
+ "inputs": [],
420
+ "name": "paused",
421
+ "outputs": [
422
+ {
423
+ "internalType": "bool",
424
+ "name": "",
425
+ "type": "bool"
426
+ }
427
+ ],
428
+ "stateMutability": "view",
429
+ "type": "function"
430
+ },
431
+ {
432
+ "inputs": [],
433
+ "name": "policyPool",
434
+ "outputs": [
435
+ {
436
+ "internalType": "contract IPolicyPool",
437
+ "name": "",
438
+ "type": "address"
439
+ }
440
+ ],
441
+ "stateMutability": "view",
442
+ "type": "function"
443
+ },
444
+ {
445
+ "inputs": [],
446
+ "name": "premiumsAccount",
447
+ "outputs": [
448
+ {
449
+ "internalType": "contract IPremiumsAccount",
450
+ "name": "",
451
+ "type": "address"
452
+ }
453
+ ],
454
+ "stateMutability": "view",
455
+ "type": "function"
456
+ },
457
+ {
458
+ "inputs": [],
459
+ "name": "proxiableUUID",
460
+ "outputs": [
461
+ {
462
+ "internalType": "bytes32",
463
+ "name": "",
464
+ "type": "bytes32"
465
+ }
466
+ ],
467
+ "stateMutability": "view",
468
+ "type": "function"
469
+ },
470
+ {
471
+ "inputs": [
472
+ {
473
+ "internalType": "uint256",
474
+ "name": "payout",
475
+ "type": "uint256"
476
+ }
477
+ ],
478
+ "name": "releaseExposure",
479
+ "outputs": [],
480
+ "stateMutability": "nonpayable",
481
+ "type": "function"
482
+ },
483
+ {
484
+ "inputs": [
485
+ {
486
+ "internalType": "enum IRiskModule.Parameter",
487
+ "name": "param",
488
+ "type": "uint8"
489
+ },
490
+ {
491
+ "internalType": "uint256",
492
+ "name": "newValue",
493
+ "type": "uint256"
494
+ }
495
+ ],
496
+ "name": "setParam",
497
+ "outputs": [],
498
+ "stateMutability": "nonpayable",
499
+ "type": "function"
500
+ },
501
+ {
502
+ "inputs": [
503
+ {
504
+ "internalType": "address",
505
+ "name": "wallet_",
506
+ "type": "address"
507
+ }
508
+ ],
509
+ "name": "setWallet",
510
+ "outputs": [],
511
+ "stateMutability": "nonpayable",
512
+ "type": "function"
513
+ },
514
+ {
515
+ "inputs": [
516
+ {
517
+ "internalType": "bytes4",
518
+ "name": "interfaceId",
519
+ "type": "bytes4"
520
+ }
521
+ ],
522
+ "name": "supportsInterface",
523
+ "outputs": [
524
+ {
525
+ "internalType": "bool",
526
+ "name": "",
527
+ "type": "bool"
528
+ }
529
+ ],
530
+ "stateMutability": "view",
531
+ "type": "function"
532
+ },
533
+ {
534
+ "inputs": [],
535
+ "name": "unpause",
536
+ "outputs": [],
537
+ "stateMutability": "nonpayable",
538
+ "type": "function"
539
+ },
540
+ {
541
+ "inputs": [
542
+ {
543
+ "internalType": "address",
544
+ "name": "newImplementation",
545
+ "type": "address"
546
+ }
547
+ ],
548
+ "name": "upgradeTo",
549
+ "outputs": [],
550
+ "stateMutability": "nonpayable",
551
+ "type": "function"
552
+ },
553
+ {
554
+ "inputs": [
555
+ {
556
+ "internalType": "address",
557
+ "name": "newImplementation",
558
+ "type": "address"
559
+ },
560
+ {
561
+ "internalType": "bytes",
562
+ "name": "data",
563
+ "type": "bytes"
564
+ }
565
+ ],
566
+ "name": "upgradeToAndCall",
567
+ "outputs": [],
568
+ "stateMutability": "payable",
569
+ "type": "function"
570
+ },
571
+ {
572
+ "inputs": [],
573
+ "name": "wallet",
574
+ "outputs": [
575
+ {
576
+ "internalType": "address",
577
+ "name": "",
578
+ "type": "address"
579
+ }
580
+ ],
581
+ "stateMutability": "view",
582
+ "type": "function"
583
+ }
584
+ ],
585
+ "bytecode": "0x",
586
+ "deployedBytecode": "0x",
587
+ "linkReferences": {},
588
+ "deployedLinkReferences": {}
589
+ }