@nexusmutual/sdk 1.12.0-rc.4 → 1.12.0-rc.6

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.
@@ -2,23 +2,18 @@
2
2
  {
3
3
  "inputs": [
4
4
  {
5
- "internalType": "contract ICoverNFT",
6
- "name": "_coverNFT",
7
- "type": "address"
8
- },
9
- {
10
- "internalType": "contract IStakingNFT",
11
- "name": "_stakingNFT",
5
+ "internalType": "address",
6
+ "name": "_registry",
12
7
  "type": "address"
13
8
  },
14
9
  {
15
10
  "internalType": "address",
16
- "name": "_stakingPoolFactory",
11
+ "name": "_stakingPoolImplementation",
17
12
  "type": "address"
18
13
  },
19
14
  {
20
15
  "internalType": "address",
21
- "name": "_stakingPoolImplementation",
16
+ "name": "_verifyingAddress",
22
17
  "type": "address"
23
18
  }
24
19
  ],
@@ -69,17 +64,28 @@
69
64
  },
70
65
  {
71
66
  "inputs": [],
72
- "name": "CoverOutsideOfTheGracePeriod",
67
+ "name": "CoverPeriodTooLong",
73
68
  "type": "error"
74
69
  },
75
70
  {
76
71
  "inputs": [],
77
- "name": "CoverPeriodTooLong",
72
+ "name": "CoverPeriodTooShort",
78
73
  "type": "error"
79
74
  },
80
75
  {
81
- "inputs": [],
82
- "name": "CoverPeriodTooShort",
76
+ "inputs": [
77
+ {
78
+ "internalType": "address",
79
+ "name": "to",
80
+ "type": "address"
81
+ },
82
+ {
83
+ "internalType": "uint256",
84
+ "name": "amount",
85
+ "type": "uint256"
86
+ }
87
+ ],
88
+ "name": "ETHTransferFailed",
83
89
  "type": "error"
84
90
  },
85
91
  {
@@ -107,6 +113,21 @@
107
113
  "name": "InvalidPaymentAsset",
108
114
  "type": "error"
109
115
  },
116
+ {
117
+ "inputs": [],
118
+ "name": "InvalidRiConfig",
119
+ "type": "error"
120
+ },
121
+ {
122
+ "inputs": [],
123
+ "name": "InvalidSignature",
124
+ "type": "error"
125
+ },
126
+ {
127
+ "inputs": [],
128
+ "name": "IpfsMetadataAlreadySet",
129
+ "type": "error"
130
+ },
110
131
  {
111
132
  "inputs": [
112
133
  {
@@ -118,11 +139,37 @@
118
139
  "name": "MustBeOriginalCoverId",
119
140
  "type": "error"
120
141
  },
142
+ {
143
+ "inputs": [],
144
+ "name": "OnlyAdvisoryBoard",
145
+ "type": "error"
146
+ },
147
+ {
148
+ "inputs": [],
149
+ "name": "OnlyMember",
150
+ "type": "error"
151
+ },
121
152
  {
122
153
  "inputs": [],
123
154
  "name": "OnlyOwnerOrApproved",
124
155
  "type": "error"
125
156
  },
157
+ {
158
+ "inputs": [
159
+ {
160
+ "internalType": "uint256",
161
+ "name": "currentState",
162
+ "type": "uint256"
163
+ },
164
+ {
165
+ "internalType": "uint256",
166
+ "name": "checks",
167
+ "type": "uint256"
168
+ }
169
+ ],
170
+ "name": "Paused",
171
+ "type": "error"
172
+ },
126
173
  {
127
174
  "inputs": [],
128
175
  "name": "PriceExceedsMaxPremiumInAsset",
@@ -140,7 +187,7 @@
140
187
  },
141
188
  {
142
189
  "inputs": [],
143
- "name": "ReturningEthRemainderToSenderFailed",
190
+ "name": "ReentrantCall",
144
191
  "type": "error"
145
192
  },
146
193
  {
@@ -156,17 +203,28 @@
156
203
  },
157
204
  {
158
205
  "inputs": [],
159
- "name": "SendingEthToCommissionDestinationFailed",
160
- "type": "error"
161
- },
162
- {
163
- "inputs": [],
164
- "name": "SendingEthToPoolFailed",
206
+ "name": "RiAmountIsZero",
165
207
  "type": "error"
166
208
  },
167
209
  {
168
- "inputs": [],
169
- "name": "UnexpectedCoverAsset",
210
+ "inputs": [
211
+ {
212
+ "internalType": "address",
213
+ "name": "caller",
214
+ "type": "address"
215
+ },
216
+ {
217
+ "internalType": "uint256",
218
+ "name": "callerIndex",
219
+ "type": "uint256"
220
+ },
221
+ {
222
+ "internalType": "uint256",
223
+ "name": "authorizedBitmap",
224
+ "type": "uint256"
225
+ }
226
+ ],
227
+ "name": "Unauthorized",
170
228
  "type": "error"
171
229
  },
172
230
  {
@@ -176,12 +234,12 @@
176
234
  },
177
235
  {
178
236
  "inputs": [],
179
- "name": "UnexpectedPoolId",
237
+ "name": "UnexpectedRiPremium",
180
238
  "type": "error"
181
239
  },
182
240
  {
183
241
  "inputs": [],
184
- "name": "UnexpectedProductId",
242
+ "name": "WrongCoverEditEntrypoint",
185
243
  "type": "error"
186
244
  },
187
245
  {
@@ -200,72 +258,42 @@
200
258
  "type": "uint256"
201
259
  },
202
260
  {
203
- "indexed": false,
261
+ "indexed": true,
204
262
  "internalType": "uint256",
205
- "name": "productId",
263
+ "name": "buyerMemberId",
206
264
  "type": "uint256"
207
265
  },
208
- {
209
- "indexed": true,
210
- "internalType": "address",
211
- "name": "buyer",
212
- "type": "address"
213
- },
214
266
  {
215
267
  "indexed": false,
216
- "internalType": "string",
217
- "name": "ipfsMetadata",
218
- "type": "string"
268
+ "internalType": "uint256",
269
+ "name": "productId",
270
+ "type": "uint256"
219
271
  }
220
272
  ],
221
273
  "name": "CoverBought",
222
274
  "type": "event"
223
275
  },
