@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
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_format": "hh-sol-artifact-1",
|
|
3
|
-
"contractName": "IPriceRiskModule",
|
|
4
|
-
"sourceName": "contracts/extras/IPriceRiskModule.sol",
|
|
5
|
-
"abi": [
|
|
6
|
-
{
|
|
7
|
-
"inputs": [],
|
|
8
|
-
"name": "asset",
|
|
9
|
-
"outputs": [
|
|
10
|
-
{
|
|
11
|
-
"internalType": "contract IERC20Metadata",
|
|
12
|
-
"name": "",
|
|
13
|
-
"type": "address"
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
"stateMutability": "view",
|
|
17
|
-
"type": "function"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"inputs": [],
|
|
21
|
-
"name": "ensuroFee",
|
|
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": "maxScrPerPolicy",
|
|
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": "moc",
|
|
48
|
-
"outputs": [
|
|
49
|
-
{
|
|
50
|
-
"internalType": "uint256",
|
|
51
|
-
"name": "",
|
|
52
|
-
"type": "uint256"
|
|
53
|
-
}
|
|
54
|
-
],
|
|
55
|
-
"stateMutability": "view",
|
|
56
|
-
"type": "function"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"inputs": [],
|
|
60
|
-
"name": "name",
|
|
61
|
-
"outputs": [
|
|
62
|
-
{
|
|
63
|
-
"internalType": "string",
|
|
64
|
-
"name": "",
|
|
65
|
-
"type": "string"
|
|
66
|
-
}
|
|
67
|
-
],
|
|
68
|
-
"stateMutability": "view",
|
|
69
|
-
"type": "function"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"inputs": [
|
|
73
|
-
{
|
|
74
|
-
"internalType": "uint256",
|
|
75
|
-
"name": "triggerPrice",
|
|
76
|
-
"type": "uint256"
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"internalType": "bool",
|
|
80
|
-
"name": "lower",
|
|
81
|
-
"type": "bool"
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"internalType": "uint256",
|
|
85
|
-
"name": "payout",
|
|
86
|
-
"type": "uint256"
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"internalType": "uint40",
|
|
90
|
-
"name": "expiration",
|
|
91
|
-
"type": "uint40"
|
|
92
|
-
}
|
|
93
|
-
],
|
|
94
|
-
"name": "newPolicy",
|
|
95
|
-
"outputs": [
|
|
96
|
-
{
|
|
97
|
-
"internalType": "uint256",
|
|
98
|
-
"name": "",
|
|
99
|
-
"type": "uint256"
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
"stateMutability": "nonpayable",
|
|
103
|
-
"type": "function"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"inputs": [
|
|
107
|
-
{
|
|
108
|
-
"internalType": "uint256",
|
|
109
|
-
"name": "triggerPrice",
|
|
110
|
-
"type": "uint256"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"internalType": "bool",
|
|
114
|
-
"name": "lower",
|
|
115
|
-
"type": "bool"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"internalType": "uint256",
|
|
119
|
-
"name": "payout",
|
|
120
|
-
"type": "uint256"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"internalType": "uint40",
|
|
124
|
-
"name": "expiration",
|
|
125
|
-
"type": "uint40"
|
|
126
|
-
}
|
|
127
|
-
],
|
|
128
|
-
"name": "pricePolicy",
|
|
129
|
-
"outputs": [
|
|
130
|
-
{
|
|
131
|
-
"internalType": "uint256",
|
|
132
|
-
"name": "premium",
|
|
133
|
-
"type": "uint256"
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
"internalType": "uint256",
|
|
137
|
-
"name": "lossProb",
|
|
138
|
-
"type": "uint256"
|
|
139
|
-
}
|
|
140
|
-
],
|
|
141
|
-
"stateMutability": "view",
|
|
142
|
-
"type": "function"
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
"inputs": [],
|
|
146
|
-
"name": "referenceCurrency",
|
|
147
|
-
"outputs": [
|
|
148
|
-
{
|
|
149
|
-
"internalType": "contract IERC20Metadata",
|
|
150
|
-
"name": "",
|
|
151
|
-
"type": "address"
|
|
152
|
-
}
|
|
153
|
-
],
|
|
154
|
-
"stateMutability": "view",
|
|
155
|
-
"type": "function"
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"inputs": [
|
|
159
|
-
{
|
|
160
|
-
"internalType": "uint256",
|
|
161
|
-
"name": "scrAmount",
|
|
162
|
-
"type": "uint256"
|
|
163
|
-
}
|
|
164
|
-
],
|
|
165
|
-
"name": "releaseScr",
|
|
166
|
-
"outputs": [],
|
|
167
|
-
"stateMutability": "nonpayable",
|
|
168
|
-
"type": "function"
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
"inputs": [],
|
|
172
|
-
"name": "scrInterestRate",
|
|
173
|
-
"outputs": [
|
|
174
|
-
{
|
|
175
|
-
"internalType": "uint256",
|
|
176
|
-
"name": "",
|
|
177
|
-
"type": "uint256"
|
|
178
|
-
}
|
|
179
|
-
],
|
|
180
|
-
"stateMutability": "view",
|
|
181
|
-
"type": "function"
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
"inputs": [],
|
|
185
|
-
"name": "scrLimit",
|
|
186
|
-
"outputs": [
|
|
187
|
-
{
|
|
188
|
-
"internalType": "uint256",
|
|
189
|
-
"name": "",
|
|
190
|
-
"type": "uint256"
|
|
191
|
-
}
|
|
192
|
-
],
|
|
193
|
-
"stateMutability": "view",
|
|
194
|
-
"type": "function"
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
"inputs": [],
|
|
198
|
-
"name": "scrPercentage",
|
|
199
|
-
"outputs": [
|
|
200
|
-
{
|
|
201
|
-
"internalType": "uint256",
|
|
202
|
-
"name": "",
|
|
203
|
-
"type": "uint256"
|
|
204
|
-
}
|
|
205
|
-
],
|
|
206
|
-
"stateMutability": "view",
|
|
207
|
-
"type": "function"
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
"inputs": [],
|
|
211
|
-
"name": "totalScr",
|
|
212
|
-
"outputs": [
|
|
213
|
-
{
|
|
214
|
-
"internalType": "uint256",
|
|
215
|
-
"name": "",
|
|
216
|
-
"type": "uint256"
|
|
217
|
-
}
|
|
218
|
-
],
|
|
219
|
-
"stateMutability": "view",
|
|
220
|
-
"type": "function"
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
"inputs": [
|
|
224
|
-
{
|
|
225
|
-
"internalType": "uint256",
|
|
226
|
-
"name": "policyId",
|
|
227
|
-
"type": "uint256"
|
|
228
|
-
}
|
|
229
|
-
],
|
|
230
|
-
"name": "triggerPolicy",
|
|
231
|
-
"outputs": [],
|
|
232
|
-
"stateMutability": "nonpayable",
|
|
233
|
-
"type": "function"
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
"inputs": [],
|
|
237
|
-
"name": "wallet",
|
|
238
|
-
"outputs": [
|
|
239
|
-
{
|
|
240
|
-
"internalType": "address",
|
|
241
|
-
"name": "",
|
|
242
|
-
"type": "address"
|
|
243
|
-
}
|
|
244
|
-
],
|
|
245
|
-
"stateMutability": "view",
|
|
246
|
-
"type": "function"
|
|
247
|
-
}
|
|
248
|
-
],
|
|
249
|
-
"bytecode": "0x",
|
|
250
|
-
"deployedBytecode": "0x",
|
|
251
|
-
"linkReferences": {},
|
|
252
|
-
"deployedLinkReferences": {}
|
|
253
|
-
}
|