@ensuro/core 1.2.0 → 1.2.3

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 (33) hide show
  1. package/build/contracts/AaveAssetManager.sol/AaveAssetManager.json +2 -51
  2. package/build/contracts/DataTypes.sol/DataTypes.json +2 -2
  3. package/build/contracts/EToken.sol/EToken.json +2 -2
  4. package/build/contracts/Exchange.sol/Exchange.json +483 -0
  5. package/build/contracts/FlightDelayRiskModule.sol/FlightDelayRiskModule.json +2 -2
  6. package/build/contracts/LPManualWhitelist.sol/LPManualWhitelist.json +2 -2
  7. package/build/contracts/PolicyNFT.sol/PolicyNFT.json +2 -2
  8. package/build/contracts/PolicyPool.sol/PolicyPool.json +2 -90
  9. package/build/contracts/PolicyPoolConfig.sol/PolicyPoolConfig.json +28 -2
  10. package/build/contracts/TrustfulRiskModule.sol/TrustfulRiskModule.json +2 -2
  11. package/build/contracts/extras/IPriceRiskModule.sol/IPriceRiskModule.json +253 -0
  12. package/build/contracts/extras/PriceRiskModule.sol/PriceRiskModule.json +1036 -0
  13. package/build/contracts/upgraded/PolicyNFTv1.sol/PolicyNFTv1.json +2 -2
  14. package/build/contracts/upgraded/PolicyNFTv1.sol/PolicyNFTv1_Upgrade.json +2 -2
  15. package/build/interfaces/IEToken.sol/IEToken.json +26 -0
  16. package/build/interfaces/IExchange.sol/IExchange.json +153 -0
  17. package/build/interfaces/IExchange.sol/IPriceOracle.json +30 -0
  18. package/build/interfaces/IPolicyHolder.sol/IPolicyHolder.json +108 -0
  19. package/build/interfaces/IPolicyPoolConfig.sol/IPolicyPoolConfig.json +13 -0
  20. package/contracts/AaveAssetManager.sol +35 -63
  21. package/contracts/BaseAssetManager.sol +55 -37
  22. package/contracts/EToken.sol +3 -19
  23. package/contracts/Exchange.sol +142 -0
  24. package/contracts/PolicyPool.sol +41 -35
  25. package/contracts/PolicyPoolComponent.sol +4 -0
  26. package/contracts/PolicyPoolConfig.sol +16 -0
  27. package/contracts/RiskModule.sol +5 -26
  28. package/contracts/extras/IPriceRiskModule.sol +41 -0
  29. package/contracts/extras/PriceRiskModule.sol +243 -0
  30. package/interfaces/IExchange.sol +47 -0
  31. package/interfaces/IPolicyHolder.sol +42 -0
  32. package/interfaces/IPolicyPoolConfig.sol +4 -0
  33. package/package.json +1 -1
@@ -0,0 +1,253 @@
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
+ }