@nexusmutual/sdk 0.3.24 → 0.4.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.
@@ -0,0 +1,942 @@
1
+ [
2
+ {
3
+ "inputs": [],
4
+ "name": "CapacityReductionRatioAbove100Percent",
5
+ "type": "error"
6
+ },
7
+ {
8
+ "inputs": [],
9
+ "name": "InitialPriceRatioAbove100Percent",
10
+ "type": "error"
11
+ },
12
+ {
13
+ "inputs": [],
14
+ "name": "InitialPriceRatioBelowGlobalMinPriceRatio",
15
+ "type": "error"
16
+ },
17
+ {
18
+ "inputs": [],
19
+ "name": "MetadataRequired",
20
+ "type": "error"
21
+ },
22
+ {
23
+ "inputs": [],
24
+ "name": "MismatchedArrayLengths",
25
+ "type": "error"
26
+ },
27
+ {
28
+ "inputs": [
29
+ {
30
+ "internalType": "uint256",
31
+ "name": "productId",
32
+ "type": "uint256"
33
+ }
34
+ ],
35
+ "name": "PoolNotAllowedForThisProduct",
36
+ "type": "error"
37
+ },
38
+ {
39
+ "inputs": [],
40
+ "name": "ProductDeprecated",
41
+ "type": "error"
42
+ },
43
+ {
44
+ "inputs": [],
45
+ "name": "ProductNotFound",
46
+ "type": "error"
47
+ },
48
+ {
49
+ "inputs": [],
50
+ "name": "ProductTypeNotFound",
51
+ "type": "error"
52
+ },
53
+ {
54
+ "inputs": [
55
+ {
56
+ "internalType": "uint256",
57
+ "name": "index",
58
+ "type": "uint256"
59
+ }
60
+ ],
61
+ "name": "RevertedWithoutReason",
62
+ "type": "error"
63
+ },
64
+ {
65
+ "inputs": [],
66
+ "name": "StakingPoolDoesNotExist",
67
+ "type": "error"
68
+ },
69
+ {
70
+ "inputs": [],
71
+ "name": "UnsupportedCoverAssets",
72
+ "type": "error"
73
+ },
74
+ {
75
+ "anonymous": false,
76
+ "inputs": [
77
+ {
78
+ "indexed": false,
79
+ "internalType": "uint256",
80
+ "name": "id",
81
+ "type": "uint256"
82
+ }
83
+ ],
84
+ "name": "ProductSet",
85
+ "type": "event"
86
+ },
87
+ {
88
+ "anonymous": false,
89
+ "inputs": [
90
+ {
91
+ "indexed": false,
92
+ "internalType": "uint256",
93
+ "name": "id",
94
+ "type": "uint256"
95
+ }
96
+ ],
97
+ "name": "ProductTypeSet",
98
+ "type": "event"
99
+ },
100
+ {
101
+ "inputs": [],
102
+ "name": "changeDependentContractAddress",
103
+ "outputs": [],
104
+ "stateMutability": "nonpayable",
105
+ "type": "function"
106
+ },
107
+ {
108
+ "inputs": [
109
+ {
110
+ "internalType": "address",
111
+ "name": "masterAddress",
112
+ "type": "address"
113
+ }
114
+ ],
115
+ "name": "changeMasterAddress",
116
+ "outputs": [],
117
+ "stateMutability": "nonpayable",
118
+ "type": "function"
119
+ },
120
+ {
121
+ "inputs": [
122
+ {
123
+ "internalType": "uint256",
124
+ "name": "productId",
125
+ "type": "uint256"
126
+ }
127
+ ],
128
+ "name": "getAllowedPools",
129
+ "outputs": [
130
+ {
131
+ "internalType": "uint256[]",
132
+ "name": "_allowedPools",
133
+ "type": "uint256[]"
134
+ }
135
+ ],
136
+ "stateMutability": "view",
137
+ "type": "function"
138
+ },
139
+ {
140
+ "inputs": [
141
+ {
142
+ "internalType": "uint256",
143
+ "name": "productId",
144
+ "type": "uint256"
145
+ }
146
+ ],
147
+ "name": "getAllowedPoolsCount",
148
+ "outputs": [
149
+ {
150
+ "internalType": "uint256",
151
+ "name": "",
152
+ "type": "uint256"
153
+ }
154
+ ],
155
+ "stateMutability": "view",
156
+ "type": "function"
157
+ },
158
+ {
159
+ "inputs": [
160
+ {
161
+ "internalType": "uint256[]",
162
+ "name": "productIds",
163
+ "type": "uint256[]"
164
+ }
165
+ ],
166
+ "name": "getCapacityReductionRatios",
167
+ "outputs": [
168
+ {
169
+ "internalType": "uint256[]",
170
+ "name": "capacityReductionRatios",
171
+ "type": "uint256[]"
172
+ }
173
+ ],
174
+ "stateMutability": "view",
175
+ "type": "function"
176
+ },
177
+ {
178
+ "inputs": [
179
+ {
180
+ "internalType": "uint256[]",
181
+ "name": "productIds",
182
+ "type": "uint256[]"
183
+ }
184
+ ],
185
+ "name": "getInitialPrices",
186
+ "outputs": [
187
+ {
188
+ "internalType": "uint256[]",
189
+ "name": "initialPrices",
190
+ "type": "uint256[]"
191
+ }
192
+ ],
193
+ "stateMutability": "view",
194
+ "type": "function"
195
+ },
196
+ {
197
+ "inputs": [
198
+ {
199
+ "internalType": "uint256",
200
+ "name": "productId",
201
+ "type": "uint256"
202
+ }
203
+ ],
204
+ "name": "getLatestProductMetadata",
205
+ "outputs": [
206
+ {
207
+ "components": [
208
+ {
209
+ "internalType": "string",
210
+ "name": "ipfsHash",
211
+ "type": "string"
212
+ },
213
+ {
214
+ "internalType": "uint256",
215
+ "name": "timestamp",
216
+ "type": "uint256"
217
+ }
218
+ ],
219
+ "internalType": "struct ICoverProducts.Metadata",
220
+ "name": "",
221
+ "type": "tuple"
222
+ }
223
+ ],
224
+ "stateMutability": "view",
225
+ "type": "function"
226
+ },
227
+ {
228
+ "inputs": [
229
+ {
230
+ "internalType": "uint256",
231
+ "name": "productTypeId",
232
+ "type": "uint256"
233
+ }
234
+ ],
235
+ "name": "getLatestProductTypeMetadata",
236
+ "outputs": [
237
+ {
238
+ "components": [
239
+ {
240
+ "internalType": "string",
241
+ "name": "ipfsHash",
242
+ "type": "string"
243
+ },
244
+ {
245
+ "internalType": "uint256",
246
+ "name": "timestamp",
247
+ "type": "uint256"
248
+ }
249
+ ],
250
+ "internalType": "struct ICoverProducts.Metadata",
251
+ "name": "",
252
+ "type": "tuple"
253
+ }
254
+ ],
255
+ "stateMutability": "view",
256
+ "type": "function"
257
+ },
258
+ {
259
+ "inputs": [
260
+ {
261
+ "internalType": "uint256",
262
+ "name": "productId",
263
+ "type": "uint256"
264
+ }
265
+ ],
266
+ "name": "getProduct",
267
+ "outputs": [
268
+ {
269
+ "components": [
270
+ {
271
+ "internalType": "uint16",
272
+ "name": "productType",
273
+ "type": "uint16"
274
+ },
275
+ {
276
+ "internalType": "address",
277
+ "name": "yieldTokenAddress",
278
+ "type": "address"
279
+ },
280
+ {
281
+ "internalType": "uint32",
282
+ "name": "coverAssets",
283
+ "type": "uint32"
284
+ },
285
+ {
286
+ "internalType": "uint16",
287
+ "name": "initialPriceRatio",
288
+ "type": "uint16"
289
+ },
290
+ {
291
+ "internalType": "uint16",
292
+ "name": "capacityReductionRatio",
293
+ "type": "uint16"
294
+ },
295
+ {
296
+ "internalType": "bool",
297
+ "name": "isDeprecated",
298
+ "type": "bool"
299
+ },
300
+ {
301
+ "internalType": "bool",
302
+ "name": "useFixedPrice",
303
+ "type": "bool"
304
+ }
305
+ ],
306
+ "internalType": "struct Product",
307
+ "name": "",
308
+ "type": "tuple"
309
+ }
310
+ ],
311
+ "stateMutability": "view",
312
+ "type": "function"
313
+ },
314
+ {
315
+ "inputs": [],
316
+ "name": "getProductCount",
317
+ "outputs": [
318
+ {
319
+ "internalType": "uint256",
320
+ "name": "",
321
+ "type": "uint256"
322
+ }
323
+ ],
324
+ "stateMutability": "view",
325
+ "type": "function"
326
+ },
327
+ {
328
+ "inputs": [
329
+ {
330
+ "internalType": "uint256",
331
+ "name": "productId",
332
+ "type": "uint256"
333
+ }
334
+ ],
335
+ "name": "getProductMetadata",
336
+ "outputs": [
337
+ {
338
+ "components": [
339
+ {
340
+ "internalType": "string",
341
+ "name": "ipfsHash",
342
+ "type": "string"
343
+ },
344
+ {
345
+ "internalType": "uint256",
346
+ "name": "timestamp",
347
+ "type": "uint256"
348
+ }
349
+ ],
350
+ "internalType": "struct ICoverProducts.Metadata[]",
351
+ "name": "",
352
+ "type": "tuple[]"
353
+ }
354
+ ],
355
+ "stateMutability": "view",
356
+ "type": "function"
357
+ },
358
+ {
359
+ "inputs": [
360
+ {
361
+ "internalType": "uint256",
362
+ "name": "productId",
363
+ "type": "uint256"
364
+ }
365
+ ],
366
+ "name": "getProductName",
367
+ "outputs": [
368
+ {
369
+ "internalType": "string",
370
+ "name": "",
371
+ "type": "string"
372
+ }
373
+ ],
374
+ "stateMutability": "view",
375
+ "type": "function"
376
+ },
377
+ {
378
+ "inputs": [
379
+ {
380
+ "internalType": "uint256",
381
+ "name": "productTypeId",
382
+ "type": "uint256"
383
+ }
384
+ ],
385
+ "name": "getProductType",
386
+ "outputs": [
387
+ {
388
+ "components": [
389
+ {
390
+ "internalType": "uint8",
391
+ "name": "claimMethod",
392
+ "type": "uint8"
393
+ },
394
+ {
395
+ "internalType": "uint32",
396
+ "name": "gracePeriod",
397
+ "type": "uint32"
398
+ }
399
+ ],
400
+ "internalType": "struct ProductType",
401
+ "name": "",
402
+ "type": "tuple"
403
+ }
404
+ ],
405
+ "stateMutability": "view",
406
+ "type": "function"
407
+ },
408
+ {
409
+ "inputs": [],
410
+ "name": "getProductTypeCount",
411
+ "outputs": [
412
+ {
413
+ "internalType": "uint256",
414
+ "name": "",
415
+ "type": "uint256"
416
+ }
417
+ ],
418
+ "stateMutability": "view",
419
+ "type": "function"
420
+ },
421
+ {
422
+ "inputs": [
423
+ {
424
+ "internalType": "uint256",
425
+ "name": "productTypeId",
426
+ "type": "uint256"
427
+ }
428
+ ],
429
+ "name": "getProductTypeMetadata",
430
+ "outputs": [
431
+ {
432
+ "components": [
433
+ {
434
+ "internalType": "string",
435
+ "name": "ipfsHash",
436
+ "type": "string"
437
+ },
438
+ {
439
+ "internalType": "uint256",
440
+ "name": "timestamp",
441
+ "type": "uint256"
442
+ }
443
+ ],
444
+ "internalType": "struct ICoverProducts.Metadata[]",
445
+ "name": "",
446
+ "type": "tuple[]"
447
+ }
448
+ ],
449
+ "stateMutability": "view",
450
+ "type": "function"
451
+ },
452
+ {
453
+ "inputs": [
454
+ {
455
+ "internalType": "uint256",
456
+ "name": "productTypeId",
457
+ "type": "uint256"
458
+ }
459
+ ],
460
+ "name": "getProductTypeName",
461
+ "outputs": [
462
+ {
463
+ "internalType": "string",
464
+ "name": "",
465
+ "type": "string"
466
+ }
467
+ ],
468
+ "stateMutability": "view",
469
+ "type": "function"
470
+ },
471
+ {
472
+ "inputs": [],
473
+ "name": "getProductTypes",
474
+ "outputs": [
475
+ {
476
+ "components": [
477
+ {
478
+ "internalType": "uint8",
479
+ "name": "claimMethod",
480
+ "type": "uint8"
481
+ },
482
+ {
483
+ "internalType": "uint32",
484
+ "name": "gracePeriod",
485
+ "type": "uint32"
486
+ }
487
+ ],
488
+ "internalType": "struct ProductType[]",
489
+ "name": "",
490
+ "type": "tuple[]"
491
+ }
492
+ ],
493
+ "stateMutability": "view",
494
+ "type": "function"
495
+ },
496
+ {
497
+ "inputs": [
498
+ {
499
+ "internalType": "uint256",
500
+ "name": "productId",
501
+ "type": "uint256"
502
+ }
503
+ ],
504
+ "name": "getProductWithType",
505
+ "outputs": [
506
+ {
507
+ "components": [
508
+ {
509
+ "internalType": "uint16",
510
+ "name": "productType",
511
+ "type": "uint16"
512
+ },
513
+ {
514
+ "internalType": "address",
515
+ "name": "yieldTokenAddress",
516
+ "type": "address"
517
+ },
518
+ {
519
+ "internalType": "uint32",
520
+ "name": "coverAssets",
521
+ "type": "uint32"
522
+ },
523
+ {
524
+ "internalType": "uint16",
525
+ "name": "initialPriceRatio",
526
+ "type": "uint16"
527
+ },
528
+ {
529
+ "internalType": "uint16",
530
+ "name": "capacityReductionRatio",
531
+ "type": "uint16"
532
+ },
533
+ {
534
+ "internalType": "bool",
535
+ "name": "isDeprecated",
536
+ "type": "bool"
537
+ },
538
+ {
539
+ "internalType": "bool",
540
+ "name": "useFixedPrice",
541
+ "type": "bool"
542
+ }
543
+ ],
544
+ "internalType": "struct Product",
545
+ "name": "product",
546
+ "type": "tuple"
547
+ },
548
+ {
549
+ "components": [
550
+ {
551
+ "internalType": "uint8",
552
+ "name": "claimMethod",
553
+ "type": "uint8"
554
+ },
555
+ {
556
+ "internalType": "uint32",
557
+ "name": "gracePeriod",
558
+ "type": "uint32"
559
+ }
560
+ ],
561
+ "internalType": "struct ProductType",
562
+ "name": "productType",
563
+ "type": "tuple"
564
+ }
565
+ ],
566
+ "stateMutability": "view",
567
+ "type": "function"
568
+ },
569
+ {
570
+ "inputs": [],
571
+ "name": "getProducts",
572
+ "outputs": [
573
+ {
574
+ "components": [
575
+ {
576
+ "internalType": "uint16",
577
+ "name": "productType",
578
+ "type": "uint16"
579
+ },
580
+ {
581
+ "internalType": "address",
582
+ "name": "yieldTokenAddress",
583
+ "type": "address"
584
+ },
585
+ {
586
+ "internalType": "uint32",
587
+ "name": "coverAssets",
588
+ "type": "uint32"
589
+ },
590
+ {
591
+ "internalType": "uint16",
592
+ "name": "initialPriceRatio",
593
+ "type": "uint16"
594
+ },
595
+ {
596
+ "internalType": "uint16",
597
+ "name": "capacityReductionRatio",
598
+ "type": "uint16"
599
+ },
600
+ {
601
+ "internalType": "bool",
602
+ "name": "isDeprecated",
603
+ "type": "bool"
604
+ },
605
+ {
606
+ "internalType": "bool",
607
+ "name": "useFixedPrice",
608
+ "type": "bool"
609
+ }
610
+ ],
611
+ "internalType": "struct Product[]",
612
+ "name": "",
613
+ "type": "tuple[]"
614
+ }
615
+ ],
616
+ "stateMutability": "view",
617
+ "type": "function"
618
+ },
619
+ {
620
+ "inputs": [
621
+ {
622
+ "internalType": "uint256",
623
+ "name": "",
624
+ "type": "uint256"
625
+ }
626
+ ],
627
+ "name": "internalContracts",
628
+ "outputs": [
629
+ {
630
+ "internalType": "address payable",
631
+ "name": "",
632
+ "type": "address"
633
+ }
634
+ ],
635
+ "stateMutability": "view",
636
+ "type": "function"
637
+ },
638
+ {
639
+ "inputs": [
640
+ {
641
+ "internalType": "uint256",
642
+ "name": "productId",
643
+ "type": "uint256"
644
+ },
645
+ {
646
+ "internalType": "uint256",
647
+ "name": "poolId",
648
+ "type": "uint256"
649
+ }
650
+ ],
651
+ "name": "isPoolAllowed",
652
+ "outputs": [
653
+ {
654
+ "internalType": "bool",
655
+ "name": "",
656
+ "type": "bool"
657
+ }
658
+ ],
659
+ "stateMutability": "view",
660
+ "type": "function"
661
+ },
662
+ {
663
+ "inputs": [],
664
+ "name": "master",
665
+ "outputs": [
666
+ {
667
+ "internalType": "contract INXMMaster",
668
+ "name": "",
669
+ "type": "address"
670
+ }
671
+ ],
672
+ "stateMutability": "view",
673
+ "type": "function"
674
+ },
675
+ {
676
+ "inputs": [],
677
+ "name": "migrateCoverProducts",
678
+ "outputs": [],
679
+ "stateMutability": "nonpayable",
680
+ "type": "function"
681
+ },
682
+ {
683
+ "inputs": [
684
+ {
685
+ "internalType": "bytes[]",
686
+ "name": "data",
687
+ "type": "bytes[]"
688
+ }
689
+ ],
690
+ "name": "multicall",
691
+ "outputs": [
692
+ {
693
+ "internalType": "bytes[]",
694
+ "name": "results",
695
+ "type": "bytes[]"
696
+ }
697
+ ],
698
+ "stateMutability": "nonpayable",
699
+ "type": "function"
700
+ },
701
+ {
702
+ "inputs": [
703
+ {
704
+ "components": [
705
+ {
706
+ "internalType": "uint256",
707
+ "name": "productId",
708
+ "type": "uint256"
709
+ },
710
+ {
711
+ "internalType": "uint8",
712
+ "name": "weight",
713
+ "type": "uint8"
714
+ },
715
+ {
716
+ "internalType": "uint96",
717
+ "name": "initialPrice",
718
+ "type": "uint96"
719
+ },
720
+ {
721
+ "internalType": "uint96",
722
+ "name": "targetPrice",
723
+ "type": "uint96"
724
+ }
725
+ ],
726
+ "internalType": "struct ProductInitializationParams[]",
727
+ "name": "params",
728
+ "type": "tuple[]"
729
+ }
730
+ ],
731
+ "name": "prepareStakingProductsParams",
732
+ "outputs": [
733
+ {
734
+ "components": [
735
+ {
736
+ "internalType": "uint256",
737
+ "name": "productId",
738
+ "type": "uint256"
739
+ },
740
+ {
741
+ "internalType": "uint8",
742
+ "name": "weight",
743
+ "type": "uint8"
744
+ },
745
+ {
746
+ "internalType": "uint96",
747
+ "name": "initialPrice",
748
+ "type": "uint96"
749
+ },
750
+ {
751
+ "internalType": "uint96",
752
+ "name": "targetPrice",
753
+ "type": "uint96"
754
+ }
755
+ ],
756
+ "internalType": "struct ProductInitializationParams[]",
757
+ "name": "validatedParams",
758
+ "type": "tuple[]"
759
+ }
760
+ ],
761
+ "stateMutability": "view",
762
+ "type": "function"
763
+ },
764
+ {
765
+ "inputs": [
766
+ {
767
+ "internalType": "uint256[]",
768
+ "name": "productIds",
769
+ "type": "uint256[]"
770
+ },
771
+ {
772
+ "internalType": "uint256",
773
+ "name": "poolId",
774
+ "type": "uint256"
775
+ }
776
+ ],
777
+ "name": "requirePoolIsAllowed",
778
+ "outputs": [],
779
+ "stateMutability": "view",
780
+ "type": "function"
781
+ },
782
+ {
783
+ "inputs": [
784
+ {
785
+ "components": [
786
+ {
787
+ "internalType": "string",
788
+ "name": "productTypeName",
789
+ "type": "string"
790
+ },
791
+ {
792
+ "internalType": "uint256",
793
+ "name": "productTypeId",
794
+ "type": "uint256"
795
+ },
796
+ {
797
+ "internalType": "string",
798
+ "name": "ipfsMetadata",
799
+ "type": "string"
800
+ },
801
+ {
802
+ "components": [
803
+ {
804
+ "internalType": "uint8",
805
+ "name": "claimMethod",
806
+ "type": "uint8"
807
+ },
808
+ {
809
+ "internalType": "uint32",
810
+ "name": "gracePeriod",
811
+ "type": "uint32"
812
+ }
813
+ ],
814
+ "internalType": "struct ProductType",
815
+ "name": "productType",
816
+ "type": "tuple"
817
+ }
818
+ ],
819
+ "internalType": "struct ICoverProducts.ProductTypeParam[]",
820
+ "name": "productTypeParams",
821
+ "type": "tuple[]"
822
+ }
823
+ ],
824
+ "name": "setProductTypes",
825
+ "outputs": [],
826
+ "stateMutability": "nonpayable",
827
+ "type": "function"
828
+ },
829
+ {
830
+ "inputs": [
831
+ {
832
+ "internalType": "uint256[]",
833
+ "name": "productTypeIds",
834
+ "type": "uint256[]"
835
+ },
836
+ {
837
+ "internalType": "string[]",
838
+ "name": "ipfsMetadata",
839
+ "type": "string[]"
840
+ }
841
+ ],
842
+ "name": "setProductTypesMetadata",
843
+ "outputs": [],
844
+ "stateMutability": "nonpayable",
845
+ "type": "function"
846
+ },
847
+ {
848
+ "inputs": [
849
+ {
850
+ "components": [
851
+ {
852
+ "internalType": "string",
853
+ "name": "productName",
854
+ "type": "string"
855
+ },
856
+ {
857
+ "internalType": "uint256",
858
+ "name": "productId",
859
+ "type": "uint256"
860
+ },
861
+ {
862
+ "internalType": "string",
863
+ "name": "ipfsMetadata",
864
+ "type": "string"
865
+ },
866
+ {
867
+ "components": [
868
+ {
869
+ "internalType": "uint16",
870
+ "name": "productType",
871
+ "type": "uint16"
872
+ },
873
+ {
874
+ "internalType": "address",
875
+ "name": "yieldTokenAddress",
876
+ "type": "address"
877
+ },
878
+ {
879
+ "internalType": "uint32",
880
+ "name": "coverAssets",
881
+ "type": "uint32"
882
+ },
883
+ {
884
+ "internalType": "uint16",
885
+ "name": "initialPriceRatio",
886
+ "type": "uint16"
887
+ },
888
+ {
889
+ "internalType": "uint16",
890
+ "name": "capacityReductionRatio",
891
+ "type": "uint16"
892
+ },
893
+ {
894
+ "internalType": "bool",
895
+ "name": "isDeprecated",
896
+ "type": "bool"
897
+ },
898
+ {
899
+ "internalType": "bool",
900
+ "name": "useFixedPrice",
901
+ "type": "bool"
902
+ }
903
+ ],
904
+ "internalType": "struct Product",
905
+ "name": "product",
906
+ "type": "tuple"
907
+ },
908
+ {
909
+ "internalType": "uint256[]",
910
+ "name": "allowedPools",
911
+ "type": "uint256[]"
912
+ }
913
+ ],
914
+ "internalType": "struct ICoverProducts.ProductParam[]",
915
+ "name": "productParams",
916
+ "type": "tuple[]"
917
+ }
918
+ ],
919
+ "name": "setProducts",
920
+ "outputs": [],
921
+ "stateMutability": "nonpayable",
922
+ "type": "function"
923
+ },
924
+ {
925
+ "inputs": [
926
+ {
927
+ "internalType": "uint256[]",
928
+ "name": "productIds",
929
+ "type": "uint256[]"
930
+ },
931
+ {
932
+ "internalType": "string[]",
933
+ "name": "ipfsMetadata",
934
+ "type": "string[]"
935
+ }
936
+ ],
937
+ "name": "setProductsMetadata",
938
+ "outputs": [],
939
+ "stateMutability": "nonpayable",
940
+ "type": "function"
941
+ }
942
+ ]