224
276
  {
225
- "anonymous": false,
226
- "inputs": [
227
- {
228
- "indexed": true,
229
- "internalType": "uint256",
230
- "name": "coverId",
231
- "type": "uint256"
232
- },
233
- {
234
- "indexed": true,
235
- "internalType": "uint256",
236
- "name": "productId",
237
- "type": "uint256"
238
- },
277
+ "inputs": [],
278
+ "name": "DEFAULT_MIN_PRICE_RATIO",
279
+ "outputs": [
239
280
  {
240
- "indexed": true,
241
281
  "internalType": "uint256",
242
- "name": "unused",
282
+ "name": "",
243
283
  "type": "uint256"
244
- },
245
- {
246
- "indexed": false,
247
- "internalType": "address",
248
- "name": "buyer",
249
- "type": "address"
250
- },
251
- {
252
- "indexed": false,
253
- "internalType": "string",
254
- "name": "ipfsMetadata",
255
- "type": "string"
256
284
  }
257
285
  ],
258
- "name": "CoverEdited",
259
- "type": "event"
286
+ "stateMutability": "view",
287
+ "type": "function"
260
288
  },
261
289
  {
262
290
  "inputs": [],
263
- "name": "DEFAULT_MIN_PRICE_RATIO",
291
+ "name": "DOMAIN_SEPARATOR",
264
292
  "outputs": [
265
293
  {
266
- "internalType": "uint256",
294
+ "internalType": "bytes32",
267
295
  "name": "",
268
- "type": "uint256"
296
+ "type": "bytes32"
269
297
  }
270
298
  ],
271
299
  "stateMutability": "view",
@@ -335,14 +363,101 @@
335
363
  }
336
364
  ],
337
365
  "name": "burnStake",
