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