@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,494 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "BaseAssetManager",
4
+ "sourceName": "contracts/BaseAssetManager.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": false,
43
+ "internalType": "bool",
44
+ "name": "positive",
45
+ "type": "bool"
46
+ },
47
+ {
48
+ "indexed": false,
49
+ "internalType": "uint256",
50
+ "name": "amount",
51
+ "type": "uint256"
52
+ }
53
+ ],
54
+ "name": "EarningsDistributed",
55
+ "type": "event"
56
+ },
57
+ {
58
+ "anonymous": false,
59
+ "inputs": [
60
+ {
61
+ "indexed": true,
62
+ "internalType": "enum IPolicyPoolConfig.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": "uint256",
82
+ "name": "amount",
83
+ "type": "uint256"
84
+ }
85
+ ],
86
+ "name": "MoneyDeinvested",
87
+ "type": "event"
88
+ },
89
+ {
90
+ "anonymous": false,
91
+ "inputs": [
92
+ {
93
+ "indexed": false,
94
+ "internalType": "uint256",
95
+ "name": "amount",
96
+ "type": "uint256"
97
+ }
98
+ ],
99
+ "name": "MoneyInvested",
100
+ "type": "event"
101
+ },
102
+ {
103
+ "anonymous": false,
104
+ "inputs": [
105
+ {
106
+ "indexed": false,
107
+ "internalType": "address",
108
+ "name": "account",
109
+ "type": "address"
110
+ }
111
+ ],
112
+ "name": "Paused",
113
+ "type": "event"
114
+ },
115
+ {
116
+ "anonymous": false,
117
+ "inputs": [
118
+ {
119
+ "indexed": false,
120
+ "internalType": "address",
121
+ "name": "account",
122
+ "type": "address"
123
+ }
124
+ ],
125
+ "name": "Unpaused",
126
+ "type": "event"
127
+ },
128
+ {
129
+ "anonymous": false,
130
+ "inputs": [
131
+ {
132
+ "indexed": true,
133
+ "internalType": "address",
134
+ "name": "implementation",
135
+ "type": "address"
136
+ }
137
+ ],
138
+ "name": "Upgraded",
139
+ "type": "event"
140
+ },
141
+ {
142
+ "inputs": [],
143
+ "name": "GUARDIAN_ROLE",
144
+ "outputs": [
145
+ {
146
+ "internalType": "bytes32",
147
+ "name": "",
148
+ "type": "bytes32"
149
+ }
150
+ ],
151
+ "stateMutability": "view",
152
+ "type": "function"
153
+ },
154
+ {
155
+ "inputs": [],
156
+ "name": "LEVEL1_ROLE",
157
+ "outputs": [
158
+ {
159
+ "internalType": "bytes32",
160
+ "name": "",
161
+ "type": "bytes32"
162
+ }
163
+ ],
164
+ "stateMutability": "view",
165
+ "type": "function"
166
+ },
167
+ {
168
+ "inputs": [],
169
+ "name": "LEVEL2_ROLE",
170
+ "outputs": [
171
+ {
172
+ "internalType": "bytes32",
173
+ "name": "",
174
+ "type": "bytes32"
175
+ }
176
+ ],
177
+ "stateMutability": "view",
178
+ "type": "function"
179
+ },
180
+ {
181
+ "inputs": [],
182
+ "name": "LEVEL3_ROLE",
183
+ "outputs": [
184
+ {
185
+ "internalType": "bytes32",
186
+ "name": "",
187
+ "type": "bytes32"
188
+ }
189
+ ],
190
+ "stateMutability": "view",
191
+ "type": "function"
192
+ },
193
+ {
194
+ "inputs": [],
195
+ "name": "TWEAK_EXPIRATION",
196
+ "outputs": [
197
+ {
198
+ "internalType": "uint40",
199
+ "name": "",
200
+ "type": "uint40"
201
+ }
202
+ ],
203
+ "stateMutability": "view",
204
+ "type": "function"
205
+ },
206
+ {
207
+ "inputs": [],
208
+ "name": "checkpoint",
209
+ "outputs": [],
210
+ "stateMutability": "nonpayable",
211
+ "type": "function"
212
+ },
213
+ {
214
+ "inputs": [],
215
+ "name": "currency",
216
+ "outputs": [
217
+ {
218
+ "internalType": "contract IERC20Metadata",
219
+ "name": "",
220
+ "type": "address"
221
+ }
222
+ ],
223
+ "stateMutability": "view",
224
+ "type": "function"
225
+ },
226
+ {
227
+ "inputs": [],
228
+ "name": "deinvestAll",
229
+ "outputs": [],
230
+ "stateMutability": "nonpayable",
231
+ "type": "function"
232
+ },
233
+ {
234
+ "inputs": [],
235
+ "name": "distributeEarnings",
236
+ "outputs": [],
237
+ "stateMutability": "nonpayable",
238
+ "type": "function"
239
+ },
240
+ {
241
+ "inputs": [],
242
+ "name": "getInvestmentValue",
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": "lastTweak",
256
+ "outputs": [
257
+ {
258
+ "internalType": "uint40",
259
+ "name": "",
260
+ "type": "uint40"
261
+ },
262
+ {
263
+ "internalType": "uint56",
264
+ "name": "",
265
+ "type": "uint56"
266
+ }
267
+ ],
268
+ "stateMutability": "view",
269
+ "type": "function"
270
+ },
271
+ {
272
+ "inputs": [],
273
+ "name": "liquidityMax",
274
+ "outputs": [
275
+ {
276
+ "internalType": "uint256",
277
+ "name": "",
278
+ "type": "uint256"
279
+ }
280
+ ],
281
+ "stateMutability": "view",
282
+ "type": "function"
283
+ },
284
+ {
285
+ "inputs": [],
286
+ "name": "liquidityMiddle",
287
+ "outputs": [
288
+ {
289
+ "internalType": "uint256",
290
+ "name": "",
291
+ "type": "uint256"
292
+ }
293
+ ],
294
+ "stateMutability": "view",
295
+ "type": "function"
296
+ },
297
+ {
298
+ "inputs": [],
299
+ "name": "liquidityMin",
300
+ "outputs": [
301
+ {
302
+ "internalType": "uint256",
303
+ "name": "",
304
+ "type": "uint256"
305
+ }
306
+ ],
307
+ "stateMutability": "view",
308
+ "type": "function"
309
+ },
310
+ {
311
+ "inputs": [],
312
+ "name": "pause",
313
+ "outputs": [],
314
+ "stateMutability": "nonpayable",
315
+ "type": "function"
316
+ },
317
+ {
318
+ "inputs": [],
319
+ "name": "paused",
320
+ "outputs": [
321
+ {
322
+ "internalType": "bool",
323
+ "name": "",
324
+ "type": "bool"
325
+ }
326
+ ],
327
+ "stateMutability": "view",
328
+ "type": "function"
329
+ },
330
+ {
331
+ "inputs": [],
332
+ "name": "policyPool",
333
+ "outputs": [
334
+ {
335
+ "internalType": "contract IPolicyPool",
336
+ "name": "",
337
+ "type": "address"
338
+ }
339
+ ],
340
+ "stateMutability": "view",
341
+ "type": "function"
342
+ },
343
+ {
344
+ "inputs": [],
345
+ "name": "proxiableUUID",
346
+ "outputs": [
347
+ {
348
+ "internalType": "bytes32",
349
+ "name": "",
350
+ "type": "bytes32"
351
+ }
352
+ ],
353
+ "stateMutability": "view",
354
+ "type": "function"
355
+ },
356
+ {
357
+ "inputs": [],
358
+ "name": "rebalance",
359
+ "outputs": [],
360
+ "stateMutability": "nonpayable",
361
+ "type": "function"
362
+ },
363
+ {
364
+ "inputs": [
365
+ {
366
+ "internalType": "uint256",
367
+ "name": "paymentAmount",
368
+ "type": "uint256"
369
+ }
370
+ ],
371
+ "name": "refillWallet",
372
+ "outputs": [],
373
+ "stateMutability": "nonpayable",
374
+ "type": "function"
375
+ },
376
+ {
377
+ "inputs": [
378
+ {
379
+ "internalType": "uint256",
380
+ "name": "newValue",
381
+ "type": "uint256"
382
+ }
383
+ ],
384
+ "name": "setLiquidityMax",
385
+ "outputs": [],
386
+ "stateMutability": "nonpayable",
387
+ "type": "function"
388
+ },
389
+ {
390
+ "inputs": [
391
+ {
392
+ "internalType": "uint256",
393
+ "name": "newValue",
394
+ "type": "uint256"
395
+ }
396
+ ],
397
+ "name": "setLiquidityMiddle",
398
+ "outputs": [],
399
+ "stateMutability": "nonpayable",
400
+ "type": "function"
401
+ },
402
+ {
403
+ "inputs": [
404
+ {
405
+ "internalType": "uint256",
406
+ "name": "newValue",
407
+ "type": "uint256"
408
+ }
409
+ ],
410
+ "name": "setLiquidityMin",
411
+ "outputs": [],
412
+ "stateMutability": "nonpayable",
413
+ "type": "function"
414
+ },
415
+ {
416
+ "inputs": [
417
+ {
418
+ "internalType": "uint256",
419
+ "name": "min",
420
+ "type": "uint256"
421
+ },
422
+ {
423
+ "internalType": "uint256",
424
+ "name": "middle",
425
+ "type": "uint256"
426
+ },
427
+ {
428
+ "internalType": "uint256",
429
+ "name": "max",
430
+ "type": "uint256"
431
+ }
432
+ ],
433
+ "name": "setLiquidityMultiple",
434
+ "outputs": [],
435
+ "stateMutability": "nonpayable",
436
+ "type": "function"
437
+ },
438
+ {
439
+ "inputs": [],
440
+ "name": "totalInvestable",
441
+ "outputs": [
442
+ {
443
+ "internalType": "uint256",
444
+ "name": "",
445
+ "type": "uint256"
446
+ }
447
+ ],
448
+ "stateMutability": "view",
449
+ "type": "function"
450
+ },
451
+ {
452
+ "inputs": [],
453
+ "name": "unpause",
454
+ "outputs": [],
455
+ "stateMutability": "nonpayable",
456
+ "type": "function"
457
+ },
458
+ {
459
+ "inputs": [
460
+ {
461
+ "internalType": "address",
462
+ "name": "newImplementation",
463
+ "type": "address"
464
+ }
465
+ ],
466
+ "name": "upgradeTo",
467
+ "outputs": [],
468
+ "stateMutability": "nonpayable",
469
+ "type": "function"
470
+ },
471
+ {
472
+ "inputs": [
473
+ {
474
+ "internalType": "address",
475
+ "name": "newImplementation",
476
+ "type": "address"
477
+ },
478
+ {
479
+ "internalType": "bytes",
480
+ "name": "data",
481
+ "type": "bytes"
482
+ }
483
+ ],
484
+ "name": "upgradeToAndCall",
485
+ "outputs": [],
486
+ "stateMutability": "payable",
487
+ "type": "function"
488
+ }
489
+ ],
490
+ "bytecode": "0x",
491
+ "deployedBytecode": "0x",
492
+ "linkReferences": {},
493
+ "deployedLinkReferences": {}
494
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "DataTypes",
4
+ "sourceName": "contracts/DataTypes.sol",
5
+ "abi": [],
6
+ "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201fa9fa1f5fabf2bd94140c82760c4b1eae3f8775cfdb9c0bbe1e7a092666522c64736f6c63430008060033",
7
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201fa9fa1f5fabf2bd94140c82760c4b1eae3f8775cfdb9c0bbe1e7a092666522c64736f6c63430008060033",
8
+ "linkReferences": {},
9
+ "deployedLinkReferences": {}
10
+ }