@ensuro/core 1.2.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 (55) hide show
  1. package/README.md +93 -0
  2. package/build/contracts/AaveAssetManager.sol/AaveAssetManager.json +772 -0
  3. package/build/contracts/BaseAssetManager.sol/BaseAssetManager.json +494 -0
  4. package/build/contracts/DataTypes.sol/DataTypes.json +10 -0
  5. package/build/contracts/EToken.sol/EToken.json +1148 -0
  6. package/build/contracts/FlightDelayRiskModule.sol/FlightDelayRiskModule.json +1093 -0
  7. package/build/contracts/LPManualWhitelist.sol/LPManualWhitelist.json +412 -0
  8. package/build/contracts/Policy.sol/Policy.json +10 -0
  9. package/build/contracts/PolicyNFT.sol/PolicyNFT.json +570 -0
  10. package/build/contracts/PolicyPool.sol/PolicyPool.json +1257 -0
  11. package/build/contracts/PolicyPoolComponent.sol/PolicyPoolComponent.json +281 -0
  12. package/build/contracts/PolicyPoolConfig.sol/PolicyPoolConfig.json +660 -0
  13. package/build/contracts/RiskModule.sol/RiskModule.json +748 -0
  14. package/build/contracts/TrustfulRiskModule.sol/TrustfulRiskModule.json +1032 -0
  15. package/build/contracts/WadRayMath.sol/WadRayMath.json +10 -0
  16. package/build/contracts/dependencies/ChainlinkClientUpgradeable.sol/ChainlinkClientUpgradeable.json +50 -0
  17. package/build/contracts/upgraded/IPolicyNFTv1.sol/IPolicyNFTv1.json +322 -0
  18. package/build/contracts/upgraded/PolicyNFTv1.sol/PolicyNFTv1.json +571 -0
  19. package/build/contracts/upgraded/PolicyNFTv1.sol/PolicyNFTv1_Upgrade.json +602 -0
  20. package/build/interfaces/IAssetManager.sol/IAssetManager.json +31 -0
  21. package/build/interfaces/IEToken.sol/IEToken.json +491 -0
  22. package/build/interfaces/IInsolvencyHook.sol/IInsolvencyHook.json +42 -0
  23. package/build/interfaces/ILPWhitelist.sol/ILPWhitelist.json +74 -0
  24. package/build/interfaces/IPolicyNFT.sol/IPolicyNFT.json +321 -0
  25. package/build/interfaces/IPolicyPool.sol/IPolicyPool.json +445 -0
  26. package/build/interfaces/IPolicyPoolComponent.sol/IPolicyPoolComponent.json +24 -0
  27. package/build/interfaces/IPolicyPoolConfig.sol/IPolicyPoolConfig.json +328 -0
  28. package/build/interfaces/IRiskModule.sol/IRiskModule.json +141 -0
  29. package/contracts/AaveAssetManager.sol +326 -0
  30. package/contracts/BaseAssetManager.sol +283 -0
  31. package/contracts/DataTypes.sol +287 -0
  32. package/contracts/EToken.sol +773 -0
  33. package/contracts/FlightDelayRiskModule.sol +208 -0
  34. package/contracts/LPManualWhitelist.sol +57 -0
  35. package/contracts/Policy.sol +104 -0
  36. package/contracts/PolicyNFT.sol +96 -0
  37. package/contracts/PolicyPool.sol +716 -0
  38. package/contracts/PolicyPoolComponent.sol +164 -0
  39. package/contracts/PolicyPoolConfig.sol +231 -0
  40. package/contracts/RiskModule.sol +323 -0
  41. package/contracts/TrustfulRiskModule.sol +81 -0
  42. package/contracts/WadRayMath.sol +135 -0
  43. package/contracts/dependencies/ChainlinkClientUpgradeable.sol +371 -0
  44. package/contracts/upgraded/IPolicyNFTv1.sol +15 -0
  45. package/contracts/upgraded/PolicyNFTv1.sol +126 -0
  46. package/interfaces/IAssetManager.sol +23 -0
  47. package/interfaces/IEToken.sol +44 -0
  48. package/interfaces/IInsolvencyHook.sol +27 -0
  49. package/interfaces/ILPWhitelist.sol +23 -0
  50. package/interfaces/IPolicyNFT.sol +15 -0
  51. package/interfaces/IPolicyPool.sol +44 -0
  52. package/interfaces/IPolicyPoolComponent.sol +13 -0
  53. package/interfaces/IPolicyPoolConfig.sol +81 -0
  54. package/interfaces/IRiskModule.sol +29 -0
  55. package/package.json +30 -0
