@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,328 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "IPolicyPoolConfig",
4
+ "sourceName": "interfaces/IPolicyPoolConfig.sol",
5
+ "abi": [
6
+ {
7
+ "anonymous": false,
8
+ "inputs": [
9
+ {
10
+ "indexed": true,
11
+ "internalType": "contract IRiskModule",
12
+ "name": "riskModule",
13
+ "type": "address"
14
+ },
15
+ {
16
+ "indexed": false,
17
+ "internalType": "enum IPolicyPoolConfig.RiskModuleStatus",
18
+ "name": "newStatus",
19
+ "type": "uint8"
20
+ }
21
+ ],
22
+ "name": "RiskModuleStatusChanged",
23
+ "type": "event"
24
+ },
25
+ {
26
+ "anonymous": false,
27
+ "inputs": [
28
+ {
29
+ "indexed": true,
30
+ "internalType": "bytes32",
31
+ "name": "role",
32
+ "type": "bytes32"
33
+ },
34
+ {
35
+ "indexed": true,
36
+ "internalType": "bytes32",
37
+ "name": "previousAdminRole",
38
+ "type": "bytes32"
39
+ },
40
+ {
41
+ "indexed": true,
42
+ "internalType": "bytes32",
43
+ "name": "newAdminRole",
44
+ "type": "bytes32"
45
+ }
46
+ ],
47
+ "name": "RoleAdminChanged",
48
+ "type": "event"
49
+ },
50
+ {
51
+ "anonymous": false,
52
+ "inputs": [
53
+ {
54
+ "indexed": true,
55
+ "internalType": "bytes32",
56
+ "name": "role",
57
+ "type": "bytes32"
58
+ },
59
+ {
60
+ "indexed": true,
61
+ "internalType": "address",
62
+ "name": "account",
63
+ "type": "address"
64
+ },
65
+ {
66
+ "indexed": true,
67
+ "internalType": "address",
68
+ "name": "sender",
69
+ "type": "address"
70
+ }
71
+ ],
72
+ "name": "RoleGranted",
73
+ "type": "event"
74
+ },
75
+ {
76
+ "anonymous": false,
77
+ "inputs": [
78
+ {
79
+ "indexed": true,
80
+ "internalType": "bytes32",
81
+ "name": "role",
82
+ "type": "bytes32"
83
+ },
84
+ {
85
+ "indexed": true,
86
+ "internalType": "address",
87
+ "name": "account",
88
+ "type": "address"
89
+ },
90
+ {
91
+ "indexed": true,
92
+ "internalType": "address",
93
+ "name": "sender",
94
+ "type": "address"
95
+ }
96
+ ],
97
+ "name": "RoleRevoked",
98
+ "type": "event"
99
+ },
100
+ {
101
+ "inputs": [],
102
+ "name": "assetManager",
103
+ "outputs": [
104
+ {
105
+ "internalType": "contract IAssetManager",
106
+ "name": "",
107
+ "type": "address"
108
+ }
109
+ ],
110
+ "stateMutability": "view",
111
+ "type": "function"
112
+ },
113
+ {
114
+ "inputs": [
115
+ {
116
+ "internalType": "contract IRiskModule",
117
+ "name": "riskModule",
118
+ "type": "address"
119
+ }
120
+ ],
121
+ "name": "checkAcceptsNewPolicy",
122
+ "outputs": [],
123
+ "stateMutability": "view",
124
+ "type": "function"
125
+ },
126
+ {
127
+ "inputs": [
128
+ {
129
+ "internalType": "contract IRiskModule",
130
+ "name": "riskModule",
131
+ "type": "address"
132
+ }
133
+ ],
134
+ "name": "checkAcceptsResolvePolicy",
135
+ "outputs": [],
136
+ "stateMutability": "view",
137
+ "type": "function"
138
+ },
139
+ {
140
+ "inputs": [
141
+ {
142
+ "internalType": "bytes32",
143
+ "name": "role",
144
+ "type": "bytes32"
145
+ },
146
+ {
147
+ "internalType": "address",
148
+ "name": "account",
149
+ "type": "address"
150
+ }
151
+ ],
152
+ "name": "checkRole",
153
+ "outputs": [],
154
+ "stateMutability": "view",
155
+ "type": "function"
156
+ },
157
+ {
158
+ "inputs": [
159
+ {
160
+ "internalType": "bytes32",
161
+ "name": "role1",
162
+ "type": "bytes32"
163
+ },
164
+ {
165
+ "internalType": "bytes32",
166
+ "name": "role2",
167
+ "type": "bytes32"
168
+ },
169
+ {
170
+ "internalType": "address",
171
+ "name": "account",
172
+ "type": "address"
173
+ }
174
+ ],
175
+ "name": "checkRole2",
176
+ "outputs": [],
177
+ "stateMutability": "view",
178
+ "type": "function"
179
+ },
180
+ {
181
+ "inputs": [],
182
+ "name": "connect",
183
+ "outputs": [],
184
+ "stateMutability": "nonpayable",
185
+ "type": "function"
186
+ },
187
+ {
188
+ "inputs": [
189
+ {
190
+ "internalType": "bytes32",
191
+ "name": "role",
192
+ "type": "bytes32"
193
+ }
194
+ ],
195
+ "name": "getRoleAdmin",
196
+ "outputs": [
197
+ {
198
+ "internalType": "bytes32",
199
+ "name": "",
200
+ "type": "bytes32"
201
+ }
202
+ ],
203
+ "stateMutability": "view",
204
+ "type": "function"
205
+ },
206
+ {
207
+ "inputs": [
208
+ {
209
+ "internalType": "bytes32",
210
+ "name": "role",
211
+ "type": "bytes32"
212
+ },
213
+ {
214
+ "internalType": "address",
215
+ "name": "account",
216
+ "type": "address"
217
+ }
218
+ ],
219
+ "name": "grantRole",
220
+ "outputs": [],
221
+ "stateMutability": "nonpayable",
222
+ "type": "function"
223
+ },
224
+ {
225
+ "inputs": [
226
+ {
227
+ "internalType": "bytes32",
228
+ "name": "role",
229
+ "type": "bytes32"
230
+ },
231
+ {
232
+ "internalType": "address",
233
+ "name": "account",
234
+ "type": "address"
235
+ }
236
+ ],
237
+ "name": "hasRole",
238
+ "outputs": [
239
+ {
240
+ "internalType": "bool",
241
+ "name": "",
242
+ "type": "bool"
243
+ }
244
+ ],
245
+ "stateMutability": "view",
246
+ "type": "function"
247
+ },
248
+ {
249
+ "inputs": [],
250
+ "name": "insolvencyHook",
251
+ "outputs": [
252
+ {
253
+ "internalType": "contract IInsolvencyHook",
254
+ "name": "",
255
+ "type": "address"
256
+ }
257
+ ],
258
+ "stateMutability": "view",
259
+ "type": "function"
260
+ },
261
+ {
262
+ "inputs": [],
263
+ "name": "lpWhitelist",
264
+ "outputs": [
265
+ {
266
+ "internalType": "contract ILPWhitelist",
267
+ "name": "",
268
+ "type": "address"
269
+ }
270
+ ],
271
+ "stateMutability": "view",
272
+ "type": "function"
273
+ },
274
+ {
275
+ "inputs": [
276
+ {
277
+ "internalType": "bytes32",
278
+ "name": "role",
279
+ "type": "bytes32"
280
+ },
281
+ {
282
+ "internalType": "address",
283
+ "name": "account",
284
+ "type": "address"
285
+ }
286
+ ],
287
+ "name": "renounceRole",
288
+ "outputs": [],
289
+ "stateMutability": "nonpayable",
290
+ "type": "function"
291
+ },
292
+ {
293
+ "inputs": [
294
+ {
295
+ "internalType": "bytes32",
296
+ "name": "role",
297
+ "type": "bytes32"
298
+ },
299
+ {
300
+ "internalType": "address",
301
+ "name": "account",
302
+ "type": "address"
303
+ }
304
+ ],
305
+ "name": "revokeRole",
306
+ "outputs": [],
307
+ "stateMutability": "nonpayable",
308
+ "type": "function"
309
+ },
310
+ {
311
+ "inputs": [],
312
+ "name": "treasury",
313
+ "outputs": [
314
+ {
315
+ "internalType": "address",
316
+ "name": "",
317
+ "type": "address"
318
+ }
319
+ ],
320
+ "stateMutability": "view",
321
+ "type": "function"
322
+ }
323
+ ],
324
+ "bytecode": "0x",
325
+ "deployedBytecode": "0x",
326
+ "linkReferences": {},
327
+ "deployedLinkReferences": {}
328
+ }
@@ -0,0 +1,141 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "IRiskModule",
4
+ "sourceName": "interfaces/IRiskModule.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [],
8
+ "name": "ensuroFee",
9
+ "outputs": [
10
+ {
11
+ "internalType": "uint256",
12
+ "name": "",
13
+ "type": "uint256"
14
+ }
15
+ ],
16
+ "stateMutability": "view",
17
+ "type": "function"
18
+ },
19
+ {
20
+ "inputs": [],
21
+ "name": "maxScrPerPolicy",
22
+ "outputs": [
23
+ {
24
+ "internalType": "uint256",
25
+ "name": "",
26
+ "type": "uint256"
27
+ }
28
+ ],
29
+ "stateMutability": "view",
30
+ "type": "function"
31
+ },
32
+ {
33
+ "inputs": [],
34
+ "name": "moc",
35
+ "outputs": [
36
+ {
37
+ "internalType": "uint256",
38
+ "name": "",
39
+ "type": "uint256"
40
+ }
41
+ ],
42
+ "stateMutability": "view",
43
+ "type": "function"
44
+ },
45
+ {
46
+ "inputs": [],
47
+ "name": "name",
48
+ "outputs": [
49
+ {
50
+ "internalType": "string",
51
+ "name": "",
52
+ "type": "string"
53
+ }
54
+ ],
55
+ "stateMutability": "view",
56
+ "type": "function"
57
+ },
58
+ {
59
+ "inputs": [
60
+ {
61
+ "internalType": "uint256",
62
+ "name": "scrAmount",
63
+ "type": "uint256"
64
+ }
65
+ ],
66
+ "name": "releaseScr",
67
+ "outputs": [],
68
+ "stateMutability": "nonpayable",
69
+ "type": "function"
70
+ },
71
+ {
72
+ "inputs": [],
73
+ "name": "scrInterestRate",
74
+ "outputs": [
75
+ {
76
+ "internalType": "uint256",
77
+ "name": "",
78
+ "type": "uint256"
79
+ }
80
+ ],
81
+ "stateMutability": "view",
82
+ "type": "function"
83
+ },
84
+ {
85
+ "inputs": [],
86
+ "name": "scrLimit",
87
+ "outputs": [
88
+ {
89
+ "internalType": "uint256",
90
+ "name": "",
91
+ "type": "uint256"
92
+ }
93
+ ],
94
+ "stateMutability": "view",
95
+ "type": "function"
96
+ },
97
+ {
98
+ "inputs": [],
99
+ "name": "scrPercentage",
100
+ "outputs": [
101
+ {
102
+ "internalType": "uint256",
103
+ "name": "",
104
+ "type": "uint256"
105
+ }
106
+ ],
107
+ "stateMutability": "view",
108
+ "type": "function"
109
+ },
110
+ {
111
+ "inputs": [],
112
+ "name": "totalScr",
113
+ "outputs": [
114
+ {
115
+ "internalType": "uint256",
116
+ "name": "",
117
+ "type": "uint256"
118
+ }
119
+ ],
120
+ "stateMutability": "view",
121
+ "type": "function"
122
+ },
123
+ {
124
+ "inputs": [],
125
+ "name": "wallet",
126
+ "outputs": [
127
+ {
128
+ "internalType": "address",
129
+ "name": "",
130
+ "type": "address"
131
+ }
132
+ ],
133
+ "stateMutability": "view",
134
+ "type": "function"
135
+ }
136
+ ],
137
+ "bytecode": "0x",
138
+ "deployedBytecode": "0x",
139
+ "linkReferences": {},
140
+ "deployedLinkReferences": {}
141
+ }