366
+ "outputs": [],
367
+ "stateMutability": "nonpayable",
368
+ "type": "function"
369
+ },
370
+ {
371
+ "inputs": [
372
+ {
373
+ "components": [
374
+ {
375
+ "internalType": "uint256",
376
+ "name": "coverId",
377
+ "type": "uint256"
378
+ },
379
+ {
380
+ "internalType": "address",
381
+ "name": "owner",
382
+ "type": "address"
383
+ },
384
+ {
385
+ "internalType": "uint24",
386
+ "name": "productId",
387
+ "type": "uint24"
388
+ },
389
+ {
390
+ "internalType": "uint8",
391
+ "name": "coverAsset",
392
+ "type": "uint8"
393
+ },
394
+ {
395
+ "internalType": "uint96",
396
+ "name": "amount",
397
+ "type": "uint96"
398
+ },
399
+ {
400
+ "internalType": "uint32",
401
+ "name": "period",
402
+ "type": "uint32"
403
+ },
404
+ {
405
+ "internalType": "uint256",
406
+ "name": "maxPremiumInAsset",
407
+ "type": "uint256"
408
+ },
409
+ {
410
+ "internalType": "uint8",
411
+ "name": "paymentAsset",
412
+ "type": "uint8"
413
+ },
414
+ {
415
+ "internalType": "uint16",
416
+ "name": "commissionRatio",
417
+ "type": "uint16"
418
+ },
419
+ {
420
+ "internalType": "address",
421
+ "name": "commissionDestination",
422
+ "type": "address"
423
+ },
424
+ {
425
+ "internalType": "string",
426
+ "name": "ipfsData",
427
+ "type": "string"
428
+ }
429
+ ],
430
+ "internalType": "struct BuyCoverParams",
431
+ "name": "params",
432
+ "type": "tuple"
433
+ },
434
+ {
435
+ "components": [
436
+ {
437
+ "internalType": "uint256",
438
+ "name": "poolId",
439
+ "type": "uint256"
440
+ },
441
+ {
442
+ "internalType": "uint256",
443
+ "name": "coverAmountInAsset",
444
+ "type": "uint256"
445
+ }
446
+ ],
447
+ "internalType": "struct PoolAllocationRequest[]",
448
+ "name": "poolAllocationRequests",
449
+ "type": "tuple[]"
450
+ }
451
+ ],
452
+ "name": "buyCover",
338
453
  "outputs": [
339
454
  {
340
- "internalType": "address",
341
- "name": "",
342
- "type": "address"
455
+ "internalType": "uint256",
456
+ "name": "coverId",
457
+ "type": "uint256"
343
458
  }
344
459
  ],
345
- "stateMutability": "nonpayable",
460
+ "stateMutability": "payable",
346
461
  "type": "function"
347
462
  },
348
463
  {
@@ -425,9 +540,36 @@
425
540
  "internalType": "struct PoolAllocationRequest[]",
426
541
  "name": "poolAllocationRequests",
427
542
  "type": "tuple[]"
543
+ },
544
+ {
545
+ "components": [
546
+ {
547
+ "internalType": "uint256",
548
+ "name": "providerId",
549
+ "type": "uint256"
550
+ },
551
+ {
552
+ "internalType": "uint256",
553
+ "name": "amount",
554
+ "type": "uint256"
555
+ },
556
+ {
557
+ "internalType": "uint256",
558
+ "name": "premium",
559
+ "type": "uint256"
560
+ },
561
+ {
562
+ "internalType": "bytes",
563
+ "name": "signature",
564
+ "type": "bytes"
565
+ }
566
+ ],
567
+ "internalType": "struct RiRequest",
568
+ "name": "riRequest",
569
+ "type": "tuple"
428
570
  }
429
571
  ],
