@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.
Files changed (91) hide show
  1. package/README.md +49 -17
  2. package/build/contracts/EToken.sol/EToken.json +163 -173
  3. package/build/contracts/FlightDelayRiskModule.sol/FlightDelayRiskModule.json +112 -315
  4. package/build/contracts/LPManualWhitelist.sol/LPManualWhitelist.json +34 -2
  5. package/build/contracts/Policy.sol/Policy.json +2 -2
  6. package/build/contracts/PolicyNFT.sol/PolicyNFT.json +16 -3
  7. package/build/contracts/PolicyPool.sol/PolicyPool.json +105 -351
  8. package/build/contracts/PolicyPoolComponent.sol/PolicyPoolComponent.json +32 -0
  9. package/build/contracts/PolicyPoolConfig.sol/PolicyPoolConfig.json +77 -98
  10. package/build/contracts/PremiumsAccount.sol/PremiumsAccount.json +761 -0
  11. package/build/contracts/{BaseAssetManager.sol/BaseAssetManager.json → Reserve.sol/Reserve.json} +23 -191
  12. package/build/contracts/RiskModule.sol/RiskModule.json +94 -302
  13. package/build/contracts/TimeScaled.sol/TimeScaled.json +24 -0
  14. package/build/contracts/TrustfulRiskModule.sol/TrustfulRiskModule.json +142 -325
  15. package/build/contracts/dependencies/ChainlinkClientUpgradeable.sol/ChainlinkClientUpgradeable.json +15 -2
  16. package/build/contracts/dependencies/ERC1967Proxy.sol/ERC1967Proxy.json +64 -0
  17. package/build/{interfaces/IExchange.sol/IExchange.json → contracts/dependencies/IERC20Metadata.sol/IERC20Metadata.json} +83 -79
  18. package/build/{interfaces → contracts/interfaces}/IEToken.sol/IEToken.json +32 -97
  19. package/build/{interfaces → contracts/interfaces}/ILPWhitelist.sol/ILPWhitelist.json +1 -1
  20. package/build/{interfaces → contracts/interfaces}/IPolicyHolder.sol/IPolicyHolder.json +1 -1
  21. package/build/{interfaces → contracts/interfaces}/IPolicyNFT.sol/IPolicyNFT.json +1 -1
  22. package/build/{interfaces → contracts/interfaces}/IPolicyPool.sol/IPolicyPool.json +121 -108
  23. package/build/{interfaces → contracts/interfaces}/IPolicyPoolComponent.sol/IPolicyPoolComponent.json +1 -1
  24. package/build/{interfaces → contracts/interfaces}/IPolicyPoolConfig.sol/IPolicyPoolConfig.json +20 -49
  25. package/build/contracts/interfaces/IPremiumsAccount.sol/IPremiumsAccount.json +302 -0
  26. package/build/{interfaces → contracts/interfaces}/IRiskModule.sol/IRiskModule.json +58 -34
  27. package/build/contracts/mocks/ForwardProxy.sol/ForwardProxy.json +43 -0
  28. package/build/{interfaces/IInsolvencyHook.sol/IInsolvencyHook.json → contracts/mocks/IMintableERC20.sol/IMintableERC20.json} +13 -8
  29. package/build/contracts/mocks/LinkTokenMock.sol/LinkTokenMock.json +370 -0
  30. package/build/contracts/mocks/PolicyHolderMock.sol/PolicyHolderMock.json +202 -0
  31. package/build/contracts/mocks/PolicyPoolComponentMock.sol/PolicyPoolComponentMock.json +35 -0
  32. package/build/contracts/mocks/PolicyPoolMock.sol/PolicyPoolMock.json +603 -0
  33. package/build/contracts/mocks/PolicyPoolMock.sol/PolicyPoolMockForward.json +92 -0
  34. package/build/contracts/mocks/TestCurrency.sol/TestCurrency.json +343 -0
  35. package/build/contracts/mocks/TestNFT.sol/TestNFT.json +388 -0
  36. package/build/contracts/upgraded/PolicyNFTv1.sol/PolicyNFTv1.json +16 -3
  37. package/build/contracts/upgraded/PolicyNFTv1.sol/PolicyNFTv1_Upgrade.json +16 -3
  38. package/contracts/EToken.sol +210 -267
  39. package/contracts/FlightDelayRiskModule.sol +30 -21
  40. package/contracts/LPManualWhitelist.sol +4 -4
  41. package/contracts/Policy.sol +48 -44
  42. package/contracts/PolicyNFT.sol +2 -2
  43. package/contracts/PolicyPool.sol +114 -467
  44. package/contracts/PolicyPoolComponent.sol +14 -3
  45. package/contracts/PolicyPoolConfig.sol +29 -91
  46. package/contracts/PremiumsAccount.sol +274 -0
  47. package/contracts/Reserve.sol +34 -0
  48. package/contracts/RiskModule.sol +216 -164
  49. package/contracts/TimeScaled.sol +134 -0
  50. package/contracts/TrustfulRiskModule.sol +23 -21
  51. package/contracts/dependencies/ERC1967Proxy.sol +19 -0
  52. package/contracts/dependencies/IERC20Metadata.sol +19 -0
  53. package/contracts/interfaces/IEToken.sol +172 -0
  54. package/{interfaces → contracts/interfaces}/ILPWhitelist.sol +0 -0
  55. package/{interfaces → contracts/interfaces}/IPolicyHolder.sol +0 -0
  56. package/{interfaces → contracts/interfaces}/IPolicyNFT.sol +0 -0
  57. package/contracts/interfaces/IPolicyPool.sol +138 -0
  58. package/{interfaces → contracts/interfaces}/IPolicyPoolComponent.sol +0 -0
  59. package/{interfaces → contracts/interfaces}/IPolicyPoolConfig.sol +31 -22
  60. package/contracts/interfaces/IPremiumsAccount.sol +71 -0
  61. package/contracts/interfaces/IRiskModule.sol +60 -0
  62. package/contracts/mocks/ForwardProxy.sol +66 -0
  63. package/contracts/mocks/IMintableERC20.sol +13 -0
  64. package/contracts/mocks/LinkTokenMock.sol +30 -0
  65. package/contracts/mocks/PolicyHolderMock.sol +68 -0
  66. package/contracts/mocks/PolicyPoolComponentMock.sol +17 -0
  67. package/contracts/mocks/PolicyPoolMock.sol +122 -0
  68. package/contracts/mocks/TestCurrency.sol +35 -0
  69. package/contracts/mocks/TestNFT.sol +23 -0
  70. package/contracts/upgraded/PolicyNFTv1.sol +1 -1
  71. package/js/test-utils.js +278 -0
  72. package/package.json +2 -2
  73. package/build/contracts/AaveAssetManager.sol/AaveAssetManager.json +0 -723
  74. package/build/contracts/DataTypes.sol/DataTypes.json +0 -10
  75. package/build/contracts/Exchange.sol/Exchange.json +0 -546
  76. package/build/contracts/extras/IPriceRiskModule.sol/IPriceRiskModule.json +0 -253
  77. package/build/contracts/extras/PriceRiskModule.sol/PriceRiskModule.json +0 -1036
  78. package/build/interfaces/IAssetManager.sol/IAssetManager.json +0 -31
  79. package/build/interfaces/IExchange.sol/IPriceOracle.json +0 -30
  80. package/contracts/AaveAssetManager.sol +0 -298
  81. package/contracts/BaseAssetManager.sol +0 -301
  82. package/contracts/DataTypes.sol +0 -287
  83. package/contracts/Exchange.sol +0 -173
  84. package/contracts/extras/IPriceRiskModule.sol +0 -41
  85. package/contracts/extras/PriceRiskModule.sol +0 -243
  86. package/interfaces/IAssetManager.sol +0 -23
  87. package/interfaces/IEToken.sol +0 -48
  88. package/interfaces/IExchange.sol +0 -59
  89. package/interfaces/IInsolvencyHook.sol +0 -27
  90. package/interfaces/IPolicyPool.sol +0 -44
  91. package/interfaces/IRiskModule.sol +0 -29
