@ensuro/core 1.2.7 → 2.0.0-beta1
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.
- package/README.md +44 -17
- package/build/contracts/EToken.sol/EToken.json +122 -177
- package/build/contracts/FlightDelayRiskModule.sol/FlightDelayRiskModule.json +101 -323
- package/build/contracts/LPManualWhitelist.sol/LPManualWhitelist.json +15 -2
- package/build/contracts/Policy.sol/Policy.json +2 -2
- package/build/contracts/PolicyNFT.sol/PolicyNFT.json +16 -3
- package/build/contracts/PolicyPool.sol/PolicyPool.json +105 -351
- package/build/contracts/PolicyPoolComponent.sol/PolicyPoolComponent.json +13 -0
- package/build/contracts/PolicyPoolConfig.sol/PolicyPoolConfig.json +77 -72
- package/build/contracts/PremiumsAccount.sol/PremiumsAccount.json +761 -0
- package/build/contracts/{BaseAssetManager.sol/BaseAssetManager.json → Reserve.sol/Reserve.json} +15 -202
- package/build/contracts/RiskModule.sol/RiskModule.json +83 -310
- package/build/contracts/TimeScaled.sol/TimeScaled.json +24 -0
- package/build/contracts/TrustfulRiskModule.sol/TrustfulRiskModule.json +131 -333
- package/build/contracts/dependencies/ChainlinkClientUpgradeable.sol/ChainlinkClientUpgradeable.json +15 -2
- package/build/contracts/dependencies/ERC1967Proxy.sol/ERC1967Proxy.json +64 -0
- package/build/{interfaces/IExchange.sol/IExchange.json → contracts/dependencies/IERC20Metadata.sol/IERC20Metadata.json} +83 -79
- package/build/{interfaces → contracts/interfaces}/IEToken.sol/IEToken.json +32 -97
- package/build/{interfaces → contracts/interfaces}/ILPWhitelist.sol/ILPWhitelist.json +1 -1
- package/build/{interfaces → contracts/interfaces}/IPolicyHolder.sol/IPolicyHolder.json +1 -1
- package/build/{interfaces → contracts/interfaces}/IPolicyNFT.sol/IPolicyNFT.json +1 -1
- package/build/{interfaces → contracts/interfaces}/IPolicyPool.sol/IPolicyPool.json +121 -108
- package/build/{interfaces → contracts/interfaces}/IPolicyPoolComponent.sol/IPolicyPoolComponent.json +1 -1
- package/build/{interfaces → contracts/interfaces}/IPolicyPoolConfig.sol/IPolicyPoolConfig.json +20 -36
- package/build/contracts/interfaces/IPremiumsAccount.sol/IPremiumsAccount.json +302 -0
- package/build/{interfaces → contracts/interfaces}/IRiskModule.sol/IRiskModule.json +58 -34
- package/build/contracts/mocks/ForwardProxy.sol/ForwardProxy.json +43 -0
- package/build/{interfaces/IInsolvencyHook.sol/IInsolvencyHook.json → contracts/mocks/IMintableERC20.sol/IMintableERC20.json} +13 -8
- package/build/contracts/mocks/LinkTokenMock.sol/LinkTokenMock.json +370 -0
- package/build/contracts/mocks/PolicyHolderMock.sol/PolicyHolderMock.json +202 -0
- package/build/contracts/mocks/PolicyPoolComponentMock.sol/PolicyPoolComponentMock.json +35 -0
- package/build/contracts/mocks/PolicyPoolMock.sol/PolicyPoolMock.json +603 -0
- package/build/contracts/mocks/PolicyPoolMock.sol/PolicyPoolMockForward.json +92 -0
- package/build/contracts/mocks/TestCurrency.sol/TestCurrency.json +343 -0
- package/build/contracts/mocks/TestCurrencyUUPS.sol/TestCurrencyUUPS.json +353 -0
- package/build/contracts/mocks/TestNFT.sol/TestNFT.json +388 -0
- package/build/contracts/upgraded/PolicyNFTv1.sol/PolicyNFTv1.json +16 -3
- package/build/contracts/upgraded/PolicyNFTv1.sol/PolicyNFTv1_Upgrade.json +16 -3
- package/contracts/EToken.sol +188 -269
- package/contracts/FlightDelayRiskModule.sol +30 -21
- package/contracts/LPManualWhitelist.sol +3 -3
- package/contracts/Policy.sol +48 -44
- package/contracts/PolicyNFT.sol +2 -2
- package/contracts/PolicyPool.sol +114 -467
- package/contracts/PolicyPoolComponent.sol +8 -3
- package/contracts/PolicyPoolConfig.sol +30 -73
- package/contracts/PremiumsAccount.sol +274 -0
- package/contracts/Reserve.sol +34 -0
- package/contracts/RiskModule.sol +216 -164
- package/contracts/TimeScaled.sol +134 -0
- package/contracts/TrustfulRiskModule.sol +23 -21
- package/contracts/dependencies/ERC1967Proxy.sol +19 -0
- package/contracts/dependencies/IERC20Metadata.sol +19 -0
- package/contracts/interfaces/IEToken.sol +172 -0
- package/{interfaces → contracts/interfaces}/ILPWhitelist.sol +0 -0
- package/{interfaces → contracts/interfaces}/IPolicyHolder.sol +0 -0
- package/{interfaces → contracts/interfaces}/IPolicyNFT.sol +0 -0
- package/contracts/interfaces/IPolicyPool.sol +138 -0
- package/{interfaces → contracts/interfaces}/IPolicyPoolComponent.sol +0 -0
- package/{interfaces → contracts/interfaces}/IPolicyPoolConfig.sol +29 -20
- package/contracts/interfaces/IPremiumsAccount.sol +71 -0
- package/contracts/interfaces/IRiskModule.sol +60 -0
- package/contracts/mocks/ForwardProxy.sol +66 -0
- package/contracts/mocks/IMintableERC20.sol +13 -0
- package/contracts/mocks/LinkTokenMock.sol +30 -0
- package/contracts/mocks/PolicyHolderMock.sol +68 -0
- package/contracts/mocks/PolicyPoolComponentMock.sol +17 -0
- package/contracts/mocks/PolicyPoolMock.sol +122 -0
- package/contracts/mocks/TestCurrency.sol +35 -0
- package/contracts/mocks/TestNFT.sol +23 -0
- package/contracts/upgraded/PolicyNFTv1.sol +1 -1
- package/js/test-utils.js +278 -0
- package/package.json +2 -2
- package/build/contracts/AaveAssetManager.sol/AaveAssetManager.json +0 -742
- package/build/contracts/DataTypes.sol/DataTypes.json +0 -10
- package/build/contracts/Exchange.sol/Exchange.json +0 -591
- package/build/contracts/extras/IPriceRiskModule.sol/IPriceRiskModule.json +0 -253
- package/build/contracts/extras/PriceRiskModule.sol/PriceRiskModule.json +0 -1055
- package/build/interfaces/IAssetManager.sol/IAssetManager.json +0 -31
- package/build/interfaces/IExchange.sol/IPriceOracle.json +0 -30
- package/contracts/AaveAssetManager.sol +0 -298
- package/contracts/BaseAssetManager.sol +0 -301
- package/contracts/DataTypes.sol +0 -287
- package/contracts/Exchange.sol +0 -189
- package/contracts/extras/IPriceRiskModule.sol +0 -41
- package/contracts/extras/PriceRiskModule.sol +0 -243
- package/interfaces/IAssetManager.sol +0 -23
- package/interfaces/IEToken.sol +0 -48
- package/interfaces/IExchange.sol +0 -59
- package/interfaces/IInsolvencyHook.sol +0 -27
- package/interfaces/IPolicyPool.sol +0 -44
- package/interfaces/IRiskModule.sol +0 -29
package/build/contracts/{BaseAssetManager.sol/BaseAssetManager.json → Reserve.sol/Reserve.json}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_format": "hh-sol-artifact-1",
|
|
3
|
-
"contractName": "
|
|
4
|
-
"sourceName": "contracts/
|
|
3
|
+
"contractName": "Reserve",
|
|
4
|
+
"sourceName": "contracts/Reserve.sol",
|
|
5
5
|
"abi": [
|
|
6
6
|
{
|
|
7
7
|
"anonymous": false,
|
|
@@ -54,25 +54,6 @@
|
|
|
54
54
|
"name": "ComponentChanged",
|
|
55
55
|
"type": "event"
|
|
56
56
|
},
|
|
57
|
-
{
|
|
58
|
-
"anonymous": false,
|
|
59
|
-
"inputs": [
|
|
60
|
-
{
|
|
61
|
-
"indexed": false,
|
|
62
|
-
"internalType": "bool",
|
|
63
|
-
"name": "positive",
|
|
64
|
-
"type": "bool"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"indexed": false,
|
|
68
|
-
"internalType": "uint256",
|
|
69
|
-
"name": "amount",
|
|
70
|
-
"type": "uint256"
|
|
71
|
-
}
|
|
72
|
-
],
|
|
73
|
-
"name": "EarningsDistributed",
|
|
74
|
-
"type": "event"
|
|
75
|
-
},
|
|
76
57
|
{
|
|
77
58
|
"anonymous": false,
|
|
78
59
|
"inputs": [
|
|
@@ -97,25 +78,12 @@
|
|
|
97
78
|
"inputs": [
|
|
98
79
|
{
|
|
99
80
|
"indexed": false,
|
|
100
|
-
"internalType": "
|
|
101
|
-
"name": "
|
|
102
|
-
"type": "
|
|
103
|
-
}
|
|
104
|
-
],
|
|
105
|
-
"name": "MoneyDeinvested",
|
|
106
|
-
"type": "event"
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"anonymous": false,
|
|
110
|
-
"inputs": [
|
|
111
|
-
{
|
|
112
|
-
"indexed": false,
|
|
113
|
-
"internalType": "uint256",
|
|
114
|
-
"name": "amount",
|
|
115
|
-
"type": "uint256"
|
|
81
|
+
"internalType": "uint8",
|
|
82
|
+
"name": "version",
|
|
83
|
+
"type": "uint8"
|
|
116
84
|
}
|
|
117
85
|
],
|
|
118
|
-
"name": "
|
|
86
|
+
"name": "Initialized",
|
|
119
87
|
"type": "event"
|
|
120
88
|
},
|
|
121
89
|
{
|
|
@@ -211,12 +179,12 @@
|
|
|
211
179
|
},
|
|
212
180
|
{
|
|
213
181
|
"inputs": [],
|
|
214
|
-
"name": "
|
|
182
|
+
"name": "NEGLIGIBLE_AMOUNT",
|
|
215
183
|
"outputs": [
|
|
216
184
|
{
|
|
217
|
-
"internalType": "
|
|
185
|
+
"internalType": "uint256",
|
|
218
186
|
"name": "",
|
|
219
|
-
"type": "
|
|
187
|
+
"type": "uint256"
|
|
220
188
|
}
|
|
221
189
|
],
|
|
222
190
|
"stateMutability": "view",
|
|
@@ -224,19 +192,12 @@
|
|
|
224
192
|
},
|
|
225
193
|
{
|
|
226
194
|
"inputs": [],
|
|
227
|
-
"name": "
|
|
228
|
-
"outputs": [],
|
|
229
|
-
"stateMutability": "nonpayable",
|
|
230
|
-
"type": "function"
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
"inputs": [],
|
|
234
|
-
"name": "currency",
|
|
195
|
+
"name": "TWEAK_EXPIRATION",
|
|
235
196
|
"outputs": [
|
|
236
197
|
{
|
|
237
|
-
"internalType": "
|
|
198
|
+
"internalType": "uint40",
|
|
238
199
|
"name": "",
|
|
239
|
-
"type": "
|
|
200
|
+
"type": "uint40"
|
|
240
201
|
}
|
|
241
202
|
],
|
|
242
203
|
"stateMutability": "view",
|
|
@@ -244,26 +205,12 @@
|
|
|
244
205
|
},
|
|
245
206
|
{
|
|
246
207
|
"inputs": [],
|
|
247
|
-
"name": "
|
|
248
|
-
"outputs": [],
|
|
249
|
-
"stateMutability": "nonpayable",
|
|
250
|
-
"type": "function"
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
"inputs": [],
|
|
254
|
-
"name": "distributeEarnings",
|
|
255
|
-
"outputs": [],
|
|
256
|
-
"stateMutability": "nonpayable",
|
|
257
|
-
"type": "function"
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
"inputs": [],
|
|
261
|
-
"name": "getInvestmentValue",
|
|
208
|
+
"name": "currency",
|
|
262
209
|
"outputs": [
|
|
263
210
|
{
|
|
264
|
-
"internalType": "
|
|
211
|
+
"internalType": "contract IERC20Metadata",
|
|
265
212
|
"name": "",
|
|
266
|
-
"type": "
|
|
213
|
+
"type": "address"
|
|
267
214
|
}
|
|
268
215
|
],
|
|
269
216
|
"stateMutability": "view",
|
|
@@ -287,45 +234,6 @@
|
|
|
287
234
|
"stateMutability": "view",
|
|
288
235
|
"type": "function"
|
|
289
236
|
},
|
|
290
|
-
{
|
|
291
|
-
"inputs": [],
|
|
292
|
-
"name": "liquidityMax",
|
|
293
|
-
"outputs": [
|
|
294
|
-
{
|
|
295
|
-
"internalType": "uint256",
|
|
296
|
-
"name": "",
|
|
297
|
-
"type": "uint256"
|
|
298
|
-
}
|
|
299
|
-
],
|
|
300
|
-
"stateMutability": "view",
|
|
301
|
-
"type": "function"
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
"inputs": [],
|
|
305
|
-
"name": "liquidityMiddle",
|
|
306
|
-
"outputs": [
|
|
307
|
-
{
|
|
308
|
-
"internalType": "uint256",
|
|
309
|
-
"name": "",
|
|
310
|
-
"type": "uint256"
|
|
311
|
-
}
|
|
312
|
-
],
|
|
313
|
-
"stateMutability": "view",
|
|
314
|
-
"type": "function"
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
"inputs": [],
|
|
318
|
-
"name": "liquidityMin",
|
|
319
|
-
"outputs": [
|
|
320
|
-
{
|
|
321
|
-
"internalType": "uint256",
|
|
322
|
-
"name": "",
|
|
323
|
-
"type": "uint256"
|
|
324
|
-
}
|
|
325
|
-
],
|
|
326
|
-
"stateMutability": "view",
|
|
327
|
-
"type": "function"
|
|
328
|
-
},
|
|
329
237
|
{
|
|
330
238
|
"inputs": [],
|
|
331
239
|
"name": "pause",
|
|
@@ -372,101 +280,6 @@
|
|
|
372
280
|
"stateMutability": "view",
|
|
373
281
|
"type": "function"
|
|
374
282
|
},
|
|
375
|
-
{
|
|
376
|
-
"inputs": [],
|
|
377
|
-
"name": "rebalance",
|
|
378
|
-
"outputs": [],
|
|
379
|
-
"stateMutability": "nonpayable",
|
|
380
|
-
"type": "function"
|
|
381
|
-
},
|
|
382
|
-
{
|
|
383
|
-
"inputs": [
|
|
384
|
-
{
|
|
385
|
-
"internalType": "uint256",
|
|
386
|
-
"name": "paymentAmount",
|
|
387
|
-
"type": "uint256"
|
|
388
|
-
}
|
|
389
|
-
],
|
|
390
|
-
"name": "refillWallet",
|
|
391
|
-
"outputs": [],
|
|
392
|
-
"stateMutability": "nonpayable",
|
|
393
|
-
"type": "function"
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
"inputs": [
|
|
397
|
-
{
|
|
398
|
-
"internalType": "uint256",
|
|
399
|
-
"name": "newValue",
|
|
400
|
-
"type": "uint256"
|
|
401
|
-
}
|
|
402
|
-
],
|
|
403
|
-
"name": "setLiquidityMax",
|
|
404
|
-
"outputs": [],
|
|
405
|
-
"stateMutability": "nonpayable",
|
|
406
|
-
"type": "function"
|
|
407
|
-
},
|
|
408
|
-
{
|
|
409
|
-
"inputs": [
|
|
410
|
-
{
|
|
411
|
-
"internalType": "uint256",
|
|
412
|
-
"name": "newValue",
|
|
413
|
-
"type": "uint256"
|
|
414
|
-
}
|
|
415
|
-
],
|
|
416
|
-
"name": "setLiquidityMiddle",
|
|
417
|
-
"outputs": [],
|
|
418
|
-
"stateMutability": "nonpayable",
|
|
419
|
-
"type": "function"
|
|
420
|
-
},
|
|
421
|
-
{
|
|
422
|
-
"inputs": [
|
|
423
|
-
{
|
|
424
|
-
"internalType": "uint256",
|
|
425
|
-
"name": "newValue",
|
|
426
|
-
"type": "uint256"
|
|
427
|
-
}
|
|
428
|
-
],
|
|
429
|
-
"name": "setLiquidityMin",
|
|
430
|
-
"outputs": [],
|
|
431
|
-
"stateMutability": "nonpayable",
|
|
432
|
-
"type": "function"
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
"inputs": [
|
|
436
|
-
{
|
|
437
|
-
"internalType": "uint256",
|
|
438
|
-
"name": "min",
|
|
439
|
-
"type": "uint256"
|
|
440
|
-
},
|
|
441
|
-
{
|
|
442
|
-
"internalType": "uint256",
|
|
443
|
-
"name": "middle",
|
|
444
|
-
"type": "uint256"
|
|
445
|
-
},
|
|
446
|
-
{
|
|
447
|
-
"internalType": "uint256",
|
|
448
|
-
"name": "max",
|
|
449
|
-
"type": "uint256"
|
|
450
|
-
}
|
|
451
|
-
],
|
|
452
|
-
"name": "setLiquidityMultiple",
|
|
453
|
-
"outputs": [],
|
|
454
|
-
"stateMutability": "nonpayable",
|
|
455
|
-
"type": "function"
|
|
456
|
-
},
|
|
457
|
-
{
|
|
458
|
-
"inputs": [],
|
|
459
|
-
"name": "totalInvestable",
|
|
460
|
-
"outputs": [
|
|
461
|
-
{
|
|
462
|
-
"internalType": "uint256",
|
|
463
|
-
"name": "",
|
|
464
|
-
"type": "uint256"
|
|
465
|
-
}
|
|
466
|
-
],
|
|
467
|
-
"stateMutability": "view",
|
|
468
|
-
"type": "function"
|
|
469
|
-
},
|
|
470
283
|
{
|
|
471
284
|
"inputs": [],
|
|
472
285
|
"name": "unpause",
|