430
- "name": "buyCover",
572
+ "name": "buyCoverWithRi",
431
573
  "outputs": [
432
574
  {
433
575
  "internalType": "uint256",
@@ -451,37 +593,30 @@
451
593
  "stateMutability": "nonpayable",
452
594
  "type": "function"
453
595
  },
454
- {
455
- "inputs": [],
456
- "name": "changeDependentContractAddress",
457
- "outputs": [],
458
- "stateMutability": "nonpayable",
459
- "type": "function"
460
- },
461
596
  {
462
597
  "inputs": [
463
598
  {
464
599
  "internalType": "address",
465
- "name": "masterAddress",
600
+ "name": "_stakingNFTDescriptor",
466
601
  "type": "address"
467
602
  }
468
603
  ],
469
- "name": "changeMasterAddress",
604
+ "name": "changeStakingNFTDescriptor",
470
605
  "outputs": [],
471
606
  "stateMutability": "nonpayable",
472
607
  "type": "function"
473
608
  },
474
609
  {
475
- "inputs": [
610
+ "inputs": [],
611
+ "name": "claims",
612
+ "outputs": [
476
613
  {
477
614
  "internalType": "address",
478
- "name": "_stakingNFTDescriptor",
615
+ "name": "",
479
616
  "type": "address"
480
617
  }
481
618
  ],
482
- "name": "changeStakingNFTDescriptor",
483
- "outputs": [],
484
- "stateMutability": "nonpayable",
619
+ "stateMutability": "view",
485
620
  "type": "function"
486
621
  },
487
622
  {
@@ -497,6 +632,19 @@
497
632
  "stateMutability": "view",
498
633
  "type": "function"
499
634
  },
635
+ {
636
+ "inputs": [],
637
+ "name": "coverProducts",
638
+ "outputs": [
639
+ {
640
+ "internalType": "contract ICoverProducts",
641
+ "name": "",
642
+ "type": "address"
643
+ }
644
+ ],
645
+ "stateMutability": "view",
646
+ "type": "function"
647
+ },
500
648
  {
501
649
  "inputs": [
502
650
  {
@@ -760,6 +908,103 @@
760
908
  "stateMutability": "view",
761
909
  "type": "function"
762
910
  },
911
+ {
912
+ "inputs": [
913
+ {
914
+ "internalType": "uint256",
915
+ "name": "coverId",
916
+ "type": "uint256"
917
+ }
918
+ ],
919
+ "name": "getCoverDataWithRi",
920
+ "outputs": [
921
+ {
922
+ "components": [
923
+ {
924
+ "internalType": "uint24",
925
+ "name": "productId",
926
+ "type": "uint24"
927
+ },
928
+ {
929
+ "internalType": "uint8",
930
+ "name": "coverAsset",
931
+ "type": "uint8"
932
+ },
933
+ {
934
+ "internalType": "uint96",
935
+ "name": "amount",
936
+ "type": "uint96"
937
+ },
938
+ {
939
+ "internalType": "uint32",
940
+ "name": "start",
941
+ "type": "uint32"
942
+ },
943
+ {
944
+ "internalType": "uint32",
945
+ "name": "period",
946
+ "type": "uint32"
947
+ },
948
+ {
949
+ "internalType": "uint32",
950
+ "name": "gracePeriod",
951
+ "type": "uint32"
952
+ },
953
+ {
954
+ "internalType": "uint16",
955
+ "name": "rewardsRatio",
956
+ "type": "uint16"
957
+ },
958
+ {
959
+ "internalType": "uint16",
960
+ "name": "capacityRatio",
961
+ "type": "uint16"
962
+ }
963
+ ],
964
+ "internalType": "struct CoverData",
965
+ "name": "",
966
+ "type": "tuple"
967
+ },
968
+ {
969
+ "components": [
970
+ {
971
+ "internalType": "uint24",
972
+ "name": "providerId",
973
+ "type": "uint24"
974
+ },
975
+ {
976
+ "internalType": "uint96",
977
+ "name": "amount",
978
+ "type": "uint96"
979
+ }
980
+ ],
981
+ "internalType": "struct Ri",
982
+ "name": "",
983
+ "type": "tuple"
984
+ }
985
+ ],
986
+ "stateMutability": "view",
987
+ "type": "function"
988
+ },
989
+ {
990
+ "inputs": [
991
+ {
992
+ "internalType": "uint256",
993
+ "name": "coverId",
994
+ "type": "uint256"
995
+ }
996
+ ],
997
+ "name": "getCoverMetadata",
998
+ "outputs": [
999
+ {
1000
+ "internalType": "string",
1001
+ "name": "",
1002
+ "type": "string"
1003
+ }
1004
+ ],
1005
+ "stateMutability": "view",
1006
+ "type": "function"
1007
+ },
763
1008
  {
764
1009
  "inputs": [
765
1010
  {
@@ -791,6 +1036,37 @@
791
1036
  "stateMutability": "view",
792
1037
  "type": "function"
793
1038
  },
1039
+ {
1040
+ "inputs": [
1041
+ {
1042
+ "internalType": "uint256",
1043
+ "name": "coverId",
1044
+ "type": "uint256"
1045
+ }
1046
+ ],
1047
+ "name": "getCoverRi",
1048
+ "outputs": [
1049
+ {
1050
+ "components": [
1051
+ {
1052
+ "internalType": "uint24",
1053
+ "name": "providerId",
1054
+ "type": "uint24"
1055
+ },
1056
+ {
1057
+ "internalType": "uint96",
1058
+ "name": "amount",
1059
+ "type": "uint96"
1060
+ }
1061
+ ],
1062
+ "internalType": "struct Ri",
1063
+ "name": "",
1064
+ "type": "tuple"
1065
+ }
1066
+ ],
1067
+ "stateMutability": "view",
1068
+ "type": "function"
1069
+ },
794
1070
  {
795
1071
  "inputs": [],
796
1072
  "name": "getDefaultMinPriceRatio",
@@ -953,28 +1229,28 @@
953
1229
  {
954
1230
  "inputs": [
955
1231
  {
956
- "internalType": "uint256",
957
- "name": "",
958
- "type": "uint256"
1232
+ "internalType": "bytes[]",
1233
+ "name": "data",
1234
+ "type": "bytes[]"
959
1235
  }
960
1236
  ],
961
- "name": "internalContracts",
1237
+ "name": "multicall",
962
1238
  "outputs": [
963
1239
  {
964
- "internalType": "address payable",
965
- "name": "",
966
- "type": "address"
1240
+ "internalType": "bytes[]",
1241
+ "name": "results",
1242
+ "type": "bytes[]"
967
1243
  }
968
1244
  ],
969
- "stateMutability": "view",
1245
+ "stateMutability": "nonpayable",
970
1246
  "type": "function"
971
1247
  },
972
1248
  {
973
1249
  "inputs": [],
974
- "name": "master",
1250
+ "name": "pool",
975
1251
  "outputs": [
976
1252
  {
977
- "internalType": "contract INXMMaster",
1253
+ "internalType": "contract IPool",
978
1254
  "name": "",
979
1255
  "type": "address"
980
1256
  }
@@ -988,9 +1264,14 @@
988
1264
  "internalType": "uint256[]",
989
1265
  "name": "coverIds",
990
1266
  "type": "uint256[]"
1267
+ },
1268
+ {
1269
+ "internalType": "string[]",
1270
+ "name": "ipfsMetadata",
1271
+ "type": "string[]"
991
1272
  }
992
1273
  ],
993
- "name": "migrateCoverDataAndPoolAllocations",
1274
+ "name": "populateIpfsMetadata",
994
1275
  "outputs": [],
995
1276
  "stateMutability": "nonpayable",
996
1277
  "type": "function"
@@ -998,31 +1279,69 @@
998
1279
  {
999
1280
  "inputs": [
1000
1281
  {
1001
- "internalType": "bytes[]",
1002
- "name": "data",
1003
- "type": "bytes[]"
1282
+ "internalType": "uint256",
1283
+ "name": "coverAsset",
1284
+ "type": "uint256"
1004
1285
  }
1005
1286
  ],
1006
- "name": "multicall",
1287
+ "name": "recalculateActiveCoverInAsset",
1288
+ "outputs": [],
1289
+ "stateMutability": "nonpayable",
1290
+ "type": "function"
1291
+ },
1292
+ {
1293
+ "inputs": [],
1294
+ "name": "registry",
1007
1295
  "outputs": [
1008
1296
  {
1009
- "internalType": "bytes[]",
1010
- "name": "results",
1011
- "type": "bytes[]"
1297
+ "internalType": "contract IRegistry",
1298
+ "name": "",
1299
+ "type": "address"
1012
1300
  }
1013
1301
  ],
1014
- "stateMutability": "nonpayable",
1302
+ "stateMutability": "view",
1303
+ "type": "function"
1304
+ },
1305
+ {
1306
+ "inputs": [],
1307
+ "name": "riSigner",
1308
+ "outputs": [
1309
+ {
1310
+ "internalType": "address",
1311
+ "name": "",
1312
+ "type": "address"
1313
+ }
1314
+ ],
1315
+ "stateMutability": "view",
1015
1316
  "type": "function"
1016
1317
  },
1017
1318
  {
1018
1319
  "inputs": [
1019
1320
  {
1020
1321
  "internalType": "uint256",
1021
- "name": "coverAsset",
1322
+ "name": "providerId",
1022
1323
  "type": "uint256"
1324
+ },
1325
+ {
1326
+ "internalType": "address",
1327
+ "name": "premiumDestination",
1328
+ "type": "address"
1023
1329
  }
1024
1330
  ],
1025
- "name": "recalculateActiveCoverInAsset",
1331
+ "name": "setRiConfig",
1332
+ "outputs": [],
1333
+ "stateMutability": "nonpayable",
1334
+ "type": "function"
1335
+ },
1336
+ {
1337
+ "inputs": [
1338
+ {
1339
+ "internalType": "address",
1340
+ "name": "_riSigner",
1341
+ "type": "address"
1342
+ }
1343
+ ],
1344
+ "name": "setRiSigner",
1026
1345
  "outputs": [],
1027
1346
  "stateMutability": "nonpayable",
1028
1347
  "type": "function"
@@ -1085,6 +1404,19 @@
1085
1404
  "stateMutability": "view",
1086
1405
  "type": "function"
1087
1406
  },
1407
+ {
1408
+ "inputs": [],
1409
+ "name": "tokenController",
1410
+ "outputs": [
1411
+ {
1412
+ "internalType": "contract ITokenController",
1413
+ "name": "",
1414
+ "type": "address"
1415
+ }
1416
+ ],
1417
+ "stateMutability": "view",
1418
+ "type": "function"
1419
+ },
1088
1420
  {
1089
1421
  "inputs": [
1090
1422
  {