@@ -0,0 +1,370 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "LinkTokenMock",
4
+ "sourceName": "contracts/mocks/LinkTokenMock.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "string",
10
+ "name": "name_",
11
+ "type": "string"
12
+ },
13
+ {
14
+ "internalType": "string",
15
+ "name": "symbol_",
16
+ "type": "string"
17
+ },
18
+ {
19
+ "internalType": "uint256",
20
+ "name": "initialSupply",
21
+ "type": "uint256"
22
+ }
23
+ ],
24
+ "stateMutability": "nonpayable",
25
+ "type": "constructor"
26
+ },
27
+ {
28
+ "anonymous": false,
29
+ "inputs": [
30
+ {
31
+ "indexed": true,
32
+ "internalType": "address",
33
+ "name": "owner",
34
+ "type": "address"
35
+ },
36
+ {
37
+ "indexed": true,
38
+ "internalType": "address",
39
+ "name": "spender",
40
+ "type": "address"
41
+ },
42
+ {
43
+ "indexed": false,
44
+ "internalType": "uint256",
45
+ "name": "value",
46
+ "type": "uint256"
47
+ }
48
+ ],
49
+ "name": "Approval",
50
+ "type": "event"
51
+ },
52
+ {
53
+ "anonymous": false,
54
+ "inputs": [
55
+ {
56
+ "indexed": true,
57
+ "internalType": "address",
58
+ "name": "from",
59
+ "type": "address"
60
+ },
61
+ {
62
+ "indexed": true,
63
+ "internalType": "address",
64
+ "name": "to",
65
+ "type": "address"
66
+ },
67
+ {
68
+ "indexed": false,
69
+ "internalType": "uint256",
70
+ "name": "value",
71
+ "type": "uint256"
72
+ }
73
+ ],
74
+ "name": "Transfer",
75
+ "type": "event"
76
+ },
77
+ {
78
+ "inputs": [
79
+ {
80
+ "internalType": "address",
81
+ "name": "owner",
82
+ "type": "address"
83
+ },
84
+ {
85
+ "internalType": "address",
86
+ "name": "spender",
87
+ "type": "address"
88
+ }
89
+ ],
90
+ "name": "allowance",
91
+ "outputs": [
92
+ {
93
+ "internalType": "uint256",
94
+ "name": "",
95
+ "type": "uint256"
96
+ }
97
+ ],
98
+ "stateMutability": "view",
99
+ "type": "function"
100
+ },
101
+ {
102
+ "inputs": [
103
+ {
104
+ "internalType": "address",
105
+ "name": "spender",
106
+ "type": "address"
107
+ },
108
+ {
109
+ "internalType": "uint256",
110
+ "name": "amount",
111
+ "type": "uint256"
112
+ }
113
+ ],
114
+ "name": "approve",
115
+ "outputs": [
116
+ {
117
+ "internalType": "bool",
118
+ "name": "",
119
+ "type": "bool"
120
+ }
121
+ ],
122
+ "stateMutability": "nonpayable",
123
+ "type": "function"
124
+ },
125
+ {
126
+ "inputs": [
127
+ {
128
+ "internalType": "address",
129
+ "name": "account",
130
+ "type": "address"
131
+ }
132
+ ],
133
+ "name": "balanceOf",
134
+ "outputs": [
135
+ {
136
+ "internalType": "uint256",
137
+ "name": "",
138
+ "type": "uint256"
139
+ }
140
+ ],
141
+ "stateMutability": "view",
142
+ "type": "function"
143
+ },
144
+ {
145
+ "inputs": [],
146
+ "name": "decimals",
147
+ "outputs": [
148
+ {
149
+ "internalType": "uint8",
150
+ "name": "",
151
+ "type": "uint8"
152
+ }
153
+ ],
154
+ "stateMutability": "view",
155
+ "type": "function"
156
+ },
157
+ {
158
+ "inputs": [
159
+ {
160
+ "internalType": "address",
161
+ "name": "spender",
162
+ "type": "address"
163
+ },
164
+ {
165
+ "internalType": "uint256",
166
+ "name": "subtractedValue",
167
+ "type": "uint256"
168
+ }
169
+ ],
170
+ "name": "decreaseAllowance",
171
+ "outputs": [
172
+ {
173
+ "internalType": "bool",
174
+ "name": "",
175
+ "type": "bool"
176
+ }
177
+ ],
178
+ "stateMutability": "nonpayable",
179
+ "type": "function"
180
+ },
181
+ {
182
+ "inputs": [
183
+ {
184
+ "internalType": "address",
185
+ "name": "spender",
186
+ "type": "address"
187
+ },
188
+ {
189
+ "internalType": "uint256",
190
+ "name": "addedValue",
191
+ "type": "uint256"
192
+ }
193
+ ],
194
+ "name": "increaseAllowance",
195
+ "outputs": [
196
+ {
197
+ "internalType": "bool",
198
+ "name": "",
199
+ "type": "bool"
200
+ }
201
+ ],
202
+ "stateMutability": "nonpayable",
203
+ "type": "function"
204
+ },
205
+ {
206
+ "inputs": [],
207
+ "name": "lastTransferData",
208
+ "outputs": [
209
+ {
210
+ "internalType": "bytes",
211
+ "name": "",
212
+ "type": "bytes"
213
+ }
214
+ ],
215
+ "stateMutability": "view",
216
+ "type": "function"
217
+ },
218
+ {
219
+ "inputs": [],
220
+ "name": "lastTransferTo",
221
+ "outputs": [
222
+ {
223
+ "internalType": "address",
224
+ "name": "",
225
+ "type": "address"
226
+ }
227
+ ],
228
+ "stateMutability": "view",
229
+ "type": "function"
230
+ },
231
+ {
232
+ "inputs": [],
233
+ "name": "lastTransferValue",
234
+ "outputs": [
235
+ {
236
+ "internalType": "uint256",
237
+ "name": "",
238
+ "type": "uint256"
239
+ }
240
+ ],
241
+ "stateMutability": "view",
242
+ "type": "function"
243
+ },
244
+ {
245
+ "inputs": [],
246
+ "name": "name",
247
+ "outputs": [
248
+ {
249
+ "internalType": "string",
250
+ "name": "",
251
+ "type": "string"
252
+ }
253
+ ],
254
+ "stateMutability": "view",
255
+ "type": "function"
256
+ },
257
+ {
258
+ "inputs": [],
259
+ "name": "symbol",
260
+ "outputs": [
261
+ {
262
+ "internalType": "string",
263
+ "name": "",
264
+ "type": "string"
265
+ }
266
+ ],
267
+ "stateMutability": "view",
268
+ "type": "function"
269
+ },
270
+ {
271
+ "inputs": [],
272
+ "name": "totalSupply",
273
+ "outputs": [
274
+ {
275
+ "internalType": "uint256",
276
+ "name": "",
277
+ "type": "uint256"
278
+ }
279
+ ],
280
+ "stateMutability": "view",
281
+ "type": "function"
282
+ },
283
+ {
284
+ "inputs": [
285
+ {
286
+ "internalType": "address",
287
+ "name": "to",
288
+ "type": "address"
289
+ },
290
+ {
291
+ "internalType": "uint256",
292
+ "name": "amount",
293
+ "type": "uint256"
294
+ }
295
+ ],
296
+ "name": "transfer",
297
+ "outputs": [
298
+ {
299
+ "internalType": "bool",
300
+ "name": "",
301
+ "type": "bool"
302
+ }
303
+ ],
304
+ "stateMutability": "nonpayable",
305
+ "type": "function"
306
+ },
307
+ {
308
+ "inputs": [
309
+ {
310
+ "internalType": "address",
311
+ "name": "to",
312
+ "type": "address"
313
+ },
314
+ {
315
+ "internalType": "uint256",
316
+ "name": "value",
317
+ "type": "uint256"
318
+ },
319
+ {
320
+ "internalType": "bytes",
321
+ "name": "data",
322
+ "type": "bytes"
323
+ }
324
+ ],
325
+ "name": "transferAndCall",
326
+ "outputs": [
327
+ {
328
+ "internalType": "bool",
329
+ "name": "success",
330
+ "type": "bool"
331
+ }
332
+ ],
333
+ "stateMutability": "nonpayable",
334
+ "type": "function"
335
+ },
336
+ {
337
+ "inputs": [
338
+ {
339
+ "internalType": "address",
340
+ "name": "from",
341
+ "type": "address"
342
+ },
343
+ {
344
+ "internalType": "address",
345
+ "name": "to",
346
+ "type": "address"
347
+ },
348
+ {
349
+ "internalType": "uint256",
350
+ "name": "amount",
351
+ "type": "uint256"
352
+ }
353
+ ],
354
+ "name": "transferFrom",
355
+ "outputs": [
356
+ {
357
+ "internalType": "bool",
358
+ "name": "",
359
+ "type": "bool"
360
+ }
361
+ ],
362
+ "stateMutability": "nonpayable",
363
+ "type": "function"
364
+ }
365
+ ],
366
+ "bytecode": "0x60806040523480156200001157600080fd5b5060405162000ed838038062000ed88339810160408190526200003491620002c6565b8251839083906200004d90600390602085019062000169565b5080516200006390600490602084019062000169565b5050506200007833826200008160201b60201c565b505050620003b3565b6001600160a01b038216620000dc5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b8060026000828254620000f0919062000339565b90915550506001600160a01b038216600090815260208190526040812080548392906200011f90849062000339565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b828054620001779062000360565b90600052602060002090601f0160209004810192826200019b5760008555620001e6565b82601f10620001b657805160ff1916838001178555620001e6565b82800160010185558215620001e6579182015b82811115620001e6578251825591602001919060010190620001c9565b50620001f4929150620001f8565b5090565b5b80821115620001f45760008155600101620001f9565b600082601f8301126200022157600080fd5b81516001600160401b03808211156200023e576200023e6200039d565b604051601f8301601f19908116603f011681019082821181831017156200026957620002696200039d565b816040528381526020925086838588010111156200028657600080fd5b600091505b83821015620002aa57858201830151818301840152908201906200028b565b83821115620002bc5760008385830101525b9695505050505050565b600080600060608486031215620002dc57600080fd5b83516001600160401b0380821115620002f457600080fd5b62000302878388016200020f565b945060208601519150808211156200031957600080fd5b5062000328868287016200020f565b925050604084015190509250925092565b600082198211156200035b57634e487b7160e01b600052601160045260246000fd5b500190565b600181811c908216806200037557607f821691505b602082108114156200039757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b610b1580620003c36000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806370a0823111610097578063a457c2d711610066578063a457c2d7146101f9578063a9059cbb1461020c578063dd62ed3e1461021f578063e82262861461023257600080fd5b806370a082311461019557806384c09a3c146101be5780638fbaf1cc146101e957806395d89b41146101f157600080fd5b806323b872dd116100d357806323b872dd1461014d578063313ce56714610160578063395093511461016f5780634000aea01461018257600080fd5b806306fdde03146100fa578063095ea7b31461011857806318160ddd1461013b575b600080fd5b61010261023b565b60405161010f9190610a6b565b60405180910390f35b61012b61012636600461096d565b6102cd565b604051901515815260200161010f565b6002545b60405190815260200161010f565b61012b61015b366004610931565b6102e5565b6040516012815260200161010f565b61012b61017d36600461096d565b610309565b61012b610190366004610997565b61032b565b61013f6101a33660046108dc565b6001600160a01b031660009081526020819052604090205490565b6005546101d1906001600160a01b031681565b6040516001600160a01b03909116815260200161010f565b610102610365565b6101026103f3565b61012b61020736600461096d565b610402565b61012b61021a36600461096d565b610482565b61013f61022d3660046108fe565b610490565b61013f60065481565b60606003805461024a90610aa4565b80601f016020809104026020016040519081016040528092919081815260200182805461027690610aa4565b80156102c35780601f10610298576101008083540402835291602001916102c3565b820191906000526020600020905b8154815290600101906020018083116102a657829003601f168201915b5050505050905090565b6000336102db8185856104bb565b5060019392505050565b6000336102f38582856105df565b6102fe858585610659565b506001949350505050565b6000336102db81858561031c8383610490565b6103269190610a7e565b6104bb565b600580546001600160a01b0319166001600160a01b0386161790556006839055600061035960078484610827565b50600195945050505050565b6007805461037290610aa4565b80601f016020809104026020016040519081016040528092919081815260200182805461039e90610aa4565b80156103eb5780601f106103c0576101008083540402835291602001916103eb565b820191906000526020600020905b8154815290600101906020018083116103ce57829003601f168201915b505050505081565b60606004805461024a90610aa4565b600033816104108286610490565b9050838110156104755760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102fe82868684036104bb565b6000336102db818585610659565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03831661051d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161046c565b6001600160a01b03821661057e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161046c565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006105eb8484610490565b9050600019811461065357818110156106465760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161046c565b61065384848484036104bb565b50505050565b6001600160a01b0383166106bd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161046c565b6001600160a01b03821661071f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161046c565b6001600160a01b038316600090815260208190526040902054818110156107975760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161046c565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906107ce908490610a7e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161081a91815260200190565b60405180910390a3610653565b82805461083390610aa4565b90600052602060002090601f016020900481019282610855576000855561089b565b82601f1061086e5782800160ff1982351617855561089b565b8280016001018555821561089b579182015b8281111561089b578235825591602001919060010190610880565b506108a79291506108ab565b5090565b5b808211156108a757600081556001016108ac565b80356001600160a01b03811681146108d757600080fd5b919050565b6000602082840312156108ee57600080fd5b6108f7826108c0565b9392505050565b6000806040838503121561091157600080fd5b61091a836108c0565b9150610928602084016108c0565b90509250929050565b60008060006060848603121561094657600080fd5b61094f846108c0565b925061095d602085016108c0565b9150604084013590509250925092565b6000806040838503121561098057600080fd5b610989836108c0565b946020939093013593505050565b600080600080606085870312156109ad57600080fd5b6109b6856108c0565b935060208501359250604085013567ffffffffffffffff808211156109da57600080fd5b818701915087601f8301126109ee57600080fd5b8135818111156109fd57600080fd5b886020828501011115610a0f57600080fd5b95989497505060200194505050565b6000815180845260005b81811015610a4457602081850181015186830182015201610a28565b81811115610a56576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006108f76020830184610a1e565b60008219821115610a9f57634e487b7160e01b600052601160045260246000fd5b500190565b600181811c90821680610ab857607f821691505b60208210811415610ad957634e487b7160e01b600052602260045260246000fd5b5091905056fea26469706673582212208e556ca94a7c207ef84e392e440fab9457395573ba046b3ca5052bf83ad3945364736f6c63430008060033",
367
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806370a0823111610097578063a457c2d711610066578063a457c2d7146101f9578063a9059cbb1461020c578063dd62ed3e1461021f578063e82262861461023257600080fd5b806370a082311461019557806384c09a3c146101be5780638fbaf1cc146101e957806395d89b41146101f157600080fd5b806323b872dd116100d357806323b872dd1461014d578063313ce56714610160578063395093511461016f5780634000aea01461018257600080fd5b806306fdde03146100fa578063095ea7b31461011857806318160ddd1461013b575b600080fd5b61010261023b565b60405161010f9190610a6b565b60405180910390f35b61012b61012636600461096d565b6102cd565b604051901515815260200161010f565b6002545b60405190815260200161010f565b61012b61015b366004610931565b6102e5565b6040516012815260200161010f565b61012b61017d36600461096d565b610309565b61012b610190366004610997565b61032b565b61013f6101a33660046108dc565b6001600160a01b031660009081526020819052604090205490565b6005546101d1906001600160a01b031681565b6040516001600160a01b03909116815260200161010f565b610102610365565b6101026103f3565b61012b61020736600461096d565b610402565b61012b61021a36600461096d565b610482565b61013f61022d3660046108fe565b610490565b61013f60065481565b60606003805461024a90610aa4565b80601f016020809104026020016040519081016040528092919081815260200182805461027690610aa4565b80156102c35780601f10610298576101008083540402835291602001916102c3565b820191906000526020600020905b8154815290600101906020018083116102a657829003601f168201915b5050505050905090565b6000336102db8185856104bb565b5060019392505050565b6000336102f38582856105df565b6102fe858585610659565b506001949350505050565b6000336102db81858561031c8383610490565b6103269190610a7e565b6104bb565b600580546001600160a01b0319166001600160a01b0386161790556006839055600061035960078484610827565b50600195945050505050565b6007805461037290610aa4565b80601f016020809104026020016040519081016040528092919081815260200182805461039e90610aa4565b80156103eb5780601f106103c0576101008083540402835291602001916103eb565b820191906000526020600020905b8154815290600101906020018083116103ce57829003601f168201915b505050505081565b60606004805461024a90610aa4565b600033816104108286610490565b9050838110156104755760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102fe82868684036104bb565b6000336102db818585610659565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03831661051d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161046c565b6001600160a01b03821661057e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161046c565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006105eb8484610490565b9050600019811461065357818110156106465760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161046c565b61065384848484036104bb565b50505050565b6001600160a01b0383166106bd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161046c565b6001600160a01b03821661071f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161046c565b6001600160a01b038316600090815260208190526040902054818110156107975760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161046c565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906107ce908490610a7e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161081a91815260200190565b60405180910390a3610653565b82805461083390610aa4565b90600052602060002090601f016020900481019282610855576000855561089b565b82601f1061086e5782800160ff1982351617855561089b565b8280016001018555821561089b579182015b8281111561089b578235825591602001919060010190610880565b506108a79291506108ab565b5090565b5b808211156108a757600081556001016108ac565b80356001600160a01b03811681146108d757600080fd5b919050565b6000602082840312156108ee57600080fd5b6108f7826108c0565b9392505050565b6000806040838503121561091157600080fd5b61091a836108c0565b9150610928602084016108c0565b90509250929050565b60008060006060848603121561094657600080fd5b61094f846108c0565b925061095d602085016108c0565b9150604084013590509250925092565b6000806040838503121561098057600080fd5b610989836108c0565b946020939093013593505050565b600080600080606085870312156109ad57600080fd5b6109b6856108c0565b935060208501359250604085013567ffffffffffffffff808211156109da57600080fd5b818701915087601f8301126109ee57600080fd5b8135818111156109fd57600080fd5b886020828501011115610a0f57600080fd5b95989497505060200194505050565b6000815180845260005b81811015610a4457602081850181015186830182015201610a28565b81811115610a56576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006108f76020830184610a1e565b60008219821115610a9f57634e487b7160e01b600052601160045260246000fd5b500190565b600181811c90821680610ab857607f821691505b60208210811415610ad957634e487b7160e01b600052602260045260246000fd5b5091905056fea26469706673582212208e556ca94a7c207ef84e392e440fab9457395573ba046b3ca5052bf83ad3945364736f6c63430008060033",
368
+ "linkReferences": {},
369
+ "deployedLinkReferences": {}
370
+ }
@@ -0,0 +1,202 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "PolicyHolderMock",
4
+ "sourceName": "contracts/mocks/PolicyHolderMock.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "bool",
10
+ "name": "fail_",
11
+ "type": "bool"
12
+ }
13
+ ],
14
+ "stateMutability": "nonpayable",
15
+ "type": "constructor"
16
+ },
17
+ {
18
+ "anonymous": false,
19
+ "inputs": [
20
+ {
21
+ "indexed": false,
22
+ "internalType": "uint256",
23
+ "name": "kind",
24
+ "type": "uint256"
25
+ },
26
+ {
27
+ "indexed": false,
28
+ "internalType": "uint256",
29
+ "name": "policyId",
30
+ "type": "uint256"
31
+ },
32
+ {
33
+ "indexed": false,
34
+ "internalType": "address",
35
+ "name": "operator",
36
+ "type": "address"
37
+ },
38
+ {
39
+ "indexed": false,
40
+ "internalType": "address",
41
+ "name": "from",
42
+ "type": "address"
43
+ }
44
+ ],
45
+ "name": "NotificationReceived",
46
+ "type": "event"
47
+ },
48
+ {
49
+ "inputs": [],
50
+ "name": "fail",
51
+ "outputs": [
52
+ {
53
+ "internalType": "bool",
54
+ "name": "",
55
+ "type": "bool"
56
+ }
57
+ ],
58
+ "stateMutability": "view",
59
+ "type": "function"
60
+ },
61
+ {
62
+ "inputs": [
63
+ {
64
+ "internalType": "address",
65
+ "name": "operator",
66
+ "type": "address"
67
+ },
68
+ {
69
+ "internalType": "address",
70
+ "name": "from",
71
+ "type": "address"
72
+ },
73
+ {
74
+ "internalType": "uint256",
75
+ "name": "policyId_",
76
+ "type": "uint256"
77
+ },
78
+ {
79
+ "internalType": "bytes",
80
+ "name": "",
81
+ "type": "bytes"
82
+ }
83
+ ],
84
+ "name": "onERC721Received",
85
+ "outputs": [
86
+ {
87
+ "internalType": "bytes4",
88
+ "name": "",
89
+ "type": "bytes4"
90
+ }
91
+ ],
92
+ "stateMutability": "nonpayable",
93
+ "type": "function"
94
+ },
95
+ {
96
+ "inputs": [
97
+ {
98
+ "internalType": "address",
99
+ "name": "operator",
100
+ "type": "address"
101
+ },
102
+ {
103
+ "internalType": "address",
104
+ "name": "from",
105
+ "type": "address"
106
+ },
107
+ {
108
+ "internalType": "uint256",
109
+ "name": "policyId_",
110
+ "type": "uint256"
111
+ },
112
+ {
113
+ "internalType": "uint256",
114
+ "name": "amount",
115
+ "type": "uint256"
116
+ }
117
+ ],
118
+ "name": "onPayoutReceived",
119
+ "outputs": [
120
+ {
121
+ "internalType": "bytes4",
122
+ "name": "",
123
+ "type": "bytes4"
124
+ }
125
+ ],
126
+ "stateMutability": "nonpayable",
127
+ "type": "function"
128
+ },
129
+ {
130
+ "inputs": [
131
+ {
132
+ "internalType": "address",
133
+ "name": "operator",
134
+ "type": "address"
135
+ },
136
+ {
137
+ "internalType": "address",
138
+ "name": "from",
139
+ "type": "address"
140
+ },
141
+ {
142
+ "internalType": "uint256",
143
+ "name": "policyId_",
144
+ "type": "uint256"
145
+ }
146
+ ],
147
+ "name": "onPolicyExpired",
148
+ "outputs": [
149
+ {
150
+ "internalType": "bytes4",
151
+ "name": "",
152
+ "type": "bytes4"
153
+ }
154
+ ],
155
+ "stateMutability": "nonpayable",
156
+ "type": "function"
157
+ },
158
+ {
159
+ "inputs": [],
160
+ "name": "payout",
161
+ "outputs": [
162
+ {
163
+ "internalType": "uint256",
164
+ "name": "",
165
+ "type": "uint256"
166
+ }
167
+ ],
168
+ "stateMutability": "view",
169
+ "type": "function"
170
+ },
171
+ {
172
+ "inputs": [],
173
+ "name": "policyId",
174
+ "outputs": [
175
+ {
176
+ "internalType": "uint256",
177
+ "name": "",
178
+ "type": "uint256"
179
+ }
180
+ ],
181
+ "stateMutability": "view",
182
+ "type": "function"
183
+ },
184
+ {
185
+ "inputs": [
186
+ {
187
+ "internalType": "bool",
188
+ "name": "fail_",
189
+ "type": "bool"
190
+ }
191
+ ],
192
+ "name": "setFail",
193
+ "outputs": [],
194
+ "stateMutability": "nonpayable",
195
+ "type": "function"
196
+ }
197
+ ],
198
+ "bytecode": "0x608060405234801561001057600080fd5b506040516105c23803806105c283398101604081905261002f9161004b565b6002805460ff1916911515919091179055600019600155610074565b60006020828403121561005d57600080fd5b8151801515811461006d57600080fd5b9392505050565b61053f806100836000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063a9cc47181161005b578063a9cc4718146100ed578063d6281d3e1461010a578063e8e617b71461011d578063ee89ef3a1461013057600080fd5b8063150b7a021461008257806363bd1d4a146100b35780639d769402146100ca575b600080fd5b6100956100903660046103dc565b610139565b6040516001600160e01b031990911681526020015b60405180910390f35b6100bc60015481565b6040519081526020016100aa565b6100eb6100d83660046104b9565b6002805460ff1916911515919091179055565b005b6002546100fa9060ff1681565b60405190151581526020016100aa565b610095610118366004610477565b6101fd565b61009561012b3660046103a0565b6102c3565b6100bc60005481565b60025460009060ff16156101aa5760405162461bcd60e51b815260206004820152602d60248201527f6f6e45524337323152656365697665643a205468657920746f6c64206d65204960448201526c081a185d99481d1bc819985a5b609a1b60648201526084015b60405180910390fd5b60008481556040517fed80108518efd09a475da47e8e2247346c5d2dea917fc27629cd0d1ebba504aa916101e39187908a908a906104e2565b60405180910390a150630a85bd0160e11b95945050505050565b60025460009060ff16156102695760405162461bcd60e51b815260206004820152602d60248201527f6f6e5061796f757452656365697665643a205468657920746f6c64206d65204960448201526c081a185d99481d1bc819985a5b609a1b60648201526084016101a1565b600083905560018290556040517fed80108518efd09a475da47e8e2247346c5d2dea917fc27629cd0d1ebba504aa906102aa906002908690899089906104e2565b60405180910390a150636b140e9f60e11b949350505050565b60025460009060ff161561032e5760405162461bcd60e51b815260206004820152602c60248201527f6f6e506f6c696379457870697265643a205468657920746f6c64206d6520492060448201526b1a185d99481d1bc819985a5b60a21b60648201526084016101a1565b600082815560019081556040517fed80108518efd09a475da47e8e2247346c5d2dea917fc27629cd0d1ebba504aa9161036c918590889088906104e2565b60405180910390a15063e8e617b760e01b9392505050565b80356001600160a01b038116811461039b57600080fd5b919050565b6000806000606084860312156103b557600080fd5b6103be84610384565b92506103cc60208501610384565b9150604084013590509250925092565b6000806000806000608086880312156103f457600080fd5b6103fd86610384565b945061040b60208701610384565b935060408601359250606086013567ffffffffffffffff8082111561042f57600080fd5b818801915088601f83011261044357600080fd5b81358181111561045257600080fd5b89602082850101111561046457600080fd5b9699959850939650602001949392505050565b6000806000806080858703121561048d57600080fd5b61049685610384565b93506104a460208601610384565b93969395505050506040820135916060013590565b6000602082840312156104cb57600080fd5b813580151581146104db57600080fd5b9392505050565b93845260208401929092526001600160a01b0390811660408401521660608201526080019056fea2646970667358221220ff0a0b558202892f7b77c8a173149788d556e0af5d577d9eac36bd75eb6f4ab364736f6c63430008060033",
199
+ "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063a9cc47181161005b578063a9cc4718146100ed578063d6281d3e1461010a578063e8e617b71461011d578063ee89ef3a1461013057600080fd5b8063150b7a021461008257806363bd1d4a146100b35780639d769402146100ca575b600080fd5b6100956100903660046103dc565b610139565b6040516001600160e01b031990911681526020015b60405180910390f35b6100bc60015481565b6040519081526020016100aa565b6100eb6100d83660046104b9565b6002805460ff1916911515919091179055565b005b6002546100fa9060ff1681565b60405190151581526020016100aa565b610095610118366004610477565b6101fd565b61009561012b3660046103a0565b6102c3565b6100bc60005481565b60025460009060ff16156101aa5760405162461bcd60e51b815260206004820152602d60248201527f6f6e45524337323152656365697665643a205468657920746f6c64206d65204960448201526c081a185d99481d1bc819985a5b609a1b60648201526084015b60405180910390fd5b60008481556040517fed80108518efd09a475da47e8e2247346c5d2dea917fc27629cd0d1ebba504aa916101e39187908a908a906104e2565b60405180910390a150630a85bd0160e11b95945050505050565b60025460009060ff16156102695760405162461bcd60e51b815260206004820152602d60248201527f6f6e5061796f757452656365697665643a205468657920746f6c64206d65204960448201526c081a185d99481d1bc819985a5b609a1b60648201526084016101a1565b600083905560018290556040517fed80108518efd09a475da47e8e2247346c5d2dea917fc27629cd0d1ebba504aa906102aa906002908690899089906104e2565b60405180910390a150636b140e9f60e11b949350505050565b60025460009060ff161561032e5760405162461bcd60e51b815260206004820152602c60248201527f6f6e506f6c696379457870697265643a205468657920746f6c64206d6520492060448201526b1a185d99481d1bc819985a5b60a21b60648201526084016101a1565b600082815560019081556040517fed80108518efd09a475da47e8e2247346c5d2dea917fc27629cd0d1ebba504aa9161036c918590889088906104e2565b60405180910390a15063e8e617b760e01b9392505050565b80356001600160a01b038116811461039b57600080fd5b919050565b6000806000606084860312156103b557600080fd5b6103be84610384565b92506103cc60208501610384565b9150604084013590509250925092565b6000806000806000608086880312156103f457600080fd5b6103fd86610384565b945061040b60208701610384565b935060408601359250606086013567ffffffffffffffff8082111561042f57600080fd5b818801915088601f83011261044357600080fd5b81358181111561045257600080fd5b89602082850101111561046457600080fd5b9699959850939650602001949392505050565b6000806000806080858703121561048d57600080fd5b61049685610384565b93506104a460208601610384565b93969395505050506040820135916060013590565b6000602082840312156104cb57600080fd5b813580151581146104db57600080fd5b9392505050565b93845260208401929092526001600160a01b0390811660408401521660608201526080019056fea2646970667358221220ff0a0b558202892f7b77c8a173149788d556e0af5d577d9eac36bd75eb6f4ab364736f6c63430008060033",
200
+ "linkReferences": {},
201
+ "deployedLinkReferences": {}
202
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "PolicyPoolComponentMock",
4
+ "sourceName": "contracts/mocks/PolicyPoolComponentMock.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "contract IPolicyPool",
10
+ "name": "policyPool_",
11
+ "type": "address"
12
+ }
13
+ ],
14
+ "stateMutability": "nonpayable",
15
+ "type": "constructor"
16
+ },
17
+ {
18
+ "inputs": [],
19
+ "name": "policyPool",
20
+ "outputs": [
21
+ {
22
+ "internalType": "contract IPolicyPool",
23
+ "name": "",
24
+ "type": "address"
25
+ }
26
+ ],
27
+ "stateMutability": "view",
28
+ "type": "function"
29
+ }
30
+ ],
31
+ "bytecode": "0x60a060405234801561001057600080fd5b5060405161012f38038061012f83398101604081905261002f91610044565b60601b6001600160601b031916608052610074565b60006020828403121561005657600080fd5b81516001600160a01b038116811461006d57600080fd5b9392505050565b60805160601c60a061008f6000396000602f015260a06000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80634d15eb0314602d575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000006040516001600160a01b03909116815260200160405180910390f3fea26469706673582212202b33e61d846cd192b96299ea5f018a98ed64e9e2cdc3c1b2af928598941563dd64736f6c63430008060033",
32
+ "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c80634d15eb0314602d575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000006040516001600160a01b03909116815260200160405180910390f3fea26469706673582212202b33e61d846cd192b96299ea5f018a98ed64e9e2cdc3c1b2af928598941563dd64736f6c63430008060033",
33
+ "linkReferences": {},
34
+ "deployedLinkReferences": {}
35
+ }