@ensuro/core 2.8.0 → 2.8.2

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 (52) hide show
  1. package/build/contracts/AccessManager.sol/AccessManager.json +618 -0
  2. package/build/contracts/ERC4626AssetManager.sol/ERC4626AssetManager.json +238 -0
  3. package/build/contracts/EToken.sol/EToken.json +1287 -0
  4. package/build/contracts/LPManualWhitelist.sol/LPManualWhitelist.json +657 -0
  5. package/build/contracts/LiquidityThresholdAssetManager.sol/LiquidityThresholdAssetManager.json +222 -0
  6. package/build/contracts/Policy.sol/Policy.json +10 -0
  7. package/build/contracts/PolicyPool.sol/PolicyPool.json +1775 -0
  8. package/build/contracts/PolicyPoolComponent.sol/PolicyPoolComponent.json +342 -0
  9. package/build/contracts/PremiumsAccount.sol/PremiumsAccount.json +1142 -0
  10. package/build/contracts/Reserve.sol/Reserve.json +413 -0
  11. package/build/contracts/RiskModule.sol/RiskModule.json +589 -0
  12. package/build/contracts/SignedBucketRiskModule.sol/SignedBucketRiskModule.json +1251 -0
  13. package/build/contracts/SignedQuoteRiskModule.sol/SignedQuoteRiskModule.json +1145 -0
  14. package/build/contracts/TimeScaled.sol/TimeScaled.json +10 -0
  15. package/build/contracts/TrustfulRiskModule.sol/TrustfulRiskModule.json +1143 -0
  16. package/build/contracts/dependencies/WadRayMath.sol/WadRayMath.json +10 -0
  17. package/build/contracts/interfaces/IAccessManager.sol/IAccessManager.json +343 -0
  18. package/build/contracts/interfaces/IAssetManager.sol/IAssetManager.json +128 -0
  19. package/build/contracts/interfaces/IEToken.sol/IEToken.json +460 -0
  20. package/build/contracts/interfaces/ILPWhitelist.sol/ILPWhitelist.json +103 -0
  21. package/build/contracts/interfaces/IPolicyHolder.sol/IPolicyHolder.json +108 -0
  22. package/build/contracts/interfaces/IPolicyHolderV2.sol/IPolicyHolderV2.json +142 -0
  23. package/build/contracts/interfaces/IPolicyPool.sol/IPolicyPool.json +820 -0
  24. package/build/contracts/interfaces/IPolicyPoolComponent.sol/IPolicyPoolComponent.json +43 -0
  25. package/build/contracts/interfaces/IPremiumsAccount.sol/IPremiumsAccount.json +477 -0
  26. package/build/contracts/interfaces/IRiskModule.sol/IRiskModule.json +165 -0
  27. package/build/contracts/migration/LPManualWhitelistV20.sol/LPManualWhitelistV20.json +491 -0
  28. package/build/contracts/migration/LPManualWhitelistV20Upgraded.sol/LPManualWhitelistV20Upgraded.json +502 -0
  29. package/build/contracts/mocks/FixedRateVault.sol/FixedRateVault.json +736 -0
  30. package/build/contracts/mocks/ForwardProxy.sol/ForwardProxy.json +43 -0
  31. package/build/contracts/mocks/IMintableERC20.sol/IMintableERC20.json +47 -0
  32. package/build/contracts/mocks/InterfaceIdCalculator.sol/InterfaceIdCalculator.json +193 -0
  33. package/build/contracts/mocks/PolicyHolderMock.sol/PolicyHolderMock.json +457 -0
  34. package/build/contracts/mocks/PolicyPoolComponentMock.sol/PolicyPoolComponentMock.json +54 -0
  35. package/build/contracts/mocks/PolicyPoolMock.sol/PolicyPoolMock.json +929 -0
  36. package/build/contracts/mocks/PolicyPoolMock.sol/PolicyPoolMockForward.json +92 -0
  37. package/build/contracts/mocks/RiskModuleMock.sol/RiskModuleMock.json +1316 -0
  38. package/build/contracts/mocks/TestCurrency.sol/TestCurrency.json +343 -0
  39. package/build/contracts/mocks/TestNFT.sol/TestNFT.json +388 -0
  40. package/contracts/Policy.sol +58 -21
  41. package/contracts/PolicyPool.sol +155 -37
  42. package/contracts/PolicyPoolComponent.sol +5 -2
  43. package/contracts/RiskModule.sol +27 -30
  44. package/contracts/SignedBucketRiskModule.sol +32 -95
  45. package/contracts/SignedQuoteRiskModule.sol +3 -1
  46. package/contracts/interfaces/IPolicyHolder.sol +2 -2
  47. package/contracts/interfaces/IPolicyHolderV2.sol +29 -0
  48. package/contracts/mocks/PolicyHolderMock.sol +71 -10
  49. package/js/deploy.js +6 -25
  50. package/js/utils.js +9 -4
  51. package/package.json +3 -5
  52. package/contracts/TieredSignedQuoteRiskModule.sol +0 -159