@@ -0,0 +1,445 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "IPolicyPool",
4
+ "sourceName": "interfaces/IPolicyPool.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "uint256",
10
+ "name": "amount",
11
+ "type": "uint256"
12
+ },
13
+ {
14
+ "internalType": "bool",
15
+ "name": "positive",
16
+ "type": "bool"
17
+ }
18
+ ],
19
+ "name": "assetEarnings",
20
+ "outputs": [],
21
+ "stateMutability": "nonpayable",
22
+ "type": "function"
23
+ },
24
+ {
25
+ "inputs": [],
26
+ "name": "config",
27
+ "outputs": [
28
+ {
29
+ "internalType": "contract IPolicyPoolConfig",
30
+ "name": "",
31
+ "type": "address"
32
+ }
33
+ ],
34
+ "stateMutability": "view",
35
+ "type": "function"
36
+ },
37
+ {
38
+ "inputs": [],
39
+ "name": "currency",
40
+ "outputs": [
41
+ {
42
+ "internalType": "contract IERC20Metadata",
43
+ "name": "",
44
+ "type": "address"
45
+ }
46
+ ],
47
+ "stateMutability": "view",
48
+ "type": "function"
49
+ },
50
+ {
51
+ "inputs": [
52
+ {
53
+ "internalType": "contract IEToken",
54
+ "name": "eToken",
55
+ "type": "address"
56
+ },
57
+ {
58
+ "internalType": "uint256",
59
+ "name": "amount",
60
+ "type": "uint256"
61
+ }
62
+ ],
63
+ "name": "deposit",
64
+ "outputs": [],
65
+ "stateMutability": "nonpayable",
66
+ "type": "function"
67
+ },
68
+ {
69
+ "inputs": [
70
+ {
71
+ "internalType": "uint256",
72
+ "name": "index",
73
+ "type": "uint256"
74
+ }
75
+ ],
76
+ "name": "getETokenAt",
77
+ "outputs": [
78
+ {
79
+ "internalType": "contract IEToken",
80
+ "name": "",
81
+ "type": "address"
82
+ }
83
+ ],
84
+ "stateMutability": "view",
85
+ "type": "function"
86
+ },
87
+ {
88
+ "inputs": [],
89
+ "name": "getETokenCount",
90
+ "outputs": [
91
+ {
92
+ "internalType": "uint256",
93
+ "name": "",
94
+ "type": "uint256"
95
+ }
96
+ ],
97
+ "stateMutability": "view",
98
+ "type": "function"
99
+ },
100
+ {
101
+ "inputs": [],
102
+ "name": "getInvestable",
103
+ "outputs": [
104
+ {
105
+ "internalType": "uint256",
106
+ "name": "",
107
+ "type": "uint256"
108
+ }
109
+ ],
110
+ "stateMutability": "view",
111
+ "type": "function"
112
+ },
113
+ {
114
+ "inputs": [
115
+ {
116
+ "components": [
117
+ {
118
+ "internalType": "uint256",
119
+ "name": "id",
120
+ "type": "uint256"
121
+ },
122
+ {
123
+ "internalType": "uint256",
124
+ "name": "payout",
125
+ "type": "uint256"
126
+ },
127
+ {
128
+ "internalType": "uint256",
129
+ "name": "premium",
130
+ "type": "uint256"
131
+ },
132
+ {
133
+ "internalType": "uint256",
134
+ "name": "scr",
135
+ "type": "uint256"
136
+ },
137
+ {
138
+ "internalType": "uint256",
139
+ "name": "lossProb",
140
+ "type": "uint256"
141
+ },
142
+ {
143
+ "internalType": "uint256",
144
+ "name": "purePremium",
145
+ "type": "uint256"
146
+ },
147
+ {
148
+ "internalType": "uint256",
149
+ "name": "premiumForEnsuro",
150
+ "type": "uint256"
151
+ },
152
+ {
153
+ "internalType": "uint256",
154
+ "name": "premiumForRm",
155
+ "type": "uint256"
156
+ },
157
+ {
158
+ "internalType": "uint256",
159
+ "name": "premiumForLps",
160
+ "type": "uint256"
161
+ },
162
+ {
163
+ "internalType": "contract IRiskModule",
164
+ "name": "riskModule",
165
+ "type": "address"
166
+ },
167
+ {
168
+ "internalType": "uint40",
169
+ "name": "start",
170
+ "type": "uint40"
171
+ },
172
+ {
173
+ "internalType": "uint40",
174
+ "name": "expiration",
175
+ "type": "uint40"
176
+ }
177
+ ],
178
+ "internalType": "struct Policy.PolicyData",
179
+ "name": "policy",
180
+ "type": "tuple"
181
+ },
182
+ {
183
+ "internalType": "address",
184
+ "name": "customer",
185
+ "type": "address"
186
+ },
187
+ {
188
+ "internalType": "uint96",
189
+ "name": "internalId",
190
+ "type": "uint96"
191
+ }
192
+ ],
193
+ "name": "newPolicy",
194
+ "outputs": [
195
+ {
196
+ "internalType": "uint256",
197
+ "name": "",
198
+ "type": "uint256"
199
+ }
200
+ ],
201
+ "stateMutability": "nonpayable",
202
+ "type": "function"
203
+ },
204
+ {
205
+ "inputs": [],
206
+ "name": "policyNFT",
207
+ "outputs": [
208
+ {
209
+ "internalType": "address",
210
+ "name": "",
211
+ "type": "address"
212
+ }
213
+ ],
214
+ "stateMutability": "view",
215
+ "type": "function"
216
+ },
217
+ {
218
+ "inputs": [
219
+ {
220
+ "internalType": "uint256",
221
+ "name": "amount",
222
+ "type": "uint256"
223
+ }
224
+ ],
225
+ "name": "receiveGrant",
226
+ "outputs": [],
227
+ "stateMutability": "nonpayable",
228
+ "type": "function"
229
+ },
230
+ {
231
+ "inputs": [
232
+ {
233
+ "components": [
234
+ {
235
+ "internalType": "uint256",
236
+ "name": "id",
237
+ "type": "uint256"
238
+ },
239
+ {
240
+ "internalType": "uint256",
241
+ "name": "payout",
242
+ "type": "uint256"
243
+ },
244
+ {
245
+ "internalType": "uint256",
246
+ "name": "premium",
247
+ "type": "uint256"
248
+ },
249
+ {
250
+ "internalType": "uint256",
251
+ "name": "scr",
252
+ "type": "uint256"
253
+ },
254
+ {
255
+ "internalType": "uint256",
256
+ "name": "lossProb",
257
+ "type": "uint256"
258
+ },
259
+ {
260
+ "internalType": "uint256",
261
+ "name": "purePremium",
262
+ "type": "uint256"
263
+ },
264
+ {
265
+ "internalType": "uint256",
266
+ "name": "premiumForEnsuro",
267
+ "type": "uint256"
268
+ },
269
+ {
270
+ "internalType": "uint256",
271
+ "name": "premiumForRm",
272
+ "type": "uint256"
273
+ },
274
+ {
275
+ "internalType": "uint256",
276
+ "name": "premiumForLps",
277
+ "type": "uint256"
278
+ },
279
+ {
280
+ "internalType": "contract IRiskModule",
281
+ "name": "riskModule",
282
+ "type": "address"
283
+ },
284
+ {
285
+ "internalType": "uint40",
286
+ "name": "start",
287
+ "type": "uint40"
288
+ },
289
+ {
290
+ "internalType": "uint40",
291
+ "name": "expiration",
292
+ "type": "uint40"
293
+ }
294
+ ],
295
+ "internalType": "struct Policy.PolicyData",
296
+ "name": "policy",
297
+ "type": "tuple"
298
+ },
299
+ {
300
+ "internalType": "uint256",
301
+ "name": "payout",
302
+ "type": "uint256"
303
+ }
304
+ ],
305
+ "name": "resolvePolicy",
306
+ "outputs": [],
307
+ "stateMutability": "nonpayable",
308
+ "type": "function"
309
+ },
310
+ {
311
+ "inputs": [
312
+ {
313
+ "components": [
314
+ {
315
+ "internalType": "uint256",
316
+ "name": "id",
317
+ "type": "uint256"
318
+ },
319
+ {
320
+ "internalType": "uint256",
321
+ "name": "payout",
322
+ "type": "uint256"
323
+ },
324
+ {
325
+ "internalType": "uint256",
326
+ "name": "premium",
327
+ "type": "uint256"
328
+ },
329
+ {
330
+ "internalType": "uint256",
331
+ "name": "scr",
332
+ "type": "uint256"
333
+ },
334
+ {
335
+ "internalType": "uint256",
336
+ "name": "lossProb",
337
+ "type": "uint256"
338
+ },
339
+ {
340
+ "internalType": "uint256",
341
+ "name": "purePremium",
342
+ "type": "uint256"
343
+ },
344
+ {
345
+ "internalType": "uint256",
346
+ "name": "premiumForEnsuro",
347
+ "type": "uint256"
348
+ },
349
+ {
350
+ "internalType": "uint256",
351
+ "name": "premiumForRm",
352
+ "type": "uint256"
353
+ },
354
+ {
355
+ "internalType": "uint256",
356
+ "name": "premiumForLps",
357
+ "type": "uint256"
358
+ },
359
+ {
360
+ "internalType": "contract IRiskModule",
361
+ "name": "riskModule",
362
+ "type": "address"
363
+ },
364
+ {
365
+ "internalType": "uint40",
366
+ "name": "start",
367
+ "type": "uint40"
368
+ },
369
+ {
370
+ "internalType": "uint40",
371
+ "name": "expiration",
372
+ "type": "uint40"
373
+ }
374
+ ],
375
+ "internalType": "struct Policy.PolicyData",
376
+ "name": "policy",
377
+ "type": "tuple"
378
+ },
379
+ {
380
+ "internalType": "bool",
381
+ "name": "customerWon",
382
+ "type": "bool"
383
+ }
384
+ ],
385
+ "name": "resolvePolicyFullPayout",
386
+ "outputs": [],
387
+ "stateMutability": "nonpayable",
388
+ "type": "function"
389
+ },
390
+ {
391
+ "inputs": [
392
+ {
393
+ "internalType": "contract IAssetManager",
394
+ "name": "newAssetManager",
395
+ "type": "address"
396
+ }
397
+ ],
398
+ "name": "setAssetManager",
399
+ "outputs": [],
400
+ "stateMutability": "nonpayable",
401
+ "type": "function"
402
+ },
403
+ {
404
+ "inputs": [],
405
+ "name": "totalETokenSupply",
406
+ "outputs": [
407
+ {
408
+ "internalType": "uint256",
409
+ "name": "",
410
+ "type": "uint256"
411
+ }
412
+ ],
413
+ "stateMutability": "view",
414
+ "type": "function"
415
+ },
416
+ {
417
+ "inputs": [
418
+ {
419
+ "internalType": "contract IEToken",
420
+ "name": "eToken",
421
+ "type": "address"
422
+ },
423
+ {
424
+ "internalType": "uint256",
425
+ "name": "amount",
426
+ "type": "uint256"
427
+ }
428
+ ],
429
+ "name": "withdraw",
430
+ "outputs": [
431
+ {
432
+ "internalType": "uint256",
433
+ "name": "",
434
+ "type": "uint256"
435
+ }
436
+ ],
437
+ "stateMutability": "nonpayable",
438
+ "type": "function"
439
+ }
440
+ ],
441
+ "bytecode": "0x",
442
+ "deployedBytecode": "0x",
443
+ "linkReferences": {},
444
+ "deployedLinkReferences": {}
445
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "IPolicyPoolComponent",
4
+ "sourceName": "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
+ "bytecode": "0x",
21
+ "deployedBytecode": "0x",
22
+ "linkReferences": {},
23
+ "deployedLinkReferences": {}
24
+ }