@ensuro/core 2.8.1 → 2.8.3

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