@@ -0,0 +1,929 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "PolicyPoolMock",
4
+ "sourceName": "contracts/mocks/PolicyPoolMock.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "contract IERC20Metadata",
10
+ "name": "currency_",
11
+ "type": "address"
12
+ },
13
+ {
14
+ "internalType": "contract IAccessManager",
15
+ "name": "access_",
16
+ "type": "address"
17
+ }
18
+ ],
19
+ "stateMutability": "nonpayable",
20
+ "type": "constructor"
21
+ },
22
+ {
23
+ "anonymous": false,
24
+ "inputs": [
25
+ {
26
+ "indexed": true,
27
+ "internalType": "contract IRiskModule",
28
+ "name": "riskModule",
29
+ "type": "address"
30
+ },
31
+ {
32
+ "components": [
33
+ {
34
+ "internalType": "uint256",
35
+ "name": "id",
36
+ "type": "uint256"
37
+ },
38
+ {
39
+ "internalType": "uint256",
40
+ "name": "payout",
41
+ "type": "uint256"
42
+ },
43
+ {
44
+ "internalType": "uint256",
45
+ "name": "premium",
46
+ "type": "uint256"
47
+ },
48
+ {
49
+ "internalType": "uint256",
50
+ "name": "jrScr",
51
+ "type": "uint256"
52
+ },
53
+ {
54
+ "internalType": "uint256",
55
+ "name": "srScr",
56
+ "type": "uint256"
57
+ },
58
+ {
59
+ "internalType": "uint256",
60
+ "name": "lossProb",
61
+ "type": "uint256"
62
+ },
63
+ {
64
+ "internalType": "uint256",
65
+ "name": "purePremium",
66
+ "type": "uint256"
67
+ },
68
+ {
69
+ "internalType": "uint256",
70
+ "name": "ensuroCommission",
71
+ "type": "uint256"
72
+ },
73
+ {
74
+ "internalType": "uint256",
75
+ "name": "partnerCommission",
76
+ "type": "uint256"
77
+ },
78
+ {
79
+ "internalType": "uint256",
80
+ "name": "jrCoc",
81
+ "type": "uint256"
82
+ },
83
+ {
84
+ "internalType": "uint256",
85
+ "name": "srCoc",
86
+ "type": "uint256"
87
+ },
88
+ {
89
+ "internalType": "contract IRiskModule",
90
+ "name": "riskModule",
91
+ "type": "address"
92
+ },
93
+ {
94
+ "internalType": "uint40",
95
+ "name": "start",
96
+ "type": "uint40"
97
+ },
98
+ {
99
+ "internalType": "uint40",
100
+ "name": "expiration",
101
+ "type": "uint40"
102
+ }
103
+ ],
104
+ "indexed": false,
105
+ "internalType": "struct Policy.PolicyData",
106
+ "name": "policy",
107
+ "type": "tuple"
108
+ }
109
+ ],
110
+ "name": "NewPolicy",
111
+ "type": "event"
112
+ },
113
+ {
114
+ "anonymous": false,
115
+ "inputs": [
116
+ {
117
+ "indexed": true,
118
+ "internalType": "contract IRiskModule",
119
+ "name": "riskModule",
120
+ "type": "address"
121
+ },
122
+ {
123
+ "indexed": true,
124
+ "internalType": "uint256",
125
+ "name": "oldPolicyId",
126
+ "type": "uint256"
127
+ },
128
+ {
129
+ "indexed": true,
130
+ "internalType": "uint256",
131
+ "name": "newPolicyId",
132
+ "type": "uint256"
133
+ }
134
+ ],
135
+ "name": "PolicyReplaced",
136
+ "type": "event"
137
+ },
138
+ {
139
+ "anonymous": false,
140
+ "inputs": [
141
+ {
142
+ "indexed": true,
143
+ "internalType": "contract IRiskModule",
144
+ "name": "riskModule",
145
+ "type": "address"
146
+ },
147
+ {
148
+ "indexed": true,
149
+ "internalType": "uint256",
150
+ "name": "policyId",
151
+ "type": "uint256"
152
+ },
153
+ {
154
+ "indexed": false,
155
+ "internalType": "uint256",
156
+ "name": "payout",
157
+ "type": "uint256"
158
+ }
159
+ ],
160
+ "name": "PolicyResolved",
161
+ "type": "event"
162
+ },
163
+ {
164
+ "inputs": [],
165
+ "name": "MAX_INT",
166
+ "outputs": [
167
+ {
168
+ "internalType": "uint256",
169
+ "name": "",
170
+ "type": "uint256"
171
+ }
172
+ ],
173
+ "stateMutability": "view",
174
+ "type": "function"
175
+ },
176
+ {
177
+ "inputs": [],
178
+ "name": "access",
179
+ "outputs": [
180
+ {
181
+ "internalType": "contract IAccessManager",
182
+ "name": "",
183
+ "type": "address"
184
+ }
185
+ ],
186
+ "stateMutability": "view",
187
+ "type": "function"
188
+ },
189
+ {
190
+ "inputs": [],
191
+ "name": "currency",
192
+ "outputs": [
193
+ {
194
+ "internalType": "contract IERC20Metadata",
195
+ "name": "",
196
+ "type": "address"
197
+ }
198
+ ],
199
+ "stateMutability": "view",
200
+ "type": "function"
201
+ },
202
+ {
203
+ "inputs": [
204
+ {
205
+ "internalType": "contract IEToken",
206
+ "name": "",
207
+ "type": "address"
208
+ },
209
+ {
210
+ "internalType": "uint256",
211
+ "name": "",
212
+ "type": "uint256"
213
+ }
214
+ ],
215
+ "name": "deposit",
216
+ "outputs": [],
217
+ "stateMutability": "pure",
218
+ "type": "function"
219
+ },
220
+ {
221
+ "inputs": [
222
+ {
223
+ "components": [
224
+ {
225
+ "internalType": "uint256",
226
+ "name": "id",
227
+ "type": "uint256"
228
+ },
229
+ {
230
+ "internalType": "uint256",
231
+ "name": "payout",
232
+ "type": "uint256"
233
+ },
234
+ {
235
+ "internalType": "uint256",
236
+ "name": "premium",
237
+ "type": "uint256"
238
+ },
239
+ {
240
+ "internalType": "uint256",
241
+ "name": "jrScr",
242
+ "type": "uint256"
243
+ },
244
+ {
245
+ "internalType": "uint256",
246
+ "name": "srScr",
247
+ "type": "uint256"
248
+ },
249
+ {
250
+ "internalType": "uint256",
251
+ "name": "lossProb",
252
+ "type": "uint256"
253
+ },
254
+ {
255
+ "internalType": "uint256",
256
+ "name": "purePremium",
257
+ "type": "uint256"
258
+ },
259
+ {
260
+ "internalType": "uint256",
261
+ "name": "ensuroCommission",
262
+ "type": "uint256"
263
+ },
264
+ {
265
+ "internalType": "uint256",
266
+ "name": "partnerCommission",
267
+ "type": "uint256"
268
+ },
269
+ {
270
+ "internalType": "uint256",
271
+ "name": "jrCoc",
272
+ "type": "uint256"
273
+ },
274
+ {
275
+ "internalType": "uint256",
276
+ "name": "srCoc",
277
+ "type": "uint256"
278
+ },
279
+ {
280
+ "internalType": "contract IRiskModule",
281
+ "name": "riskModule",
282
+ "type": "address"
283
+ },
284
+ {
285
+ "internalType": "uint40",
286
+ "name": "start",
287
+ "type": "uint40"
288
+ },
289
+ {
290
+ "internalType": "uint40",
291
+ "name": "expiration",
292
+ "type": "uint40"
293
+ }
294
+ ],
295
+ "internalType": "struct Policy.PolicyData",
296
+ "name": "policy",
297
+ "type": "tuple"
298
+ }
299
+ ],
300
+ "name": "expirePolicy",
301
+ "outputs": [],
302
+ "stateMutability": "nonpayable",
303
+ "type": "function"
304
+ },
305
+ {
306
+ "inputs": [
307
+ {
308
+ "internalType": "uint256",
309
+ "name": "policyId",
310
+ "type": "uint256"
311
+ }
312
+ ],
313
+ "name": "getPolicyHash",
314
+ "outputs": [
315
+ {
316
+ "internalType": "bytes32",
317
+ "name": "",
318
+ "type": "bytes32"
319
+ }
320
+ ],
321
+ "stateMutability": "view",
322
+ "type": "function"
323
+ },
324
+ {
325
+ "inputs": [
326
+ {
327
+ "internalType": "contract IRiskModule",
328
+ "name": "riskModule",
329
+ "type": "address"
330
+ },
331
+ {
332
+ "components": [
333
+ {
334
+ "internalType": "uint256",
335
+ "name": "moc",
336
+ "type": "uint256"
337
+ },
338
+ {
339
+ "internalType": "uint256",
340
+ "name": "jrCollRatio",
341
+ "type": "uint256"
342
+ },
343
+ {
344
+ "internalType": "uint256",
345
+ "name": "collRatio",
346
+ "type": "uint256"
347
+ },
348
+ {
349
+ "internalType": "uint256",
350
+ "name": "ensuroPpFee",
351
+ "type": "uint256"
352
+ },
353
+ {
354
+ "internalType": "uint256",
355
+ "name": "ensuroCocFee",
356
+ "type": "uint256"
357
+ },
358
+ {
359
+ "internalType": "uint256",
360
+ "name": "jrRoc",
361
+ "type": "uint256"
362
+ },
363
+ {
364
+ "internalType": "uint256",
365
+ "name": "srRoc",
366
+ "type": "uint256"
367
+ }
368
+ ],
369
+ "internalType": "struct IRiskModule.Params",
370
+ "name": "rmParams",
371
+ "type": "tuple"
372
+ },
373
+ {
374
+ "internalType": "uint256",
375
+ "name": "premium",
376
+ "type": "uint256"
377
+ },
378
+ {
379
+ "internalType": "uint256",
380
+ "name": "payout",
381
+ "type": "uint256"
382
+ },
383
+ {
384
+ "internalType": "uint256",
385
+ "name": "lossProb",
386
+ "type": "uint256"
387
+ },
388
+ {
389
+ "internalType": "uint40",
390
+ "name": "expiration",
391
+ "type": "uint40"
392
+ },
393
+ {
394
+ "internalType": "uint40",
395
+ "name": "start",
396
+ "type": "uint40"
397
+ }
398
+ ],
399
+ "name": "initializeAndEmitPolicy",
400
+ "outputs": [],
401
+ "stateMutability": "nonpayable",
402
+ "type": "function"
403
+ },
404
+ {
405
+ "inputs": [
406
+ {
407
+ "internalType": "uint256",
408
+ "name": "policyId",
409
+ "type": "uint256"
410
+ }
411
+ ],
412
+ "name": "isActive",
413
+ "outputs": [
414
+ {
415
+ "internalType": "bool",
416
+ "name": "",
417
+ "type": "bool"
418
+ }
419
+ ],
420
+ "stateMutability": "view",
421
+ "type": "function"
422
+ },
423
+ {
424
+ "inputs": [
425
+ {
426
+ "components": [
427
+ {
428
+ "internalType": "uint256",
429
+ "name": "id",
430
+ "type": "uint256"
431
+ },
432
+ {
433
+ "internalType": "uint256",
434
+ "name": "payout",
435
+ "type": "uint256"
436
+ },
437
+ {
438
+ "internalType": "uint256",
439
+ "name": "premium",
440
+ "type": "uint256"
441
+ },
442
+ {
443
+ "internalType": "uint256",
444
+ "name": "jrScr",
445
+ "type": "uint256"
446
+ },
447
+ {
448
+ "internalType": "uint256",
449
+ "name": "srScr",
450
+ "type": "uint256"
451
+ },
452
+ {
453
+ "internalType": "uint256",
454
+ "name": "lossProb",
455
+ "type": "uint256"
456
+ },
457
+ {
458
+ "internalType": "uint256",
459
+ "name": "purePremium",
460
+ "type": "uint256"
461
+ },
462
+ {
463
+ "internalType": "uint256",
464
+ "name": "ensuroCommission",
465
+ "type": "uint256"
466
+ },
467
+ {
468
+ "internalType": "uint256",
469
+ "name": "partnerCommission",
470
+ "type": "uint256"
471
+ },
472
+ {
473
+ "internalType": "uint256",
474
+ "name": "jrCoc",
475
+ "type": "uint256"
476
+ },
477
+ {
478
+ "internalType": "uint256",
479
+ "name": "srCoc",
480
+ "type": "uint256"
481
+ },
482
+ {
483
+ "internalType": "contract IRiskModule",
484
+ "name": "riskModule",
485
+ "type": "address"
486
+ },
487
+ {
488
+ "internalType": "uint40",
489
+ "name": "start",
490
+ "type": "uint40"
491
+ },
492
+ {
493
+ "internalType": "uint40",
494
+ "name": "expiration",
495
+ "type": "uint40"
496
+ }
497
+ ],
498
+ "internalType": "struct Policy.PolicyData",
499
+ "name": "policy",
500
+ "type": "tuple"
501
+ },
502
+ {
503
+ "internalType": "address",
504
+ "name": "",
505
+ "type": "address"
506
+ },
507
+ {
508
+ "internalType": "address",
509
+ "name": "",
510
+ "type": "address"
511
+ },
512
+ {
513
+ "internalType": "uint96",
514
+ "name": "internalId",
515
+ "type": "uint96"
516
+ }
517
+ ],
518
+ "name": "newPolicy",
519
+ "outputs": [
520
+ {
521
+ "internalType": "uint256",
522
+ "name": "",
523
+ "type": "uint256"
524
+ }
525
+ ],
526
+ "stateMutability": "nonpayable",
527
+ "type": "function"
528
+ },
529
+ {
530
+ "inputs": [
531
+ {
532
+ "components": [
533
+ {
534
+ "internalType": "uint256",
535
+ "name": "id",
536
+ "type": "uint256"
537
+ },
538
+ {
539
+ "internalType": "uint256",
540
+ "name": "payout",
541
+ "type": "uint256"
542
+ },
543
+ {
544
+ "internalType": "uint256",
545
+ "name": "premium",
546
+ "type": "uint256"
547
+ },
548
+ {
549
+ "internalType": "uint256",
550
+ "name": "jrScr",
551
+ "type": "uint256"
552
+ },
553
+ {
554
+ "internalType": "uint256",
555
+ "name": "srScr",
556
+ "type": "uint256"
557
+ },
558
+ {
559
+ "internalType": "uint256",
560
+ "name": "lossProb",
561
+ "type": "uint256"
562
+ },
563
+ {
564
+ "internalType": "uint256",
565
+ "name": "purePremium",
566
+ "type": "uint256"
567
+ },
568
+ {
569
+ "internalType": "uint256",
570
+ "name": "ensuroCommission",
571
+ "type": "uint256"
572
+ },
573
+ {
574
+ "internalType": "uint256",
575
+ "name": "partnerCommission",
576
+ "type": "uint256"
577
+ },
578
+ {
579
+ "internalType": "uint256",
580
+ "name": "jrCoc",
581
+ "type": "uint256"
582
+ },
583
+ {
584
+ "internalType": "uint256",
585
+ "name": "srCoc",
586
+ "type": "uint256"
587
+ },
588
+ {
589
+ "internalType": "contract IRiskModule",
590
+ "name": "riskModule",
591
+ "type": "address"
592
+ },
593
+ {
594
+ "internalType": "uint40",
595
+ "name": "start",
596
+ "type": "uint40"
597
+ },
598
+ {
599
+ "internalType": "uint40",
600
+ "name": "expiration",
601
+ "type": "uint40"
602
+ }
603
+ ],
604
+ "internalType": "struct Policy.PolicyData",
605
+ "name": "oldPolicy",
606
+ "type": "tuple"
607
+ },
608
+ {
609
+ "components": [
610
+ {
611
+ "internalType": "uint256",
612
+ "name": "id",
613
+ "type": "uint256"
614
+ },
615
+ {
616
+ "internalType": "uint256",
617
+ "name": "payout",
618
+ "type": "uint256"
619
+ },
620
+ {
621
+ "internalType": "uint256",
622
+ "name": "premium",
623
+ "type": "uint256"
624
+ },
625
+ {
626
+ "internalType": "uint256",
627
+ "name": "jrScr",
628
+ "type": "uint256"
629
+ },
630
+ {
631
+ "internalType": "uint256",
632
+ "name": "srScr",
633
+ "type": "uint256"
634
+ },
635
+ {
636
+ "internalType": "uint256",
637
+ "name": "lossProb",
638
+ "type": "uint256"
639
+ },
640
+ {
641
+ "internalType": "uint256",
642
+ "name": "purePremium",
643
+ "type": "uint256"
644
+ },
645
+ {
646
+ "internalType": "uint256",
647
+ "name": "ensuroCommission",
648
+ "type": "uint256"
649
+ },
650
+ {
651
+ "internalType": "uint256",
652
+ "name": "partnerCommission",
653
+ "type": "uint256"
654
+ },
655
+ {
656
+ "internalType": "uint256",
657
+ "name": "jrCoc",
658
+ "type": "uint256"
659
+ },
660
+ {
661
+ "internalType": "uint256",
662
+ "name": "srCoc",
663
+ "type": "uint256"
664
+ },
665
+ {
666
+ "internalType": "contract IRiskModule",
667
+ "name": "riskModule",
668
+ "type": "address"
669
+ },
670
+ {
671
+ "internalType": "uint40",
672
+ "name": "start",
673
+ "type": "uint40"
674
+ },
675
+ {
676
+ "internalType": "uint40",
677
+ "name": "expiration",
678
+ "type": "uint40"
679
+ }
680
+ ],
681
+ "internalType": "struct Policy.PolicyData",
682
+ "name": "newPolicy_",
683
+ "type": "tuple"
684
+ },
685
+ {
686
+ "internalType": "address",
687
+ "name": "",
688
+ "type": "address"
689
+ },
690
+ {
691
+ "internalType": "uint96",
692
+ "name": "internalId",
693
+ "type": "uint96"
694
+ }
695
+ ],
696
+ "name": "replacePolicy",
697
+ "outputs": [
698
+ {
699
+ "internalType": "uint256",
700
+ "name": "",
701
+ "type": "uint256"
702
+ }
703
+ ],
704
+ "stateMutability": "nonpayable",
705
+ "type": "function"
706
+ },
707
+ {
708
+ "inputs": [
709
+ {
710
+ "components": [
711
+ {
712
+ "internalType": "uint256",
713
+ "name": "id",
714
+ "type": "uint256"
715
+ },
716
+ {
717
+ "internalType": "uint256",
718
+ "name": "payout",
719
+ "type": "uint256"
720
+ },
721
+ {
722
+ "internalType": "uint256",
723
+ "name": "premium",
724
+ "type": "uint256"
725
+ },
726
+ {
727
+ "internalType": "uint256",
728
+ "name": "jrScr",
729
+ "type": "uint256"
730
+ },
731
+ {
732
+ "internalType": "uint256",
733
+ "name": "srScr",
734
+ "type": "uint256"
735
+ },
736
+ {
737
+ "internalType": "uint256",
738
+ "name": "lossProb",
739
+ "type": "uint256"
740
+ },
741
+ {
742
+ "internalType": "uint256",
743
+ "name": "purePremium",
744
+ "type": "uint256"
745
+ },
746
+ {
747
+ "internalType": "uint256",
748
+ "name": "ensuroCommission",
749
+ "type": "uint256"
750
+ },
751
+ {
752
+ "internalType": "uint256",
753
+ "name": "partnerCommission",
754
+ "type": "uint256"
755
+ },
756
+ {
757
+ "internalType": "uint256",
758
+ "name": "jrCoc",
759
+ "type": "uint256"
760
+ },
761
+ {
762
+ "internalType": "uint256",
763
+ "name": "srCoc",
764
+ "type": "uint256"
765
+ },
766
+ {
767
+ "internalType": "contract IRiskModule",
768
+ "name": "riskModule",
769
+ "type": "address"
770
+ },
771
+ {
772
+ "internalType": "uint40",
773
+ "name": "start",
774
+ "type": "uint40"
775
+ },
776
+ {
777
+ "internalType": "uint40",
778
+ "name": "expiration",
779
+ "type": "uint40"
780
+ }
781
+ ],
782
+ "internalType": "struct Policy.PolicyData",
783
+ "name": "policy",
784
+ "type": "tuple"
785
+ },
786
+ {
787
+ "internalType": "uint256",
788
+ "name": "payout",
789
+ "type": "uint256"
790
+ }
791
+ ],
792
+ "name": "resolvePolicy",
793
+ "outputs": [],
794
+ "stateMutability": "nonpayable",
795
+ "type": "function"
796
+ },
797
+ {
798
+ "inputs": [
799
+ {
800
+ "components": [
801
+ {
802
+ "internalType": "uint256",
803
+ "name": "id",
804
+ "type": "uint256"
805
+ },
806
+ {
807
+ "internalType": "uint256",
808
+ "name": "payout",
809
+ "type": "uint256"
810
+ },
811
+ {
812
+ "internalType": "uint256",
813
+ "name": "premium",
814
+ "type": "uint256"
815
+ },
816
+ {
817
+ "internalType": "uint256",
818
+ "name": "jrScr",
819
+ "type": "uint256"
820
+ },
821
+ {
822
+ "internalType": "uint256",
823
+ "name": "srScr",
824
+ "type": "uint256"
825
+ },
826
+ {
827
+ "internalType": "uint256",
828
+ "name": "lossProb",
829
+ "type": "uint256"
830
+ },
831
+ {
832
+ "internalType": "uint256",
833
+ "name": "purePremium",
834
+ "type": "uint256"
835
+ },
836
+ {
837
+ "internalType": "uint256",
838
+ "name": "ensuroCommission",
839
+ "type": "uint256"
840
+ },
841
+ {
842
+ "internalType": "uint256",
843
+ "name": "partnerCommission",
844
+ "type": "uint256"
845
+ },
846
+ {
847
+ "internalType": "uint256",
848
+ "name": "jrCoc",
849
+ "type": "uint256"
850
+ },
851
+ {
852
+ "internalType": "uint256",
853
+ "name": "srCoc",
854
+ "type": "uint256"
855
+ },
856
+ {
857
+ "internalType": "contract IRiskModule",
858
+ "name": "riskModule",
859
+ "type": "address"
860
+ },
861
+ {
862
+ "internalType": "uint40",
863
+ "name": "start",
864
+ "type": "uint40"
865
+ },
866
+ {
867
+ "internalType": "uint40",
868
+ "name": "expiration",
869
+ "type": "uint40"
870
+ }
871
+ ],
872
+ "internalType": "struct Policy.PolicyData",
873
+ "name": "policy",
874
+ "type": "tuple"
875
+ },
876
+ {
877
+ "internalType": "bool",
878
+ "name": "customerWon",
879
+ "type": "bool"
880
+ }
881
+ ],
882
+ "name": "resolvePolicyFullPayout",
883
+ "outputs": [],
884
+ "stateMutability": "nonpayable",
885
+ "type": "function"
886
+ },
887
+ {
888
+ "inputs": [],
889
+ "name": "treasury",
890
+ "outputs": [
891
+ {
892
+ "internalType": "address",
893
+ "name": "",
894
+ "type": "address"
895
+ }
896
+ ],
897
+ "stateMutability": "pure",
898
+ "type": "function"
899
+ },
900
+ {
901
+ "inputs": [
902
+ {
903
+ "internalType": "contract IEToken",
904
+ "name": "",
905
+ "type": "address"
906
+ },
907
+ {
908
+ "internalType": "uint256",
909
+ "name": "",
910
+ "type": "uint256"
911
+ }
912
+ ],
913
+ "name": "withdraw",
914
+ "outputs": [
915
+ {
916
+ "internalType": "uint256",
917
+ "name": "",
918
+ "type": "uint256"
919
+ }
920
+ ],
921
+ "stateMutability": "pure",
922
+ "type": "function"
923
+ }
924
+ ],
925
+ "bytecode": "0x608060405234801561001057600080fd5b506040516111da3803806111da83398101604081905261002f91610078565b600080546001600160a01b039384166001600160a01b031991821617909155600180549290931691161790556100b2565b6001600160a01b038116811461007557600080fd5b50565b6000806040838503121561008b57600080fd5b825161009681610060565b60208401519092506100a781610060565b809150509250929050565b611119806100c16000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806371907f171161008c57806382afd23b1161006657806382afd23b146101cb578063e5a6b10f146101fd578063f3fef3a31461020e578063ffa600e31461022157600080fd5b806371907f1714610187578063792da09e146101985780637a702b3c146101b857600080fd5b806361d027b3116100c857806361d027b3146101335780636769a76f1461014e57806368d9523c146101615780636af6f1ef1461017457600080fd5b8063098d3228146100ef5780633ed7c1ae1461010b57806347e7ef241461011e575b600080fd5b6100f860001981565b6040519081526020015b60405180910390f35b6100f8610119366004610cf6565b610234565b61013161012c366004610d52565b610300565b005b60005b6040516001600160a01b039091168152602001610102565b6100f861015c366004610d7e565b61034d565b61013161016f366004610dd0565b6103d9565b610131610182366004610eb7565b61044a565b6001546001600160a01b0316610136565b6100f86101a6366004610edb565b60009081526003602052604090205490565b6101316101c6366004610ef4565b610466565b6101ed6101d9366004610edb565b600090815260036020526040902054151590565b6040519015158152602001610102565b6000546001600160a01b0316610136565b6100f861021c366004610d52565b610482565b61013161022f366004610f21565b6104cd565b6000816001600160601b031660608561016001516001600160a01b0316901b61025d9190610f76565b8452610268846104f5565b8451600090815260036020526040908190209190915561016086015190516001600160a01b038216907f38f420e3792044ba61536a1f83956eefc878b3fb09a7d4a28790f05b6a3eaf3b906102be908890610f8f565b60405180910390a28451865160405133907f4ff4ac703cb703b7ea535d47e65e64b4cabf11b3e2eb41f152dab17971953add90600090a4505091519392505050565b60405162461bcd60e51b815260206004820152601760248201527f4e6f7420496d706c656d656e746564206465706f73697400000000000000000060448201526064015b60405180910390fd5b6000816001600160601b031660608661016001516001600160a01b0316901b6103769190610f76565b8552610381856104f5565b855160009081526003602052604090819020919091555133907f38f420e3792044ba61536a1f83956eefc878b3fb09a7d4a28790f05b6a3eaf3b906103c7908890610f8f565b60405180910390a25050915192915050565b60006103fd88888888888864ffffffffff8916156103f75788610574565b42610574565b9050876001600160a01b03167f38f420e3792044ba61536a1f83956eefc878b3fb09a7d4a28790f05b6a3eaf3b826040516104389190610f8f565b60405180910390a25050505050505050565b61046361045c3683900383018361104d565b60006106e5565b50565b61047e6104783684900384018461104d565b826106e5565b5050565b60405162461bcd60e51b815260206004820152601860248201527f4e6f7420496d706c656d656e74656420776974686472617700000000000000006044820152600090606401610344565b61047e6104df3684900384018461104d565b826104eb5760006106e5565b83602001356106e5565b6000816040516020016105089190610f8f565b60408051601f19818403018152919052805160209091012090508061056f5760405162461bcd60e51b815260206004820152601860248201527f506f6c6963793a20686173682063616e6e6f74206265203000000000000000006044820152606401610344565b919050565b61057c610af4565b848611156105d75760405162461bcd60e51b815260206004820152602260248201527f5072656d69756d2063616e6e6f74206265206d6f7265207468616e207061796f6044820152611d5d60f21b6064820152608401610344565b6105df610af4565b6001600160a01b038916610160820152604081018790526020810186905260a0810185905264ffffffffff80841661018083015284166101a0820152600061062a89888888886108be565b805160c0840152602081015160608085019190915260408201516080808601919091529082015161012085015281015161014084015260a081015160e0808501919091528101519091508810156106c35760405162461bcd60e51b815260206004820152601960248201527f5072656d69756d206c657373207468616e206d696e696d756d000000000000006044820152606401610344565b60e08101516106d2908961106a565b6101008301525098975050505050505050565b81516000036107295760405162461bcd60e51b815260206004820152601060248201526f141bdb1a58de481b9bdd08199bdd5b9960821b6044820152606401610344565b8151600090815260036020526040902054610743836104f5565b146107855760405162461bcd60e51b8152602060048201526012602482015271090c2e6d040c8decae6dc4ee840dac2e8c6d60731b6044820152606401610344565b8161016001516001600160a01b0316336001600160a01b0316146108075760405162461bcd60e51b815260206004820152603360248201527f4f6e6c79207269736b4d6f64756c6520697320617574686f72697a656420746f604482015272207265736f6c76652074686520706f6c69637960681b6064820152608401610344565b81516000908152600260208181526040808420848155600181018590559283018490556003808401859055600484018590556005840185905560068401859055600784018590556008840185905560098401859055600a8401859055600b90930180546001600160f01b0319169055855184529181528183209290925583519051838152909133917f54f4a270ea08f88dc23b2520d6b063fecb24d956c4496f447926d736338f545e910160405180910390a35050565b61090660405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b855161091e90610917908690610abc565b8690610abc565b81526020860151610930908690610abc565b602082018190528151101561095a57805160208201805161095290839061106a565b905250610962565b600060208201525b6040860151610972908690610abc565b6040820152602081015181516109889190610f76565b816040015111156109bd57602081015181516109a49190610f76565b816040018181516109b5919061106a565b9052506109c5565b600060408201525b610a026301e133806109d7848661107d565b64ffffffffff168860a001516109ed91906110a2565b6109f791906110c1565b602083015190610abc565b6060820152610a446301e13380610a19848661107d565b64ffffffffff168860c00151610a2f91906110a2565b610a3991906110c1565b604083015190610abc565b608082018190526060820151600091610a5c91610f76565b9050610a75876080015182610abc90919063ffffffff16565b60608801518351610a8591610abc565b610a8f9190610f76565b60a0830181905282518291610aa391610f76565b610aad9190610f76565b60e08301525095945050505050565b600081156706f05b59d3b200001983900484111517610ada57600080fd5b50670de0b6b3a764000091026706f05b59d3b20000010490565b604051806101c00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b03168152602001600064ffffffffff168152602001600064ffffffffff1681525090565b6040516101c0810167ffffffffffffffff81118282101715610bac57634e487b7160e01b600052604160045260246000fd5b60405290565b60405160e0810167ffffffffffffffff81118282101715610bac57634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461046357600080fd5b803561056f81610be3565b803564ffffffffff8116811461056f57600080fd5b60006101c08284031215610c2b57600080fd5b610c33610b7a565b9050813581526020820135602082015260408201356040820152606082013560608201526080820135608082015260a082013560a082015260c082013560c082015260e082013560e0820152610100808301358183015250610120808301358183015250610140808301358183015250610160610cb1818401610bf8565b90820152610180610cc3838201610c03565b908201526101a0610cd5838201610c03565b9082015292915050565b80356001600160601b038116811461056f57600080fd5b6000806000806103c08587031215610d0d57600080fd5b610d178686610c18565b9350610d27866101c08701610c18565b9250610380850135610d3881610be3565b9150610d476103a08601610cdf565b905092959194509250565b60008060408385031215610d6557600080fd5b8235610d7081610be3565b946020939093013593505050565b6000806000806102208587031215610d9557600080fd5b610d9f8686610c18565b93506101c0850135610db081610be3565b92506101e0850135610dc181610be3565b9150610d476102008601610cdf565b60008060008060008060008789036101a0811215610ded57600080fd5b8835610df881610be3565b975060e0601f1982011215610e0c57600080fd5b50610e15610bb2565b6020890135815260408901356020820152606089013560408201526080890135606082015260a0890135608082015260c089013560a082015260e089013560c082015280965050610100880135945061012088013593506101408801359250610e816101608901610c03565b9150610e906101808901610c03565b905092959891949750929550565b60006101c08284031215610eb157600080fd5b50919050565b60006101c08284031215610eca57600080fd5b610ed48383610e9e565b9392505050565b600060208284031215610eed57600080fd5b5035919050565b6000806101e08385031215610f0857600080fd5b610f128484610e9e565b946101c0939093013593505050565b6000806101e08385031215610f3557600080fd5b610f3f8484610e9e565b91506101c08301358015158114610f5557600080fd5b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610f8957610f89610f60565b92915050565b60006101c082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015160c083015260e083015160e083015261010080840151818401525061012080840151818401525061014080840151818401525061016080840151611021828501826001600160a01b03169052565b50506101808381015164ffffffffff908116918401919091526101a09384015116929091019190915290565b60006101c0828403121561106057600080fd5b610ed48383610c18565b81810381811115610f8957610f89610f60565b64ffffffffff82811682821603908082111561109b5761109b610f60565b5092915050565b60008160001904831182151516156110bc576110bc610f60565b500290565b6000826110de57634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122009bea973a38b5e0f8b12927e499bbd98e24e9c95a5ffb3633bd74fadd81582f764736f6c63430008100033",
926
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806371907f171161008c57806382afd23b1161006657806382afd23b146101cb578063e5a6b10f146101fd578063f3fef3a31461020e578063ffa600e31461022157600080fd5b806371907f1714610187578063792da09e146101985780637a702b3c146101b857600080fd5b806361d027b3116100c857806361d027b3146101335780636769a76f1461014e57806368d9523c146101615780636af6f1ef1461017457600080fd5b8063098d3228146100ef5780633ed7c1ae1461010b57806347e7ef241461011e575b600080fd5b6100f860001981565b6040519081526020015b60405180910390f35b6100f8610119366004610cf6565b610234565b61013161012c366004610d52565b610300565b005b60005b6040516001600160a01b039091168152602001610102565b6100f861015c366004610d7e565b61034d565b61013161016f366004610dd0565b6103d9565b610131610182366004610eb7565b61044a565b6001546001600160a01b0316610136565b6100f86101a6366004610edb565b60009081526003602052604090205490565b6101316101c6366004610ef4565b610466565b6101ed6101d9366004610edb565b600090815260036020526040902054151590565b6040519015158152602001610102565b6000546001600160a01b0316610136565b6100f861021c366004610d52565b610482565b61013161022f366004610f21565b6104cd565b6000816001600160601b031660608561016001516001600160a01b0316901b61025d9190610f76565b8452610268846104f5565b8451600090815260036020526040908190209190915561016086015190516001600160a01b038216907f38f420e3792044ba61536a1f83956eefc878b3fb09a7d4a28790f05b6a3eaf3b906102be908890610f8f565b60405180910390a28451865160405133907f4ff4ac703cb703b7ea535d47e65e64b4cabf11b3e2eb41f152dab17971953add90600090a4505091519392505050565b60405162461bcd60e51b815260206004820152601760248201527f4e6f7420496d706c656d656e746564206465706f73697400000000000000000060448201526064015b60405180910390fd5b6000816001600160601b031660608661016001516001600160a01b0316901b6103769190610f76565b8552610381856104f5565b855160009081526003602052604090819020919091555133907f38f420e3792044ba61536a1f83956eefc878b3fb09a7d4a28790f05b6a3eaf3b906103c7908890610f8f565b60405180910390a25050915192915050565b60006103fd88888888888864ffffffffff8916156103f75788610574565b42610574565b9050876001600160a01b03167f38f420e3792044ba61536a1f83956eefc878b3fb09a7d4a28790f05b6a3eaf3b826040516104389190610f8f565b60405180910390a25050505050505050565b61046361045c3683900383018361104d565b60006106e5565b50565b61047e6104783684900384018461104d565b826106e5565b5050565b60405162461bcd60e51b815260206004820152601860248201527f4e6f7420496d706c656d656e74656420776974686472617700000000000000006044820152600090606401610344565b61047e6104df3684900384018461104d565b826104eb5760006106e5565b83602001356106e5565b6000816040516020016105089190610f8f565b60408051601f19818403018152919052805160209091012090508061056f5760405162461bcd60e51b815260206004820152601860248201527f506f6c6963793a20686173682063616e6e6f74206265203000000000000000006044820152606401610344565b919050565b61057c610af4565b848611156105d75760405162461bcd60e51b815260206004820152602260248201527f5072656d69756d2063616e6e6f74206265206d6f7265207468616e207061796f6044820152611d5d60f21b6064820152608401610344565b6105df610af4565b6001600160a01b038916610160820152604081018790526020810186905260a0810185905264ffffffffff80841661018083015284166101a0820152600061062a89888888886108be565b805160c0840152602081015160608085019190915260408201516080808601919091529082015161012085015281015161014084015260a081015160e0808501919091528101519091508810156106c35760405162461bcd60e51b815260206004820152601960248201527f5072656d69756d206c657373207468616e206d696e696d756d000000000000006044820152606401610344565b60e08101516106d2908961106a565b6101008301525098975050505050505050565b81516000036107295760405162461bcd60e51b815260206004820152601060248201526f141bdb1a58de481b9bdd08199bdd5b9960821b6044820152606401610344565b8151600090815260036020526040902054610743836104f5565b146107855760405162461bcd60e51b8152602060048201526012602482015271090c2e6d040c8decae6dc4ee840dac2e8c6d60731b6044820152606401610344565b8161016001516001600160a01b0316336001600160a01b0316146108075760405162461bcd60e51b815260206004820152603360248201527f4f6e6c79207269736b4d6f64756c6520697320617574686f72697a656420746f604482015272207265736f6c76652074686520706f6c69637960681b6064820152608401610344565b81516000908152600260208181526040808420848155600181018590559283018490556003808401859055600484018590556005840185905560068401859055600784018590556008840185905560098401859055600a8401859055600b90930180546001600160f01b0319169055855184529181528183209290925583519051838152909133917f54f4a270ea08f88dc23b2520d6b063fecb24d956c4496f447926d736338f545e910160405180910390a35050565b61090660405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b855161091e90610917908690610abc565b8690610abc565b81526020860151610930908690610abc565b602082018190528151101561095a57805160208201805161095290839061106a565b905250610962565b600060208201525b6040860151610972908690610abc565b6040820152602081015181516109889190610f76565b816040015111156109bd57602081015181516109a49190610f76565b816040018181516109b5919061106a565b9052506109c5565b600060408201525b610a026301e133806109d7848661107d565b64ffffffffff168860a001516109ed91906110a2565b6109f791906110c1565b602083015190610abc565b6060820152610a446301e13380610a19848661107d565b64ffffffffff168860c00151610a2f91906110a2565b610a3991906110c1565b604083015190610abc565b608082018190526060820151600091610a5c91610f76565b9050610a75876080015182610abc90919063ffffffff16565b60608801518351610a8591610abc565b610a8f9190610f76565b60a0830181905282518291610aa391610f76565b610aad9190610f76565b60e08301525095945050505050565b600081156706f05b59d3b200001983900484111517610ada57600080fd5b50670de0b6b3a764000091026706f05b59d3b20000010490565b604051806101c00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b03168152602001600064ffffffffff168152602001600064ffffffffff1681525090565b6040516101c0810167ffffffffffffffff81118282101715610bac57634e487b7160e01b600052604160045260246000fd5b60405290565b60405160e0810167ffffffffffffffff81118282101715610bac57634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461046357600080fd5b803561056f81610be3565b803564ffffffffff8116811461056f57600080fd5b60006101c08284031215610c2b57600080fd5b610c33610b7a565b9050813581526020820135602082015260408201356040820152606082013560608201526080820135608082015260a082013560a082015260c082013560c082015260e082013560e0820152610100808301358183015250610120808301358183015250610140808301358183015250610160610cb1818401610bf8565b90820152610180610cc3838201610c03565b908201526101a0610cd5838201610c03565b9082015292915050565b80356001600160601b038116811461056f57600080fd5b6000806000806103c08587031215610d0d57600080fd5b610d178686610c18565b9350610d27866101c08701610c18565b9250610380850135610d3881610be3565b9150610d476103a08601610cdf565b905092959194509250565b60008060408385031215610d6557600080fd5b8235610d7081610be3565b946020939093013593505050565b6000806000806102208587031215610d9557600080fd5b610d9f8686610c18565b93506101c0850135610db081610be3565b92506101e0850135610dc181610be3565b9150610d476102008601610cdf565b60008060008060008060008789036101a0811215610ded57600080fd5b8835610df881610be3565b975060e0601f1982011215610e0c57600080fd5b50610e15610bb2565b6020890135815260408901356020820152606089013560408201526080890135606082015260a0890135608082015260c089013560a082015260e089013560c082015280965050610100880135945061012088013593506101408801359250610e816101608901610c03565b9150610e906101808901610c03565b905092959891949750929550565b60006101c08284031215610eb157600080fd5b50919050565b60006101c08284031215610eca57600080fd5b610ed48383610e9e565b9392505050565b600060208284031215610eed57600080fd5b5035919050565b6000806101e08385031215610f0857600080fd5b610f128484610e9e565b946101c0939093013593505050565b6000806101e08385031215610f3557600080fd5b610f3f8484610e9e565b91506101c08301358015158114610f5557600080fd5b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610f8957610f89610f60565b92915050565b60006101c082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015160c083015260e083015160e083015261010080840151818401525061012080840151818401525061014080840151818401525061016080840151611021828501826001600160a01b03169052565b50506101808381015164ffffffffff908116918401919091526101a09384015116929091019190915290565b60006101c0828403121561106057600080fd5b610ed48383610c18565b81810381811115610f8957610f89610f60565b64ffffffffff82811682821603908082111561109b5761109b610f60565b5092915050565b60008160001904831182151516156110bc576110bc610f60565b500290565b6000826110de57634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122009bea973a38b5e0f8b12927e499bbd98e24e9c95a5ffb3633bd74fadd81582f764736f6c63430008100033",
927
+ "linkReferences": {},
928
+ "deployedLinkReferences": {}
929
+ }