@ensuro/core 1.2.7 → 2.0.0-beta10
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 +63 -27
- package/build/contracts/AccessManager.sol/AccessManager.json +559 -0
- package/build/contracts/ERC4626AssetManager.sol/ERC4626AssetManager.json +219 -0
- package/build/contracts/EToken.sol/EToken.json +217 -190
- package/build/contracts/LPManualWhitelist.sol/LPManualWhitelist.json +17 -4
- package/build/contracts/{extras/IPriceRiskModule.sol/IPriceRiskModule.json → LiquidityThresholdAssetManager.sol/LiquidityThresholdAssetManager.json} +81 -131
- package/build/contracts/Policy.sol/Policy.json +2 -2
- package/build/contracts/PolicyPool.sol/PolicyPool.json +425 -295
- package/build/contracts/PolicyPoolComponent.sol/PolicyPoolComponent.json +15 -2
- package/build/contracts/PremiumsAccount.sol/PremiumsAccount.json +868 -0
- package/build/contracts/{BaseAssetManager.sol/BaseAssetManager.json → Reserve.sol/Reserve.json} +37 -166
- package/build/contracts/RiskModule.sol/RiskModule.json +85 -312
- package/build/contracts/SignedQuoteRiskModule.sol/SignedQuoteRiskModule.json +960 -0
- package/build/contracts/{DataTypes.sol/DataTypes.json → TimeScaled.sol/TimeScaled.json} +4 -4
- package/build/contracts/TrustfulRiskModule.sol/TrustfulRiskModule.json +134 -336
- 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/contracts/{WadRayMath.sol → dependencies/WadRayMath.sol}/WadRayMath.json +3 -3
- package/build/{interfaces/IPolicyPoolConfig.sol/IPolicyPoolConfig.json → contracts/interfaces/IAccessManager.sol/IAccessManager.json} +79 -77
- package/build/contracts/interfaces/IAssetManager.sol/IAssetManager.json +109 -0
- package/build/{interfaces → contracts/interfaces}/IEToken.sol/IEToken.json +39 -91
- 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}/IPolicyPool.sol/IPolicyPool.json +137 -100
- package/build/{interfaces → contracts/interfaces}/IPolicyPoolComponent.sol/IPolicyPoolComponent.json +1 -1
- package/build/contracts/interfaces/IPremiumsAccount.sol/IPremiumsAccount.json +315 -0
- package/build/{interfaces → contracts/interfaces}/IRiskModule.sol/IRiskModule.json +58 -34
- package/build/contracts/mocks/FixedRateVault.sol/FixedRateVault.json +736 -0
- 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/PolicyHolderMock.sol/PolicyHolderMock.json +228 -0
- package/build/contracts/mocks/PolicyPoolComponentMock.sol/PolicyPoolComponentMock.json +35 -0
- package/build/contracts/mocks/PolicyPoolMock.sol/PolicyPoolMock.json +702 -0
- package/build/contracts/mocks/PolicyPoolMock.sol/PolicyPoolMockForward.json +92 -0
- package/build/contracts/mocks/RiskModuleMock.sol/RiskModuleMock.json +764 -0
- package/build/contracts/mocks/TestCurrency.sol/TestCurrency.json +343 -0
- package/build/contracts/mocks/TestNFT.sol/TestNFT.json +388 -0
- package/contracts/AccessManager.sol +103 -0
- package/contracts/ERC4626AssetManager.sol +52 -0
- package/contracts/EToken.sol +254 -299
- package/contracts/LPManualWhitelist.sol +4 -4
- package/contracts/LiquidityThresholdAssetManager.sol +160 -0
- package/contracts/Policy.sol +49 -45
- package/contracts/PolicyPool.sol +379 -514
- package/contracts/PolicyPoolComponent.sol +41 -41
- package/contracts/PremiumsAccount.sol +480 -0
- package/contracts/Reserve.sol +213 -0
- package/contracts/RiskModule.sol +233 -174
- package/contracts/SignedQuoteRiskModule.sol +241 -0
- package/contracts/TimeScaled.sol +138 -0
- package/contracts/TrustfulRiskModule.sol +85 -23
- package/contracts/dependencies/ERC1967Proxy.sol +19 -0
- package/contracts/dependencies/IERC20Metadata.sol +19 -0
- package/contracts/dependencies/WadRayMath.sol +126 -0
- package/contracts/interfaces/IAccessManager.sol +148 -0
- package/contracts/interfaces/IAssetManager.sol +84 -0
- package/contracts/interfaces/IEToken.sol +195 -0
- package/contracts/interfaces/ILPWhitelist.sol +40 -0
- package/{interfaces → contracts/interfaces}/IPolicyHolder.sol +0 -0
- package/contracts/interfaces/IPolicyPool.sol +145 -0
- package/{interfaces → contracts/interfaces}/IPolicyPoolComponent.sol +3 -0
- package/contracts/interfaces/IPremiumsAccount.sol +76 -0
- package/contracts/interfaces/IRiskModule.sol +123 -0
- package/contracts/mocks/FixedRateVault.sol +85 -0
- package/contracts/mocks/ForwardProxy.sol +66 -0
- package/contracts/mocks/IMintableERC20.sol +13 -0
- package/contracts/mocks/PolicyHolderMock.sol +89 -0
- package/contracts/mocks/PolicyPoolComponentMock.sol +17 -0
- package/contracts/mocks/PolicyPoolMock.sol +148 -0
- package/contracts/mocks/RiskModuleMock.sol +75 -0
- package/contracts/mocks/TestCurrency.sol +35 -0
- package/contracts/mocks/TestNFT.sol +23 -0
- package/js/test-utils.js +356 -0
- package/package.json +2 -2
- package/build/contracts/AaveAssetManager.sol/AaveAssetManager.json +0 -742
- package/build/contracts/Exchange.sol/Exchange.json +0 -591
- package/build/contracts/FlightDelayRiskModule.sol/FlightDelayRiskModule.json +0 -1112
- package/build/contracts/PolicyNFT.sol/PolicyNFT.json +0 -570
- package/build/contracts/PolicyPoolConfig.sol/PolicyPoolConfig.json +0 -686
- package/build/contracts/dependencies/ChainlinkClientUpgradeable.sol/ChainlinkClientUpgradeable.json +0 -50
- package/build/contracts/extras/PriceRiskModule.sol/PriceRiskModule.json +0 -1055
- package/build/contracts/upgraded/IPolicyNFTv1.sol/IPolicyNFTv1.json +0 -322
- package/build/contracts/upgraded/PolicyNFTv1.sol/PolicyNFTv1.json +0 -571
- package/build/contracts/upgraded/PolicyNFTv1.sol/PolicyNFTv1_Upgrade.json +0 -602
- package/build/interfaces/IAssetManager.sol/IAssetManager.json +0 -31
- package/build/interfaces/IExchange.sol/IPriceOracle.json +0 -30
- package/build/interfaces/IPolicyNFT.sol/IPolicyNFT.json +0 -321
- 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/FlightDelayRiskModule.sol +0 -208
- package/contracts/PolicyNFT.sol +0 -96
- package/contracts/PolicyPoolConfig.sol +0 -247
- package/contracts/WadRayMath.sol +0 -135
- package/contracts/dependencies/ChainlinkClientUpgradeable.sol +0 -371
- package/contracts/extras/IPriceRiskModule.sol +0 -41
- package/contracts/extras/PriceRiskModule.sol +0 -243
- package/contracts/upgraded/IPolicyNFTv1.sol +0 -15
- package/contracts/upgraded/PolicyNFTv1.sol +0 -126
- 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/ILPWhitelist.sol +0 -23
- package/interfaces/IPolicyNFT.sol +0 -15
- package/interfaces/IPolicyPool.sol +0 -44
- package/interfaces/IPolicyPoolConfig.sol +0 -87
- package/interfaces/IRiskModule.sol +0 -29
|
@@ -1,32 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_format": "hh-sol-artifact-1",
|
|
3
3
|
"contractName": "IPolicyPool",
|
|
4
|
-
"sourceName": "interfaces/IPolicyPool.sol",
|
|
4
|
+
"sourceName": "contracts/interfaces/IPolicyPool.sol",
|
|
5
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
6
|
{
|
|
25
7
|
"inputs": [],
|
|
26
|
-
"name": "
|
|
8
|
+
"name": "access",
|
|
27
9
|
"outputs": [
|
|
28
10
|
{
|
|
29
|
-
"internalType": "contract
|
|
11
|
+
"internalType": "contract IAccessManager",
|
|
30
12
|
"name": "",
|
|
31
13
|
"type": "address"
|
|
32
14
|
}
|
|
@@ -68,43 +50,102 @@
|
|
|
68
50
|
{
|
|
69
51
|
"inputs": [
|
|
70
52
|
{
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
53
|
+
"components": [
|
|
54
|
+
{
|
|
55
|
+
"internalType": "uint256",
|
|
56
|
+
"name": "id",
|
|
57
|
+
"type": "uint256"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"internalType": "uint256",
|
|
61
|
+
"name": "payout",
|
|
62
|
+
"type": "uint256"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"internalType": "uint256",
|
|
66
|
+
"name": "premium",
|
|
67
|
+
"type": "uint256"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"internalType": "uint256",
|
|
71
|
+
"name": "jrScr",
|
|
72
|
+
"type": "uint256"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"internalType": "uint256",
|
|
76
|
+
"name": "srScr",
|
|
77
|
+
"type": "uint256"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"internalType": "uint256",
|
|
81
|
+
"name": "lossProb",
|
|
82
|
+
"type": "uint256"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"internalType": "uint256",
|
|
86
|
+
"name": "purePremium",
|
|
87
|
+
"type": "uint256"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"internalType": "uint256",
|
|
91
|
+
"name": "ensuroCommission",
|
|
92
|
+
"type": "uint256"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"internalType": "uint256",
|
|
96
|
+
"name": "partnerCommission",
|
|
97
|
+
"type": "uint256"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"internalType": "uint256",
|
|
101
|
+
"name": "jrCoc",
|
|
102
|
+
"type": "uint256"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"internalType": "uint256",
|
|
106
|
+
"name": "srCoc",
|
|
107
|
+
"type": "uint256"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"internalType": "contract IRiskModule",
|
|
111
|
+
"name": "riskModule",
|
|
112
|
+
"type": "address"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"internalType": "uint40",
|
|
116
|
+
"name": "start",
|
|
117
|
+
"type": "uint40"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"internalType": "uint40",
|
|
121
|
+
"name": "expiration",
|
|
122
|
+
"type": "uint40"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"internalType": "struct Policy.PolicyData",
|
|
126
|
+
"name": "policy",
|
|
127
|
+
"type": "tuple"
|
|
82
128
|
}
|
|
83
129
|
],
|
|
84
|
-
"
|
|
130
|
+
"name": "expirePolicy",
|
|
131
|
+
"outputs": [],
|
|
132
|
+
"stateMutability": "nonpayable",
|
|
85
133
|
"type": "function"
|
|
86
134
|
},
|
|
87
135
|
{
|
|
88
|
-
"inputs": [
|
|
89
|
-
"name": "getETokenCount",
|
|
90
|
-
"outputs": [
|
|
136
|
+
"inputs": [
|
|
91
137
|
{
|
|
92
138
|
"internalType": "uint256",
|
|
93
|
-
"name": "",
|
|
139
|
+
"name": "policyId",
|
|
94
140
|
"type": "uint256"
|
|
95
141
|
}
|
|
96
142
|
],
|
|
97
|
-
"
|
|
98
|
-
"type": "function"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"inputs": [],
|
|
102
|
-
"name": "getInvestable",
|
|
143
|
+
"name": "isActive",
|
|
103
144
|
"outputs": [
|
|
104
145
|
{
|
|
105
|
-
"internalType": "
|
|
146
|
+
"internalType": "bool",
|
|
106
147
|
"name": "",
|
|
107
|
-
"type": "
|
|
148
|
+
"type": "bool"
|
|
108
149
|
}
|
|
109
150
|
],
|
|
110
151
|
"stateMutability": "view",
|
|
@@ -131,7 +172,12 @@
|
|
|
131
172
|
},
|
|
132
173
|
{
|
|
133
174
|
"internalType": "uint256",
|
|
134
|
-
"name": "
|
|
175
|
+
"name": "jrScr",
|
|
176
|
+
"type": "uint256"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"internalType": "uint256",
|
|
180
|
+
"name": "srScr",
|
|
135
181
|
"type": "uint256"
|
|
136
182
|
},
|
|
137
183
|
{
|
|
@@ -146,17 +192,22 @@
|
|
|
146
192
|
},
|
|
147
193
|
{
|
|
148
194
|
"internalType": "uint256",
|
|
149
|
-
"name": "
|
|
195
|
+
"name": "ensuroCommission",
|
|
150
196
|
"type": "uint256"
|
|
151
197
|
},
|
|
152
198
|
{
|
|
153
199
|
"internalType": "uint256",
|
|
154
|
-
"name": "
|
|
200
|
+
"name": "partnerCommission",
|
|
155
201
|
"type": "uint256"
|
|
156
202
|
},
|
|
157
203
|
{
|
|
158
204
|
"internalType": "uint256",
|
|
159
|
-
"name": "
|
|
205
|
+
"name": "jrCoc",
|
|
206
|
+
"type": "uint256"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"internalType": "uint256",
|
|
210
|
+
"name": "srCoc",
|
|
160
211
|
"type": "uint256"
|
|
161
212
|
},
|
|
162
213
|
{
|
|
@@ -181,7 +232,12 @@
|
|
|
181
232
|
},
|
|
182
233
|
{
|
|
183
234
|
"internalType": "address",
|
|
184
|
-
"name": "
|
|
235
|
+
"name": "caller",
|
|
236
|
+
"type": "address"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"internalType": "address",
|
|
240
|
+
"name": "policyHolder",
|
|
185
241
|
"type": "address"
|
|
186
242
|
},
|
|
187
243
|
{
|
|
@@ -201,32 +257,6 @@
|
|
|
201
257
|
"stateMutability": "nonpayable",
|
|
202
258
|
"type": "function"
|
|
203
259
|
},
|
|
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
260
|
{
|
|
231
261
|
"inputs": [
|
|
232
262
|
{
|
|
@@ -248,7 +278,12 @@
|
|
|
248
278
|
},
|
|
249
279
|
{
|
|
250
280
|
"internalType": "uint256",
|
|
251
|
-
"name": "
|
|
281
|
+
"name": "jrScr",
|
|
282
|
+
"type": "uint256"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"internalType": "uint256",
|
|
286
|
+
"name": "srScr",
|
|
252
287
|
"type": "uint256"
|
|
253
288
|
},
|
|
254
289
|
{
|
|
@@ -263,17 +298,22 @@
|
|
|
263
298
|
},
|
|
264
299
|
{
|
|
265
300
|
"internalType": "uint256",
|
|
266
|
-
"name": "
|
|
301
|
+
"name": "ensuroCommission",
|
|
302
|
+
"type": "uint256"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"internalType": "uint256",
|
|
306
|
+
"name": "partnerCommission",
|
|
267
307
|
"type": "uint256"
|
|
268
308
|
},
|
|
269
309
|
{
|
|
270
310
|
"internalType": "uint256",
|
|
271
|
-
"name": "
|
|
311
|
+
"name": "jrCoc",
|
|
272
312
|
"type": "uint256"
|
|
273
313
|
},
|
|
274
314
|
{
|
|
275
315
|
"internalType": "uint256",
|
|
276
|
-
"name": "
|
|
316
|
+
"name": "srCoc",
|
|
277
317
|
"type": "uint256"
|
|
278
318
|
},
|
|
279
319
|
{
|
|
@@ -328,7 +368,12 @@
|
|
|
328
368
|
},
|
|
329
369
|
{
|
|
330
370
|
"internalType": "uint256",
|
|
331
|
-
"name": "
|
|
371
|
+
"name": "jrScr",
|
|
372
|
+
"type": "uint256"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"internalType": "uint256",
|
|
376
|
+
"name": "srScr",
|
|
332
377
|
"type": "uint256"
|
|
333
378
|
},
|
|
334
379
|
{
|
|
@@ -343,17 +388,22 @@
|
|
|
343
388
|
},
|
|
344
389
|
{
|
|
345
390
|
"internalType": "uint256",
|
|
346
|
-
"name": "
|
|
391
|
+
"name": "ensuroCommission",
|
|
347
392
|
"type": "uint256"
|
|
348
393
|
},
|
|
349
394
|
{
|
|
350
395
|
"internalType": "uint256",
|
|
351
|
-
"name": "
|
|
396
|
+
"name": "partnerCommission",
|
|
352
397
|
"type": "uint256"
|
|
353
398
|
},
|
|
354
399
|
{
|
|
355
400
|
"internalType": "uint256",
|
|
356
|
-
"name": "
|
|
401
|
+
"name": "jrCoc",
|
|
402
|
+
"type": "uint256"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"internalType": "uint256",
|
|
406
|
+
"name": "srCoc",
|
|
357
407
|
"type": "uint256"
|
|
358
408
|
},
|
|
359
409
|
{
|
|
@@ -387,27 +437,14 @@
|
|
|
387
437
|
"stateMutability": "nonpayable",
|
|
388
438
|
"type": "function"
|
|
389
439
|
},
|
|
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
440
|
{
|
|
404
441
|
"inputs": [],
|
|
405
|
-
"name": "
|
|
442
|
+
"name": "treasury",
|
|
406
443
|
"outputs": [
|
|
407
444
|
{
|
|
408
|
-
"internalType": "
|
|
445
|
+
"internalType": "address",
|
|
409
446
|
"name": "",
|
|
410
|
-
"type": "
|
|
447
|
+
"type": "address"
|
|
411
448
|
}
|
|
412
449
|
],
|
|
413
450
|
"stateMutability": "view",
|
|
@@ -0,0 +1,315 @@
|
|
|
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
|
+
"internalType": "address",
|
|
193
|
+
"name": "policyHolder",
|
|
194
|
+
"type": "address"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"components": [
|
|
198
|
+
{
|
|
199
|
+
"internalType": "uint256",
|
|
200
|
+
"name": "id",
|
|
201
|
+
"type": "uint256"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"internalType": "uint256",
|
|
205
|
+
"name": "payout",
|
|
206
|
+
"type": "uint256"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"internalType": "uint256",
|
|
210
|
+
"name": "premium",
|
|
211
|
+
"type": "uint256"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"internalType": "uint256",
|
|
215
|
+
"name": "jrScr",
|
|
216
|
+
"type": "uint256"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"internalType": "uint256",
|
|
220
|
+
"name": "srScr",
|
|
221
|
+
"type": "uint256"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"internalType": "uint256",
|
|
225
|
+
"name": "lossProb",
|
|
226
|
+
"type": "uint256"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"internalType": "uint256",
|
|
230
|
+
"name": "purePremium",
|
|
231
|
+
"type": "uint256"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"internalType": "uint256",
|
|
235
|
+
"name": "ensuroCommission",
|
|
236
|
+
"type": "uint256"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"internalType": "uint256",
|
|
240
|
+
"name": "partnerCommission",
|
|
241
|
+
"type": "uint256"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"internalType": "uint256",
|
|
245
|
+
"name": "jrCoc",
|
|
246
|
+
"type": "uint256"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"internalType": "uint256",
|
|
250
|
+
"name": "srCoc",
|
|
251
|
+
"type": "uint256"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"internalType": "contract IRiskModule",
|
|
255
|
+
"name": "riskModule",
|
|
256
|
+
"type": "address"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"internalType": "uint40",
|
|
260
|
+
"name": "start",
|
|
261
|
+
"type": "uint40"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"internalType": "uint40",
|
|
265
|
+
"name": "expiration",
|
|
266
|
+
"type": "uint40"
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
"internalType": "struct Policy.PolicyData",
|
|
270
|
+
"name": "policy",
|
|
271
|
+
"type": "tuple"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"internalType": "uint256",
|
|
275
|
+
"name": "payout",
|
|
276
|
+
"type": "uint256"
|
|
277
|
+
}
|
|
278
|
+
],
|
|
279
|
+
"name": "policyResolvedWithPayout",
|
|
280
|
+
"outputs": [],
|
|
281
|
+
"stateMutability": "nonpayable",
|
|
282
|
+
"type": "function"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"inputs": [],
|
|
286
|
+
"name": "purePremiums",
|
|
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": "seniorEtk",
|
|
300
|
+
"outputs": [
|
|
301
|
+
{
|
|
302
|
+
"internalType": "contract IEToken",
|
|
303
|
+
"name": "",
|
|
304
|
+
"type": "address"
|
|
305
|
+
}
|
|
306
|
+
],
|
|
307
|
+
"stateMutability": "view",
|
|
308
|
+
"type": "function"
|
|
309
|
+
}
|
|
310
|
+
],
|
|
311
|
+
"bytecode": "0x",
|
|
312
|
+
"deployedBytecode": "0x",
|
|
313
|
+
"linkReferences": {},
|
|
314
|
+
"deployedLinkReferences": {}
|
|
315
|
+
}
|