@nexusmutual/sdk 0.13.1 → 0.14.0

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.
@@ -411,7 +411,7 @@
411
411
  {
412
412
  "components": [
413
413
  {
414
- "internalType": "uint8",
414
+ "internalType": "enum ClaimMethod",
415
415
  "name": "claimMethod",
416
416
  "type": "uint8"
417
417
  },
@@ -492,6 +492,37 @@
492
492
  "stateMutability": "view",
493
493
  "type": "function"
494
494
  },
495
+ {
496
+ "inputs": [
497
+ {
498
+ "internalType": "uint256",
499
+ "name": "productId",
500
+ "type": "uint256"
501
+ }
502
+ ],
503
+ "name": "getProductTypeOf",
504
+ "outputs": [
505
+ {
506
+ "components": [
507
+ {
508
+ "internalType": "enum ClaimMethod",
509
+ "name": "claimMethod",
510
+ "type": "uint8"
511
+ },
512
+ {
513
+ "internalType": "uint32",
514
+ "name": "gracePeriod",
515
+ "type": "uint32"
516
+ }
517
+ ],
518
+ "internalType": "struct ProductType",
519
+ "name": "",
520
+ "type": "tuple"
521
+ }
522
+ ],
523
+ "stateMutability": "view",
524
+ "type": "function"
525
+ },
495
526
  {
496
527
  "inputs": [],
497
528
  "name": "getProductTypes",
@@ -499,7 +530,7 @@
499
530
  {
500
531
  "components": [
501
532
  {
502
- "internalType": "uint8",
533
+ "internalType": "enum ClaimMethod",
503
534
  "name": "claimMethod",
504
535
  "type": "uint8"
505
536
  },
@@ -577,7 +608,7 @@
577
608
  {
578
609
  "components": [
579
610
  {
580
- "internalType": "uint8",
611
+ "internalType": "enum ClaimMethod",
581
612
  "name": "claimMethod",
582
613
  "type": "uint8"
583
614
  },
@@ -835,7 +866,7 @@
835
866
  {
836
867
  "components": [
837
868
  {
838
- "internalType": "uint8",
869
+ "internalType": "enum ClaimMethod",
839
870
  "name": "claimMethod",
840
871
  "type": "uint8"
841
872
  },
@@ -13,122 +13,59 @@
13
13
  {
14
14
  "inputs": [
15
15
  {
16
- "internalType": "uint256",
17
- "name": "coverId",
18
- "type": "uint256"
16
+ "internalType": "uint256[]",
17
+ "name": "coverIds",
18
+ "type": "uint256[]"
19
19
  }
20
20
  ],
21
- "name": "getCoverSegments",
21
+ "name": "getCovers",
22
22
  "outputs": [
23
23
  {
24
24
  "components": [
25
25
  {
26
26
  "internalType": "uint256",
27
- "name": "segmentId",
27
+ "name": "coverId",
28
28
  "type": "uint256"
29
29
  },
30
30
  {
31
31
  "internalType": "uint256",
32
- "name": "amount",
32
+ "name": "productId",
33
33
  "type": "uint256"
34
34
  },
35
35
  {
36
36
  "internalType": "uint256",
37
- "name": "remainingAmount",
37
+ "name": "coverAsset",
38
38
  "type": "uint256"
39
39
  },
40
40
  {
41
41
  "internalType": "uint256",
42
- "name": "start",
42
+ "name": "amount",
43
43
  "type": "uint256"
44
44
  },
45
45
  {
46
46
  "internalType": "uint256",
47
- "name": "period",
47
+ "name": "start",
48
48
  "type": "uint256"
49
49
  },
50
50
  {
51
51
  "internalType": "uint256",
52
- "name": "gracePeriod",
53
- "type": "uint256"
54
- }
55
- ],
56
- "internalType": "struct CoverViewer.Segment[]",
57
- "name": "",
58
- "type": "tuple[]"
59
- }
60
- ],
61
- "stateMutability": "view",
62
- "type": "function"
63
- },
64
- {
65
- "inputs": [
66
- {
67
- "internalType": "uint256[]",
68
- "name": "coverIds",
69
- "type": "uint256[]"
70
- }
71
- ],
72
- "name": "getCovers",
73
- "outputs": [
74
- {
75
- "components": [
76
- {
77
- "internalType": "uint256",
78
- "name": "coverId",
52
+ "name": "period",
79
53
  "type": "uint256"
80
54
  },
81
55
  {
82
56
  "internalType": "uint256",
83
- "name": "productId",
57
+ "name": "gracePeriod",
84
58
  "type": "uint256"
85
59
  },
86
60
  {
87
61
  "internalType": "uint256",
88
- "name": "coverAsset",
62
+ "name": "originalCoverId",
89
63
  "type": "uint256"
90
64
  },
91
65
  {
92
66
  "internalType": "uint256",
93
- "name": "amountPaidOut",
67
+ "name": "latestCoverId",
94
68
  "type": "uint256"
95
- },
96
- {
97
- "components": [
98
- {
99
- "internalType": "uint256",
100
- "name": "segmentId",
101
- "type": "uint256"
102
- },
103
- {
104
- "internalType": "uint256",
105
- "name": "amount",
106
- "type": "uint256"
107
- },
108
- {
109
- "internalType": "uint256",
110
- "name": "remainingAmount",
111
- "type": "uint256"
112
- },
113
- {
114
- "internalType": "uint256",
115
- "name": "start",
116
- "type": "uint256"
117
- },
118
- {
119
- "internalType": "uint256",
120
- "name": "period",
121
- "type": "uint256"
122
- },
123
- {
124
- "internalType": "uint256",
125
- "name": "gracePeriod",
126
- "type": "uint256"
127
- }
128
- ],
129
- "internalType": "struct CoverViewer.Segment[]",
130
- "name": "segments",
131
- "type": "tuple[]"
132
69
  }
133
70
  ],
134
71
  "internalType": "struct CoverViewer.Cover[]",
@@ -1,11 +1,6 @@
1
1
  [
2
2
  {
3
3
  "inputs": [
4
- {
5
- "internalType": "address",
6
- "name": "nxmAddress",
7
- "type": "address"
8
- },
9
4
  {
10
5
  "internalType": "address",
11
6
  "name": "coverNFTAddress",
@@ -15,6 +10,81 @@
15
10
  "stateMutability": "nonpayable",
16
11
  "type": "constructor"
17
12
  },
13
+ {
14
+ "inputs": [],
15
+ "name": "AssessmentDepositInsufficient",
16
+ "type": "error"
17
+ },
18
+ {
19
+ "inputs": [],
20
+ "name": "AssessmentDepositTransferToPoolFailed",
21
+ "type": "error"
22
+ },
23
+ {
24
+ "inputs": [],
25
+ "name": "AssessmentDepositTrasnferRefundFailed",
26
+ "type": "error"
27
+ },
28
+ {
29
+ "inputs": [],
30
+ "name": "CantBuyCoverAndClaimInTheSameBlock",
31
+ "type": "error"
32
+ },
33
+ {
34
+ "inputs": [],
35
+ "name": "ClaimAssessmentNotFinished",
36
+ "type": "error"
37
+ },
38
+ {
39
+ "inputs": [],
40
+ "name": "ClaimIsBeingAssessed",
41
+ "type": "error"
42
+ },
43
+ {
44
+ "inputs": [],
45
+ "name": "ClaimNotAccepted",
46
+ "type": "error"
47
+ },
48
+ {
49
+ "inputs": [],
50
+ "name": "CooldownPeriodNotPassed",
51
+ "type": "error"
52
+ },
53
+ {
54
+ "inputs": [],
55
+ "name": "CoveredAmountExceeded",
56
+ "type": "error"
57
+ },
58
+ {
59
+ "inputs": [],
60
+ "name": "GracePeriodPassed",
61
+ "type": "error"
62
+ },
63
+ {
64
+ "inputs": [],
65
+ "name": "InvalidClaimMethod",
66
+ "type": "error"
67
+ },
68
+ {
69
+ "inputs": [],
70
+ "name": "OnlyOwnerOrApprovedCanSubmitClaim",
71
+ "type": "error"
72
+ },
73
+ {
74
+ "inputs": [],
75
+ "name": "PayoutAlreadyRedeemed",
76
+ "type": "error"
77
+ },
78
+ {
79
+ "inputs": [],
80
+ "name": "PayoutCanStillBeRedeemed",
81
+ "type": "error"
82
+ },
83
+ {
84
+ "inputs": [],
85
+ "name": "RedemptionPeriodExpired",
86
+ "type": "error"
87
+ },
18
88
  {
19
89
  "anonymous": false,
20
90
  "inputs": [
@@ -96,6 +166,97 @@
96
166
  "name": "MetadataSubmitted",
97
167
  "type": "event"
98
168
  },
169
+ {
170
+ "inputs": [],
171
+ "name": "MAX_REWARD_IN_NXM",
172
+ "outputs": [
173
+ {
174
+ "internalType": "uint256",
175
+ "name": "",
176
+ "type": "uint256"
177
+ }
178
+ ],
179
+ "stateMutability": "view",
180
+ "type": "function"
181
+ },
182
+ {
183
+ "inputs": [],
184
+ "name": "MIN_ASSESSMENT_DEPOSIT_DENOMINATOR",
185
+ "outputs": [
186
+ {
187
+ "internalType": "uint256",
188
+ "name": "",
189
+ "type": "uint256"
190
+ }
191
+ ],
192
+ "stateMutability": "view",
193
+ "type": "function"
194
+ },
195
+ {
196
+ "inputs": [],
197
+ "name": "MIN_ASSESSMENT_DEPOSIT_RATIO",
198
+ "outputs": [
199
+ {
200
+ "internalType": "uint256",
201
+ "name": "",
202
+ "type": "uint256"
203
+ }
204
+ ],
205
+ "stateMutability": "view",
206
+ "type": "function"
207
+ },
208
+ {
209
+ "inputs": [],
210
+ "name": "ONE_NXM",
211
+ "outputs": [
212
+ {
213
+ "internalType": "uint256",
214
+ "name": "",
215
+ "type": "uint256"
216
+ }
217
+ ],
218
+ "stateMutability": "view",
219
+ "type": "function"
220
+ },
221
+ {
222
+ "inputs": [],
223
+ "name": "PAYOUT_REDEMPTION_PERIOD",
224
+ "outputs": [
225
+ {
226
+ "internalType": "uint256",
227
+ "name": "",
228
+ "type": "uint256"
229
+ }
230
+ ],
231
+ "stateMutability": "view",
232
+ "type": "function"
233
+ },
234
+ {
235
+ "inputs": [],
236
+ "name": "REWARD_DENOMINATOR",
237
+ "outputs": [
238
+ {
239
+ "internalType": "uint256",
240
+ "name": "",
241
+ "type": "uint256"
242
+ }
243
+ ],
244
+ "stateMutability": "view",
245
+ "type": "function"
246
+ },
247
+ {
248
+ "inputs": [],
249
+ "name": "REWARD_RATIO",
250
+ "outputs": [
251
+ {
252
+ "internalType": "uint256",
253
+ "name": "",
254
+ "type": "uint256"
255
+ }
256
+ ],
257
+ "stateMutability": "view",
258
+ "type": "function"
259
+ },
99
260
  {
100
261
  "inputs": [],
101
262
  "name": "changeDependentContractAddress",
@@ -160,34 +321,6 @@
160
321
  "stateMutability": "view",
161
322
  "type": "function"
162
323
  },
163
- {
164
- "inputs": [],
165
- "name": "config",
166
- "outputs": [
167
- {
168
- "internalType": "uint8",
169
- "name": "payoutRedemptionPeriodInDays",
170
- "type": "uint8"
171
- },
172
- {
173
- "internalType": "uint16",
174
- "name": "minAssessmentDepositRatio",
175
- "type": "uint16"
176
- },
177
- {
178
- "internalType": "uint16",
179
- "name": "maxRewardInNXMWad",
180
- "type": "uint16"
181
- },
182
- {
183
- "internalType": "uint16",
184
- "name": "rewardRatio",
185
- "type": "uint16"
186
- }
187
- ],
188
- "stateMutability": "view",
189
- "type": "function"
190
- },
191
324
  {
192
325
  "inputs": [],
193
326
  "name": "coverNFT",
@@ -210,7 +343,7 @@
210
343
  },
211
344
  {
212
345
  "internalType": "uint256",
213
- "name": "segmentPeriod",
346
+ "name": "coverPeriod",
214
347
  "type": "uint256"
215
348
  },
216
349
  {
@@ -334,6 +467,58 @@
334
467
  "stateMutability": "view",
335
468
  "type": "function"
336
469
  },
470
+ {
471
+ "inputs": [],
472
+ "name": "getMaxRewardInNxm",
473
+ "outputs": [
474
+ {
475
+ "internalType": "uint256",
476
+ "name": "",
477
+ "type": "uint256"
478
+ }
479
+ ],
480
+ "stateMutability": "pure",
481
+ "type": "function"
482
+ },
483
+ {
484
+ "inputs": [],
485
+ "name": "getMinAssessmentDepositRatio",
486
+ "outputs": [
487
+ {
488
+ "internalType": "uint256",
489
+ "name": "",
490
+ "type": "uint256"
491
+ }
492
+ ],
493
+ "stateMutability": "pure",
494
+ "type": "function"
495
+ },
496
+ {
497
+ "inputs": [],
498
+ "name": "getPayoutRedemptionPeriod",
499
+ "outputs": [
500
+ {
501
+ "internalType": "uint256",
502
+ "name": "",
503
+ "type": "uint256"
504
+ }
505
+ ],
506
+ "stateMutability": "pure",
507
+ "type": "function"
508
+ },
509
+ {
510
+ "inputs": [],
511
+ "name": "getRewardRatio",
512
+ "outputs": [
513
+ {
514
+ "internalType": "uint256",
515
+ "name": "",
516
+ "type": "uint256"
517
+ }
518
+ ],
519
+ "stateMutability": "pure",
520
+ "type": "function"
521
+ },
337
522
  {
338
523
  "inputs": [
339
524
  {
@@ -390,19 +575,6 @@
390
575
  "stateMutability": "view",
391
576
  "type": "function"
392
577
  },
393
- {
394
- "inputs": [],
395
- "name": "nxm",
396
- "outputs": [
397
- {
398
- "internalType": "contract INXMToken",
399
- "name": "",
400
- "type": "address"
401
- }
402
- ],
403
- "stateMutability": "view",
404
- "type": "function"
405
- },
406
578
  {
407
579
  "inputs": [
408
580
  {
@@ -423,11 +595,6 @@
423
595
  "name": "coverId",
424
596
  "type": "uint32"
425
597
  },
426
- {
427
- "internalType": "uint16",
428
- "name": "segmentId",
429
- "type": "uint16"
430
- },
431
598
  {
432
599
  "internalType": "uint96",
433
600
  "name": "requestedAmount",
@@ -481,94 +648,5 @@
481
648
  ],
482
649
  "stateMutability": "payable",
483
650
  "type": "function"
484
- },
485
- {
486
- "inputs": [
487
- {
488
- "internalType": "uint32",
489
- "name": "coverId",
490
- "type": "uint32"
491
- },
492
- {
493
- "internalType": "uint16",
494
- "name": "segmentId",
495
- "type": "uint16"
496
- },
497
- {
498
- "internalType": "uint96",
499
- "name": "requestedAmount",
500
- "type": "uint96"
501
- },
502
- {
503
- "internalType": "string",
504
- "name": "ipfsMetadata",
505
- "type": "string"
506
- },
507
- {
508
- "internalType": "address",
509
- "name": "owner",
510
- "type": "address"
511
- }
512
- ],
513
- "name": "submitClaimFor",
514
- "outputs": [
515
- {
516
- "components": [
517
- {
518
- "internalType": "uint80",
519
- "name": "assessmentId",
520
- "type": "uint80"
521
- },
522
- {
523
- "internalType": "uint32",
524
- "name": "coverId",
525
- "type": "uint32"
526
- },
527
- {
528
- "internalType": "uint16",
529
- "name": "segmentId",
530
- "type": "uint16"
531
- },
532
- {
533
- "internalType": "uint96",
534
- "name": "amount",
535
- "type": "uint96"
536
- },
537
- {
538
- "internalType": "uint8",
539
- "name": "coverAsset",
540
- "type": "uint8"
541
- },
542
- {
543
- "internalType": "bool",
544
- "name": "payoutRedeemed",
545
- "type": "bool"
546
- }
547
- ],
548
- "internalType": "struct IIndividualClaims.Claim",
549
- "name": "claim",
550
- "type": "tuple"
551
- }
552
- ],
553
- "stateMutability": "payable",
554
- "type": "function"
555
- },
556
- {
557
- "inputs": [
558
- {
559
- "internalType": "enum IIndividualClaims.UintParams[]",
560
- "name": "paramNames",
561
- "type": "uint8[]"
562
- },
563
- {
564
- "internalType": "uint256[]",
565
- "name": "values",
566
- "type": "uint256[]"
567
- }
568
- ],
569
- "name": "updateUintParameters",
570
- "outputs": [],
571
- "stateMutability": "nonpayable",
572
- "type": "function"
573
651
  }
574
652
  ]