@ensuro/core 1.2.6 → 2.0.0-beta2
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 +49 -17
- package/build/contracts/EToken.sol/EToken.json +163 -173
- package/build/contracts/FlightDelayRiskModule.sol/FlightDelayRiskModule.json +112 -315
- package/build/contracts/LPManualWhitelist.sol/LPManualWhitelist.json +34 -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 +32 -0
- package/build/contracts/PolicyPoolConfig.sol/PolicyPoolConfig.json +77 -98
- package/build/contracts/PremiumsAccount.sol/PremiumsAccount.json +761 -0
- package/build/contracts/{BaseAssetManager.sol/BaseAssetManager.json → Reserve.sol/Reserve.json} +23 -191
- package/build/contracts/RiskModule.sol/RiskModule.json +94 -302
- package/build/contracts/TimeScaled.sol/TimeScaled.json +24 -0
- package/build/contracts/TrustfulRiskModule.sol/TrustfulRiskModule.json +142 -325
- 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 -49
- 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/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 +210 -267
- package/contracts/FlightDelayRiskModule.sol +30 -21
- package/contracts/LPManualWhitelist.sol +4 -4
- package/contracts/Policy.sol +48 -44
- package/contracts/PolicyNFT.sol +2 -2
- package/contracts/PolicyPool.sol +114 -467
- package/contracts/PolicyPoolComponent.sol +14 -3
- package/contracts/PolicyPoolConfig.sol +29 -91
- 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 +31 -22
- 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 -723
- package/build/contracts/DataTypes.sol/DataTypes.json +0 -10
- package/build/contracts/Exchange.sol/Exchange.json +0 -546
- package/build/contracts/extras/IPriceRiskModule.sol/IPriceRiskModule.json +0 -253
- package/build/contracts/extras/PriceRiskModule.sol/PriceRiskModule.json +0 -1036
- 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 -173
- 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,
|
|
@@ -39,19 +39,19 @@
|
|
|
39
39
|
"anonymous": false,
|
|
40
40
|
"inputs": [
|
|
41
41
|
{
|
|
42
|
-
"indexed":
|
|
43
|
-
"internalType": "
|
|
44
|
-
"name": "
|
|
45
|
-
"type": "
|
|
42
|
+
"indexed": true,
|
|
43
|
+
"internalType": "enum IPolicyPoolConfig.GovernanceActions",
|
|
44
|
+
"name": "action",
|
|
45
|
+
"type": "uint8"
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"indexed": false,
|
|
49
|
-
"internalType": "
|
|
50
|
-
"name": "
|
|
51
|
-
"type": "
|
|
49
|
+
"internalType": "address",
|
|
50
|
+
"name": "value",
|
|
51
|
+
"type": "address"
|
|
52
52
|
}
|
|
53
53
|
],
|
|
54
|
-
"name": "
|
|
54
|
+
"name": "ComponentChanged",
|
|
55
55
|
"type": "event"
|
|
56
56
|
},
|
|
57
57
|
{
|
|
@@ -78,25 +78,12 @@
|
|
|
78
78
|
"inputs": [
|
|
79
79
|
{
|
|
80
80
|
"indexed": false,
|
|
81
|
-
"internalType": "
|
|
82
|
-
"name": "
|
|
83
|
-
"type": "
|
|
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"
|
|
81
|
+
"internalType": "uint8",
|
|
82
|
+
"name": "version",
|
|
83
|
+
"type": "uint8"
|
|
97
84
|
}
|
|
98
85
|
],
|
|
99
|
-
"name": "
|
|
86
|
+
"name": "Initialized",
|
|
100
87
|
"type": "event"
|
|
101
88
|
},
|
|
102
89
|
{
|
|
@@ -192,12 +179,12 @@
|
|
|
192
179
|
},
|
|
193
180
|
{
|
|
194
181
|
"inputs": [],
|
|
195
|
-
"name": "
|
|
182
|
+
"name": "NEGLIGIBLE_AMOUNT",
|
|
196
183
|
"outputs": [
|
|
197
184
|
{
|
|
198
|
-
"internalType": "
|
|
185
|
+
"internalType": "uint256",
|
|
199
186
|
"name": "",
|
|
200
|
-
"type": "
|
|
187
|
+
"type": "uint256"
|
|
201
188
|
}
|
|
202
189
|
],
|
|
203
190
|
"stateMutability": "view",
|
|
@@ -205,19 +192,12 @@
|
|
|
205
192
|
},
|
|
206
193
|
{
|
|
207
194
|
"inputs": [],
|
|
208
|
-
"name": "
|
|
209
|
-
"outputs": [],
|
|
210
|
-
"stateMutability": "nonpayable",
|
|
211
|
-
"type": "function"
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"inputs": [],
|
|
215
|
-
"name": "currency",
|
|
195
|
+
"name": "TWEAK_EXPIRATION",
|
|
216
196
|
"outputs": [
|
|
217
197
|
{
|
|
218
|
-
"internalType": "
|
|
198
|
+
"internalType": "uint40",
|
|
219
199
|
"name": "",
|
|
220
|
-
"type": "
|
|
200
|
+
"type": "uint40"
|
|
221
201
|
}
|
|
222
202
|
],
|
|
223
203
|
"stateMutability": "view",
|
|
@@ -225,26 +205,12 @@
|
|
|
225
205
|
},
|
|
226
206
|
{
|
|
227
207
|
"inputs": [],
|
|
228
|
-
"name": "
|
|
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",
|
|
208
|
+
"name": "currency",
|
|
243
209
|
"outputs": [
|
|
244
210
|
{
|
|
245
|
-
"internalType": "
|
|
211
|
+
"internalType": "contract IERC20Metadata",
|
|
246
212
|
"name": "",
|
|
247
|
-
"type": "
|
|
213
|
+
"type": "address"
|
|
248
214
|
}
|
|
249
215
|
],
|
|
250
216
|
"stateMutability": "view",
|
|
@@ -268,45 +234,6 @@
|
|
|
268
234
|
"stateMutability": "view",
|
|
269
235
|
"type": "function"
|
|
270
236
|
},
|
|
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
237
|
{
|
|
311
238
|
"inputs": [],
|
|
312
239
|
"name": "pause",
|
|
@@ -353,101 +280,6 @@
|
|
|
353
280
|
"stateMutability": "view",
|
|
354
281
|
"type": "function"
|
|
355
282
|
},
|
|
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
283
|
{
|
|
452
284
|
"inputs": [],
|
|
453
285
|
"name": "unpause",
|