@gitmyabi/rari 1.0.0 → 1.0.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.
@@ -0,0 +1,2353 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+
5
+ /**
6
+ * LibPart.Part struct type
7
+ */
8
+ export type LibPart_Part = {
9
+ account: `0x${string}`;
10
+ value: bigint;
11
+ };
12
+
13
+ /**
14
+ * LibERC1155LazyMint.Mint1155Data struct type
15
+ */
16
+ export type LibERC1155LazyMint_Mint1155Data = {
17
+ tokenId: bigint;
18
+ tokenURI: string;
19
+ supply: bigint;
20
+ creators: LibPart_Part[];
21
+ royalties: LibPart_Part[];
22
+ signatures: `0x${string}`[];
23
+ };
24
+ /**
25
+ * ERC1155Rarible_json ABI
26
+ *
27
+ * This ABI is typed using viem's type system for full type safety.
28
+ */
29
+ export const ERC1155Rarible_jsonAbi = [
30
+ {
31
+ "anonymous": false,
32
+ "inputs": [
33
+ {
34
+ "indexed": true,
35
+ "internalType": "address",
36
+ "name": "account",
37
+ "type": "address"
38
+ },
39
+ {
40
+ "indexed": true,
41
+ "internalType": "address",
42
+ "name": "operator",
43
+ "type": "address"
44
+ },
45
+ {
46
+ "indexed": false,
47
+ "internalType": "bool",
48
+ "name": "approved",
49
+ "type": "bool"
50
+ }
51
+ ],
52
+ "name": "ApprovalForAll",
53
+ "type": "event"
54
+ },
55
+ {
56
+ "anonymous": false,
57
+ "inputs": [
58
+ {
59
+ "indexed": false,
60
+ "internalType": "string",
61
+ "name": "newBaseURI",
62
+ "type": "string"
63
+ }
64
+ ],
65
+ "name": "BaseUriChanged",
66
+ "type": "event"
67
+ },
68
+ {
69
+ "anonymous": false,
70
+ "inputs": [
71
+ {
72
+ "indexed": true,
73
+ "internalType": "address",
74
+ "name": "operator",
75
+ "type": "address"
76
+ },
77
+ {
78
+ "indexed": true,
79
+ "internalType": "address",
80
+ "name": "account",
81
+ "type": "address"
82
+ },
83
+ {
84
+ "indexed": false,
85
+ "internalType": "uint256",
86
+ "name": "id",
87
+ "type": "uint256"
88
+ },
89
+ {
90
+ "indexed": false,
91
+ "internalType": "uint256",
92
+ "name": "amount",
93
+ "type": "uint256"
94
+ }
95
+ ],
96
+ "name": "BurnLazy",
97
+ "type": "event"
98
+ },
99
+ {
100
+ "anonymous": false,
101
+ "inputs": [
102
+ {
103
+ "indexed": true,
104
+ "internalType": "address",
105
+ "name": "operator",
106
+ "type": "address"
107
+ },
108
+ {
109
+ "indexed": true,
110
+ "internalType": "address",
111
+ "name": "account",
112
+ "type": "address"
113
+ },
114
+ {
115
+ "indexed": false,
116
+ "internalType": "uint256[]",
117
+ "name": "ids",
118
+ "type": "uint256[]"
119
+ },
120
+ {
121
+ "indexed": false,
122
+ "internalType": "uint256[]",
123
+ "name": "amounts",
124
+ "type": "uint256[]"
125
+ }
126
+ ],
127
+ "name": "BurnLazyBatch",
128
+ "type": "event"
129
+ },
130
+ {
131
+ "anonymous": false,
132
+ "inputs": [
133
+ {
134
+ "indexed": false,
135
+ "internalType": "address",
136
+ "name": "owner",
137
+ "type": "address"
138
+ },
139
+ {
140
+ "indexed": false,
141
+ "internalType": "string",
142
+ "name": "name",
143
+ "type": "string"
144
+ },
145
+ {
146
+ "indexed": false,
147
+ "internalType": "string",
148
+ "name": "symbol",
149
+ "type": "string"
150
+ }
151
+ ],
152
+ "name": "CreateERC1155Rarible",
153
+ "type": "event"
154
+ },
155
+ {
156
+ "anonymous": false,
157
+ "inputs": [
158
+ {
159
+ "indexed": false,
160
+ "internalType": "address",
161
+ "name": "owner",
162
+ "type": "address"
163
+ },
164
+ {
165
+ "indexed": false,
166
+ "internalType": "string",
167
+ "name": "name",
168
+ "type": "string"
169
+ },
170
+ {
171
+ "indexed": false,
172
+ "internalType": "string",
173
+ "name": "symbol",
174
+ "type": "string"
175
+ }
176
+ ],
177
+ "name": "CreateERC1155RaribleUser",
178
+ "type": "event"
179
+ },
180
+ {
181
+ "anonymous": false,
182
+ "inputs": [
183
+ {
184
+ "indexed": false,
185
+ "internalType": "uint256",
186
+ "name": "tokenId",
187
+ "type": "uint256"
188
+ },
189
+ {
190
+ "components": [
191
+ {
192
+ "internalType": "address payable",
193
+ "name": "account",
194
+ "type": "address"
195
+ },
196
+ {
197
+ "internalType": "uint96",
198
+ "name": "value",
199
+ "type": "uint96"
200
+ }
201
+ ],
202
+ "indexed": false,
203
+ "internalType": "struct LibPart.Part[]",
204
+ "name": "creators",
205
+ "type": "tuple[]"
206
+ }
207
+ ],
208
+ "name": "Creators",
209
+ "type": "event"
210
+ },
211
+ {
212
+ "anonymous": false,
213
+ "inputs": [
214
+ {
215
+ "indexed": true,
216
+ "internalType": "address",
217
+ "name": "operator",
218
+ "type": "address"
219
+ },
220
+ {
221
+ "indexed": false,
222
+ "internalType": "bool",
223
+ "name": "hasApproval",
224
+ "type": "bool"
225
+ }
226
+ ],
227
+ "name": "DefaultApproval",
228
+ "type": "event"
229
+ },
230
+ {
231
+ "anonymous": false,
232
+ "inputs": [
233
+ {
234
+ "indexed": true,
235
+ "internalType": "address",
236
+ "name": "minter",
237
+ "type": "address"
238
+ },
239
+ {
240
+ "indexed": true,
241
+ "internalType": "bool",
242
+ "name": "status",
243
+ "type": "bool"
244
+ }
245
+ ],
246
+ "name": "MinterStatusChanged",
247
+ "type": "event"
248
+ },
249
+ {
250
+ "anonymous": false,
251
+ "inputs": [
252
+ {
253
+ "indexed": true,
254
+ "internalType": "address",
255
+ "name": "previousOwner",
256
+ "type": "address"
257
+ },
258
+ {
259
+ "indexed": true,
260
+ "internalType": "address",
261
+ "name": "newOwner",
262
+ "type": "address"
263
+ }
264
+ ],
265
+ "name": "OwnershipTransferred",
266
+ "type": "event"
267
+ },
268
+ {
269
+ "anonymous": false,
270
+ "inputs": [
271
+ {
272
+ "indexed": false,
273
+ "internalType": "uint256",
274
+ "name": "tokenId",
275
+ "type": "uint256"
276
+ },
277
+ {
278
+ "components": [
279
+ {
280
+ "internalType": "address payable",
281
+ "name": "account",
282
+ "type": "address"
283
+ },
284
+ {
285
+ "internalType": "uint96",
286
+ "name": "value",
287
+ "type": "uint96"
288
+ }
289
+ ],
290
+ "indexed": false,
291
+ "internalType": "struct LibPart.Part[]",
292
+ "name": "royalties",
293
+ "type": "tuple[]"
294
+ }
295
+ ],
296
+ "name": "RoyaltiesSet",
297
+ "type": "event"
298
+ },
299
+ {
300
+ "anonymous": false,
301
+ "inputs": [
302
+ {
303
+ "indexed": false,
304
+ "internalType": "uint256",
305
+ "name": "tokenId",
306
+ "type": "uint256"
307
+ },
308
+ {
309
+ "indexed": false,
310
+ "internalType": "uint256",
311
+ "name": "value",
312
+ "type": "uint256"
313
+ }
314
+ ],
315
+ "name": "Supply",
316
+ "type": "event"
317
+ },
318
+ {
319
+ "anonymous": false,
320
+ "inputs": [
321
+ {
322
+ "indexed": true,
323
+ "internalType": "address",
324
+ "name": "operator",
325
+ "type": "address"
326
+ },
327
+ {
328
+ "indexed": true,
329
+ "internalType": "address",
330
+ "name": "from",
331
+ "type": "address"
332
+ },
333
+ {
334
+ "indexed": true,
335
+ "internalType": "address",
336
+ "name": "to",
337
+ "type": "address"
338
+ },
339
+ {
340
+ "indexed": false,
341
+ "internalType": "uint256[]",
342
+ "name": "ids",
343
+ "type": "uint256[]"
344
+ },
345
+ {
346
+ "indexed": false,
347
+ "internalType": "uint256[]",
348
+ "name": "values",
349
+ "type": "uint256[]"
350
+ }
351
+ ],
352
+ "name": "TransferBatch",
353
+ "type": "event"
354
+ },
355
+ {
356
+ "anonymous": false,
357
+ "inputs": [
358
+ {
359
+ "indexed": true,
360
+ "internalType": "address",
361
+ "name": "operator",
362
+ "type": "address"
363
+ },
364
+ {
365
+ "indexed": true,
366
+ "internalType": "address",
367
+ "name": "from",
368
+ "type": "address"
369
+ },
370
+ {
371
+ "indexed": true,
372
+ "internalType": "address",
373
+ "name": "to",
374
+ "type": "address"
375
+ },
376
+ {
377
+ "indexed": false,
378
+ "internalType": "uint256",
379
+ "name": "id",
380
+ "type": "uint256"
381
+ },
382
+ {
383
+ "indexed": false,
384
+ "internalType": "uint256",
385
+ "name": "value",
386
+ "type": "uint256"
387
+ }
388
+ ],
389
+ "name": "TransferSingle",
390
+ "type": "event"
391
+ },
392
+ {
393
+ "anonymous": false,
394
+ "inputs": [
395
+ {
396
+ "indexed": false,
397
+ "internalType": "string",
398
+ "name": "value",
399
+ "type": "string"
400
+ },
401
+ {
402
+ "indexed": true,
403
+ "internalType": "uint256",
404
+ "name": "id",
405
+ "type": "uint256"
406
+ }
407
+ ],
408
+ "name": "URI",
409
+ "type": "event"
410
+ },
411
+ {
412
+ "inputs": [
413
+ {
414
+ "internalType": "string",
415
+ "name": "_name",
416
+ "type": "string"
417
+ },
418
+ {
419
+ "internalType": "string",
420
+ "name": "_symbol",
421
+ "type": "string"
422
+ },
423
+ {
424
+ "internalType": "string",
425
+ "name": "baseURI",
426
+ "type": "string"
427
+ },
428
+ {
429
+ "internalType": "string",
430
+ "name": "contractURI",
431
+ "type": "string"
432
+ },
433
+ {
434
+ "internalType": "address[]",
435
+ "name": "operators",
436
+ "type": "address[]"
437
+ },
438
+ {
439
+ "internalType": "address",
440
+ "name": "transferProxy",
441
+ "type": "address"
442
+ },
443
+ {
444
+ "internalType": "address",
445
+ "name": "lazyTransferProxy",
446
+ "type": "address"
447
+ }
448
+ ],
449
+ "name": "__ERC1155RaribleUser_init",
450
+ "outputs": [],
451
+ "stateMutability": "nonpayable",
452
+ "type": "function"
453
+ },
454
+ {
455
+ "inputs": [
456
+ {
457
+ "internalType": "string",
458
+ "name": "_name",
459
+ "type": "string"
460
+ },
461
+ {
462
+ "internalType": "string",
463
+ "name": "_symbol",
464
+ "type": "string"
465
+ },
466
+ {
467
+ "internalType": "string",
468
+ "name": "baseURI",
469
+ "type": "string"
470
+ },
471
+ {
472
+ "internalType": "string",
473
+ "name": "contractURI",
474
+ "type": "string"
475
+ },
476
+ {
477
+ "internalType": "address",
478
+ "name": "transferProxy",
479
+ "type": "address"
480
+ },
481
+ {
482
+ "internalType": "address",
483
+ "name": "lazyTransferProxy",
484
+ "type": "address"
485
+ }
486
+ ],
487
+ "name": "__ERC1155Rarible_init",
488
+ "outputs": [],
489
+ "stateMutability": "nonpayable",
490
+ "type": "function"
491
+ },
492
+ {
493
+ "inputs": [
494
+ {
495
+ "internalType": "address",
496
+ "name": "minter",
497
+ "type": "address"
498
+ }
499
+ ],
500
+ "name": "addMinter",
501
+ "outputs": [],
502
+ "stateMutability": "nonpayable",
503
+ "type": "function"
504
+ },
505
+ {
506
+ "inputs": [
507
+ {
508
+ "internalType": "address[]",
509
+ "name": "minters",
510
+ "type": "address[]"
511
+ }
512
+ ],
513
+ "name": "addMinters",
514
+ "outputs": [],
515
+ "stateMutability": "nonpayable",
516
+ "type": "function"
517
+ },
518
+ {
519
+ "inputs": [
520
+ {
521
+ "internalType": "address",
522
+ "name": "account",
523
+ "type": "address"
524
+ },
525
+ {
526
+ "internalType": "uint256",
527
+ "name": "id",
528
+ "type": "uint256"
529
+ }
530
+ ],
531
+ "name": "balanceOf",
532
+ "outputs": [
533
+ {
534
+ "internalType": "uint256",
535
+ "name": "",
536
+ "type": "uint256"
537
+ }
538
+ ],
539
+ "stateMutability": "view",
540
+ "type": "function"
541
+ },
542
+ {
543
+ "inputs": [
544
+ {
545
+ "internalType": "address[]",
546
+ "name": "accounts",
547
+ "type": "address[]"
548
+ },
549
+ {
550
+ "internalType": "uint256[]",
551
+ "name": "ids",
552
+ "type": "uint256[]"
553
+ }
554
+ ],
555
+ "name": "balanceOfBatch",
556
+ "outputs": [
557
+ {
558
+ "internalType": "uint256[]",
559
+ "name": "",
560
+ "type": "uint256[]"
561
+ }
562
+ ],
563
+ "stateMutability": "view",
564
+ "type": "function"
565
+ },
566
+ {
567
+ "inputs": [],
568
+ "name": "baseURI",
569
+ "outputs": [
570
+ {
571
+ "internalType": "string",
572
+ "name": "",
573
+ "type": "string"
574
+ }
575
+ ],
576
+ "stateMutability": "view",
577
+ "type": "function"
578
+ },
579
+ {
580
+ "inputs": [
581
+ {
582
+ "internalType": "address",
583
+ "name": "account",
584
+ "type": "address"
585
+ },
586
+ {
587
+ "internalType": "uint256",
588
+ "name": "id",
589
+ "type": "uint256"
590
+ },
591
+ {
592
+ "internalType": "uint256",
593
+ "name": "amount",
594
+ "type": "uint256"
595
+ }
596
+ ],
597
+ "name": "burn",
598
+ "outputs": [],
599
+ "stateMutability": "nonpayable",
600
+ "type": "function"
601
+ },
602
+ {
603
+ "inputs": [
604
+ {
605
+ "internalType": "address",
606
+ "name": "account",
607
+ "type": "address"
608
+ },
609
+ {
610
+ "internalType": "uint256[]",
611
+ "name": "ids",
612
+ "type": "uint256[]"
613
+ },
614
+ {
615
+ "internalType": "uint256[]",
616
+ "name": "amounts",
617
+ "type": "uint256[]"
618
+ }
619
+ ],
620
+ "name": "burnBatch",
621
+ "outputs": [],
622
+ "stateMutability": "nonpayable",
623
+ "type": "function"
624
+ },
625
+ {
626
+ "inputs": [],
627
+ "name": "contractURI",
628
+ "outputs": [
629
+ {
630
+ "internalType": "string",
631
+ "name": "",
632
+ "type": "string"
633
+ }
634
+ ],
635
+ "stateMutability": "view",
636
+ "type": "function"
637
+ },
638
+ {
639
+ "inputs": [
640
+ {
641
+ "internalType": "uint256",
642
+ "name": "_id",
643
+ "type": "uint256"
644
+ }
645
+ ],
646
+ "name": "getCreators",
647
+ "outputs": [
648
+ {
649
+ "components": [
650
+ {
651
+ "internalType": "address payable",
652
+ "name": "account",
653
+ "type": "address"
654
+ },
655
+ {
656
+ "internalType": "uint96",
657
+ "name": "value",
658
+ "type": "uint96"
659
+ }
660
+ ],
661
+ "internalType": "struct LibPart.Part[]",
662
+ "name": "",
663
+ "type": "tuple[]"
664
+ }
665
+ ],
666
+ "stateMutability": "view",
667
+ "type": "function"
668
+ },
669
+ {
670
+ "inputs": [
671
+ {
672
+ "internalType": "uint256",
673
+ "name": "id",
674
+ "type": "uint256"
675
+ }
676
+ ],
677
+ "name": "getRaribleV2Royalties",
678
+ "outputs": [
679
+ {
680
+ "components": [
681
+ {
682
+ "internalType": "address payable",
683
+ "name": "account",
684
+ "type": "address"
685
+ },
686
+ {
687
+ "internalType": "uint96",
688
+ "name": "value",
689
+ "type": "uint96"
690
+ }
691
+ ],
692
+ "internalType": "struct LibPart.Part[]",
693
+ "name": "",
694
+ "type": "tuple[]"
695
+ }
696
+ ],
697
+ "stateMutability": "view",
698
+ "type": "function"
699
+ },
700
+ {
701
+ "inputs": [
702
+ {
703
+ "internalType": "address",
704
+ "name": "_owner",
705
+ "type": "address"
706
+ },
707
+ {
708
+ "internalType": "address",
709
+ "name": "_operator",
710
+ "type": "address"
711
+ }
712
+ ],
713
+ "name": "isApprovedForAll",
714
+ "outputs": [
715
+ {
716
+ "internalType": "bool",
717
+ "name": "",
718
+ "type": "bool"
719
+ }
720
+ ],
721
+ "stateMutability": "view",
722
+ "type": "function"
723
+ },
724
+ {
725
+ "inputs": [
726
+ {
727
+ "internalType": "address",
728
+ "name": "account",
729
+ "type": "address"
730
+ }
731
+ ],
732
+ "name": "isMinter",
733
+ "outputs": [
734
+ {
735
+ "internalType": "bool",
736
+ "name": "",
737
+ "type": "bool"
738
+ }
739
+ ],
740
+ "stateMutability": "view",
741
+ "type": "function"
742
+ },
743
+ {
744
+ "inputs": [
745
+ {
746
+ "components": [
747
+ {
748
+ "internalType": "uint256",
749
+ "name": "tokenId",
750
+ "type": "uint256"
751
+ },
752
+ {
753
+ "internalType": "string",
754
+ "name": "tokenURI",
755
+ "type": "string"
756
+ },
757
+ {
758
+ "internalType": "uint256",
759
+ "name": "supply",
760
+ "type": "uint256"
761
+ },
762
+ {
763
+ "components": [
764
+ {
765
+ "internalType": "address payable",
766
+ "name": "account",
767
+ "type": "address"
768
+ },
769
+ {
770
+ "internalType": "uint96",
771
+ "name": "value",
772
+ "type": "uint96"
773
+ }
774
+ ],
775
+ "internalType": "struct LibPart.Part[]",
776
+ "name": "creators",
777
+ "type": "tuple[]"
778
+ },
779
+ {
780
+ "components": [
781
+ {
782
+ "internalType": "address payable",
783
+ "name": "account",
784
+ "type": "address"
785
+ },
786
+ {
787
+ "internalType": "uint96",
788
+ "name": "value",
789
+ "type": "uint96"
790
+ }
791
+ ],
792
+ "internalType": "struct LibPart.Part[]",
793
+ "name": "royalties",
794
+ "type": "tuple[]"
795
+ },
796
+ {
797
+ "internalType": "bytes[]",
798
+ "name": "signatures",
799
+ "type": "bytes[]"
800
+ }
801
+ ],
802
+ "internalType": "struct LibERC1155LazyMint.Mint1155Data",
803
+ "name": "data",
804
+ "type": "tuple"
805
+ },
806
+ {
807
+ "internalType": "address",
808
+ "name": "to",
809
+ "type": "address"
810
+ },
811
+ {
812
+ "internalType": "uint256",
813
+ "name": "_amount",
814
+ "type": "uint256"
815
+ }
816
+ ],
817
+ "name": "mintAndTransfer",
818
+ "outputs": [],
819
+ "stateMutability": "nonpayable",
820
+ "type": "function"
821
+ },
822
+ {
823
+ "inputs": [],
824
+ "name": "name",
825
+ "outputs": [
826
+ {
827
+ "internalType": "string",
828
+ "name": "",
829
+ "type": "string"
830
+ }
831
+ ],
832
+ "stateMutability": "view",
833
+ "type": "function"
834
+ },
835
+ {
836
+ "inputs": [],
837
+ "name": "owner",
838
+ "outputs": [
839
+ {
840
+ "internalType": "address",
841
+ "name": "",
842
+ "type": "address"
843
+ }
844
+ ],
845
+ "stateMutability": "view",
846
+ "type": "function"
847
+ },
848
+ {
849
+ "inputs": [
850
+ {
851
+ "internalType": "address",
852
+ "name": "_minter",
853
+ "type": "address"
854
+ }
855
+ ],
856
+ "name": "removeMinter",
857
+ "outputs": [],
858
+ "stateMutability": "nonpayable",
859
+ "type": "function"
860
+ },
861
+ {
862
+ "inputs": [],
863
+ "name": "renounceOwnership",
864
+ "outputs": [],
865
+ "stateMutability": "nonpayable",
866
+ "type": "function"
867
+ },
868
+ {
869
+ "inputs": [
870
+ {
871
+ "internalType": "uint256",
872
+ "name": "id",
873
+ "type": "uint256"
874
+ },
875
+ {
876
+ "internalType": "uint256",
877
+ "name": "_salePrice",
878
+ "type": "uint256"
879
+ }
880
+ ],
881
+ "name": "royaltyInfo",
882
+ "outputs": [
883
+ {
884
+ "internalType": "address",
885
+ "name": "receiver",
886
+ "type": "address"
887
+ },
888
+ {
889
+ "internalType": "uint256",
890
+ "name": "royaltyAmount",
891
+ "type": "uint256"
892
+ }
893
+ ],
894
+ "stateMutability": "view",
895
+ "type": "function"
896
+ },
897
+ {
898
+ "inputs": [
899
+ {
900
+ "internalType": "address",
901
+ "name": "from",
902
+ "type": "address"
903
+ },
904
+ {
905
+ "internalType": "address",
906
+ "name": "to",
907
+ "type": "address"
908
+ },
909
+ {
910
+ "internalType": "uint256[]",
911
+ "name": "ids",
912
+ "type": "uint256[]"
913
+ },
914
+ {
915
+ "internalType": "uint256[]",
916
+ "name": "amounts",
917
+ "type": "uint256[]"
918
+ },
919
+ {
920
+ "internalType": "bytes",
921
+ "name": "data",
922
+ "type": "bytes"
923
+ }
924
+ ],
925
+ "name": "safeBatchTransferFrom",
926
+ "outputs": [],
927
+ "stateMutability": "nonpayable",
928
+ "type": "function"
929
+ },
930
+ {
931
+ "inputs": [
932
+ {
933
+ "internalType": "address",
934
+ "name": "from",
935
+ "type": "address"
936
+ },
937
+ {
938
+ "internalType": "address",
939
+ "name": "to",
940
+ "type": "address"
941
+ },
942
+ {
943
+ "internalType": "uint256",
944
+ "name": "id",
945
+ "type": "uint256"
946
+ },
947
+ {
948
+ "internalType": "uint256",
949
+ "name": "amount",
950
+ "type": "uint256"
951
+ },
952
+ {
953
+ "internalType": "bytes",
954
+ "name": "data",
955
+ "type": "bytes"
956
+ }
957
+ ],
958
+ "name": "safeTransferFrom",
959
+ "outputs": [],
960
+ "stateMutability": "nonpayable",
961
+ "type": "function"
962
+ },
963
+ {
964
+ "inputs": [
965
+ {
966
+ "internalType": "address",
967
+ "name": "operator",
968
+ "type": "address"
969
+ },
970
+ {
971
+ "internalType": "bool",
972
+ "name": "approved",
973
+ "type": "bool"
974
+ }
975
+ ],
976
+ "name": "setApprovalForAll",
977
+ "outputs": [],
978
+ "stateMutability": "nonpayable",
979
+ "type": "function"
980
+ },
981
+ {
982
+ "inputs": [
983
+ {
984
+ "internalType": "string",
985
+ "name": "newBaseURI",
986
+ "type": "string"
987
+ }
988
+ ],
989
+ "name": "setBaseURI",
990
+ "outputs": [],
991
+ "stateMutability": "nonpayable",
992
+ "type": "function"
993
+ },
994
+ {
995
+ "inputs": [
996
+ {
997
+ "internalType": "bytes4",
998
+ "name": "interfaceId",
999
+ "type": "bytes4"
1000
+ }
1001
+ ],
1002
+ "name": "supportsInterface",
1003
+ "outputs": [
1004
+ {
1005
+ "internalType": "bool",
1006
+ "name": "",
1007
+ "type": "bool"
1008
+ }
1009
+ ],
1010
+ "stateMutability": "view",
1011
+ "type": "function"
1012
+ },
1013
+ {
1014
+ "inputs": [],
1015
+ "name": "symbol",
1016
+ "outputs": [
1017
+ {
1018
+ "internalType": "string",
1019
+ "name": "",
1020
+ "type": "string"
1021
+ }
1022
+ ],
1023
+ "stateMutability": "view",
1024
+ "type": "function"
1025
+ },
1026
+ {
1027
+ "inputs": [
1028
+ {
1029
+ "components": [
1030
+ {
1031
+ "internalType": "uint256",
1032
+ "name": "tokenId",
1033
+ "type": "uint256"
1034
+ },
1035
+ {
1036
+ "internalType": "string",
1037
+ "name": "tokenURI",
1038
+ "type": "string"
1039
+ },
1040
+ {
1041
+ "internalType": "uint256",
1042
+ "name": "supply",
1043
+ "type": "uint256"
1044
+ },
1045
+ {
1046
+ "components": [
1047
+ {
1048
+ "internalType": "address payable",
1049
+ "name": "account",
1050
+ "type": "address"
1051
+ },
1052
+ {
1053
+ "internalType": "uint96",
1054
+ "name": "value",
1055
+ "type": "uint96"
1056
+ }
1057
+ ],
1058
+ "internalType": "struct LibPart.Part[]",
1059
+ "name": "creators",
1060
+ "type": "tuple[]"
1061
+ },
1062
+ {
1063
+ "components": [
1064
+ {
1065
+ "internalType": "address payable",
1066
+ "name": "account",
1067
+ "type": "address"
1068
+ },
1069
+ {
1070
+ "internalType": "uint96",
1071
+ "name": "value",
1072
+ "type": "uint96"
1073
+ }
1074
+ ],
1075
+ "internalType": "struct LibPart.Part[]",
1076
+ "name": "royalties",
1077
+ "type": "tuple[]"
1078
+ },
1079
+ {
1080
+ "internalType": "bytes[]",
1081
+ "name": "signatures",
1082
+ "type": "bytes[]"
1083
+ }
1084
+ ],
1085
+ "internalType": "struct LibERC1155LazyMint.Mint1155Data",
1086
+ "name": "data",
1087
+ "type": "tuple"
1088
+ },
1089
+ {
1090
+ "internalType": "address",
1091
+ "name": "from",
1092
+ "type": "address"
1093
+ },
1094
+ {
1095
+ "internalType": "address",
1096
+ "name": "to",
1097
+ "type": "address"
1098
+ },
1099
+ {
1100
+ "internalType": "uint256",
1101
+ "name": "amount",
1102
+ "type": "uint256"
1103
+ }
1104
+ ],
1105
+ "name": "transferFromOrMint",
1106
+ "outputs": [],
1107
+ "stateMutability": "nonpayable",
1108
+ "type": "function"
1109
+ },
1110
+ {
1111
+ "inputs": [
1112
+ {
1113
+ "internalType": "address",
1114
+ "name": "newOwner",
1115
+ "type": "address"
1116
+ }
1117
+ ],
1118
+ "name": "transferOwnership",
1119
+ "outputs": [],
1120
+ "stateMutability": "nonpayable",
1121
+ "type": "function"
1122
+ },
1123
+ {
1124
+ "inputs": [
1125
+ {
1126
+ "internalType": "uint256",
1127
+ "name": "_id",
1128
+ "type": "uint256"
1129
+ },
1130
+ {
1131
+ "internalType": "address",
1132
+ "name": "_from",
1133
+ "type": "address"
1134
+ },
1135
+ {
1136
+ "internalType": "address",
1137
+ "name": "_to",
1138
+ "type": "address"
1139
+ }
1140
+ ],
1141
+ "name": "updateAccount",
1142
+ "outputs": [],
1143
+ "stateMutability": "nonpayable",
1144
+ "type": "function"
1145
+ },
1146
+ {
1147
+ "inputs": [
1148
+ {
1149
+ "internalType": "uint256",
1150
+ "name": "id",
1151
+ "type": "uint256"
1152
+ }
1153
+ ],
1154
+ "name": "uri",
1155
+ "outputs": [
1156
+ {
1157
+ "internalType": "string",
1158
+ "name": "",
1159
+ "type": "string"
1160
+ }
1161
+ ],
1162
+ "stateMutability": "view",
1163
+ "type": "function"
1164
+ }
1165
+ ] as const satisfies Abi;
1166
+
1167
+ /**
1168
+ * Type-safe ABI for ERC1155Rarible_json
1169
+ */
1170
+ export type ERC1155Rarible_jsonAbi = typeof ERC1155Rarible_jsonAbi;
1171
+
1172
+ /**
1173
+ * Contract instance type for ERC1155Rarible_json
1174
+ */
1175
+ // Use any for contract type to avoid complex viem type issues
1176
+ // The runtime behavior is type-safe through viem's ABI typing
1177
+ export type ERC1155Rarible_jsonContract = any;
1178
+
1179
+ /**
1180
+ * ERC1155Rarible_json Contract Class
1181
+ *
1182
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
1183
+ *
1184
+ * @example
1185
+ * ```typescript
1186
+ * import { createPublicClient, createWalletClient, http } from 'viem';
1187
+ * import { mainnet } from 'viem/chains';
1188
+ * import { ERC1155Rarible_json } from 'ERC1155Rarible_json';
1189
+ *
1190
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
1191
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
1192
+ *
1193
+ * const contract = new ERC1155Rarible_json('0x...', { publicClient, walletClient });
1194
+ *
1195
+ * // Read functions
1196
+ * const result = await contract.balanceOf('0x...');
1197
+ *
1198
+ * // Write functions
1199
+ * const hash = await contract.transfer('0x...', 1000n);
1200
+ *
1201
+ * // Simulate transactions (dry-run)
1202
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
1203
+ * console.log('Gas estimate:', simulation.request.gas);
1204
+ *
1205
+ * // Watch events
1206
+ * const unwatch = contract.watch.Transfer((event) => {
1207
+ * console.log('Transfer event:', event);
1208
+ * });
1209
+ * ```
1210
+ */
1211
+ export class ERC1155Rarible_json {
1212
+ private contract: ERC1155Rarible_jsonContract;
1213
+ private contractAddress: Address;
1214
+ private publicClient: PublicClient;
1215
+
1216
+ constructor(
1217
+ address: Address,
1218
+ clients: {
1219
+ publicClient: PublicClient;
1220
+ walletClient?: WalletClient;
1221
+ }
1222
+ ) {
1223
+ this.contractAddress = address;
1224
+ this.publicClient = clients.publicClient;
1225
+ this.contract = getContract({
1226
+ address,
1227
+ abi: ERC1155Rarible_jsonAbi,
1228
+ client: {
1229
+ public: clients.publicClient,
1230
+ wallet: clients.walletClient,
1231
+ },
1232
+ });
1233
+ }
1234
+
1235
+ /**
1236
+ * Get the contract address
1237
+ */
1238
+ get address(): Address {
1239
+ return this.contractAddress;
1240
+ }
1241
+
1242
+ /**
1243
+ * Get the underlying viem contract instance
1244
+ */
1245
+ getContract(): ERC1155Rarible_jsonContract {
1246
+ return this.contract;
1247
+ }
1248
+
1249
+ /**
1250
+ * balanceOf
1251
+ * view
1252
+ */
1253
+ async balanceOf(account: `0x${string}`, id: bigint): Promise<bigint> {
1254
+ return this.contract.read.balanceOf([account, id] as const) as Promise<bigint>;
1255
+ }
1256
+
1257
+ /**
1258
+ * balanceOfBatch
1259
+ * view
1260
+ */
1261
+ async balanceOfBatch(accounts: `0x${string}`[], ids: bigint[]): Promise<bigint[]> {
1262
+ return this.contract.read.balanceOfBatch([accounts, ids] as const) as Promise<bigint[]>;
1263
+ }
1264
+
1265
+ /**
1266
+ * baseURI
1267
+ * view
1268
+ */
1269
+ async baseURI(): Promise<string> {
1270
+ return this.contract.read.baseURI() as Promise<string>;
1271
+ }
1272
+
1273
+ /**
1274
+ * contractURI
1275
+ * view
1276
+ */
1277
+ async contractURI(): Promise<string> {
1278
+ return this.contract.read.contractURI() as Promise<string>;
1279
+ }
1280
+
1281
+ /**
1282
+ * getCreators
1283
+ * view
1284
+ */
1285
+ async getCreators(_id: bigint): Promise<LibPart_Part[]> {
1286
+ return this.contract.read.getCreators([_id] as const) as Promise<LibPart_Part[]>;
1287
+ }
1288
+
1289
+ /**
1290
+ * getRaribleV2Royalties
1291
+ * view
1292
+ */
1293
+ async getRaribleV2Royalties(id: bigint): Promise<LibPart_Part[]> {
1294
+ return this.contract.read.getRaribleV2Royalties([id] as const) as Promise<LibPart_Part[]>;
1295
+ }
1296
+
1297
+ /**
1298
+ * isApprovedForAll
1299
+ * view
1300
+ */
1301
+ async isApprovedForAll(_owner: `0x${string}`, _operator: `0x${string}`): Promise<boolean> {
1302
+ return this.contract.read.isApprovedForAll([_owner, _operator] as const) as Promise<boolean>;
1303
+ }
1304
+
1305
+ /**
1306
+ * isMinter
1307
+ * view
1308
+ */
1309
+ async isMinter(account: `0x${string}`): Promise<boolean> {
1310
+ return this.contract.read.isMinter([account] as const) as Promise<boolean>;
1311
+ }
1312
+
1313
+ /**
1314
+ * name
1315
+ * view
1316
+ */
1317
+ async name(): Promise<string> {
1318
+ return this.contract.read.name() as Promise<string>;
1319
+ }
1320
+
1321
+ /**
1322
+ * owner
1323
+ * view
1324
+ */
1325
+ async owner(): Promise<`0x${string}`> {
1326
+ return this.contract.read.owner() as Promise<`0x${string}`>;
1327
+ }
1328
+
1329
+ /**
1330
+ * royaltyInfo
1331
+ * view
1332
+ */
1333
+ async royaltyInfo(id: bigint, _salePrice: bigint): Promise<[`0x${string}`, bigint]> {
1334
+ return this.contract.read.royaltyInfo([id, _salePrice] as const) as Promise<[`0x${string}`, bigint]>;
1335
+ }
1336
+
1337
+ /**
1338
+ * supportsInterface
1339
+ * view
1340
+ */
1341
+ async supportsInterface(interfaceId: `0x${string}`): Promise<boolean> {
1342
+ return this.contract.read.supportsInterface([interfaceId] as const) as Promise<boolean>;
1343
+ }
1344
+
1345
+ /**
1346
+ * symbol
1347
+ * view
1348
+ */
1349
+ async symbol(): Promise<string> {
1350
+ return this.contract.read.symbol() as Promise<string>;
1351
+ }
1352
+
1353
+ /**
1354
+ * uri
1355
+ * view
1356
+ */
1357
+ async uri(id: bigint): Promise<string> {
1358
+ return this.contract.read.uri([id] as const) as Promise<string>;
1359
+ }
1360
+
1361
+ /**
1362
+ * __ERC1155RaribleUser_init
1363
+ * nonpayable
1364
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1365
+ */
1366
+ async __ERC1155RaribleUser_init(_name: string, _symbol: string, baseURI: string, contractURI: string, operators: `0x${string}`[], transferProxy: `0x${string}`, lazyTransferProxy: `0x${string}`, options?: {
1367
+ accessList?: import('viem').AccessList;
1368
+ authorizationList?: import('viem').AuthorizationList;
1369
+ chain?: import('viem').Chain | null;
1370
+ dataSuffix?: `0x${string}`;
1371
+ gas?: bigint;
1372
+ gasPrice?: bigint;
1373
+ maxFeePerGas?: bigint;
1374
+ maxPriorityFeePerGas?: bigint;
1375
+ nonce?: number;
1376
+ value?: bigint;
1377
+ }): Promise<`0x${string}`> {
1378
+ if (!this.contract.write) {
1379
+ throw new Error('Wallet client is required for write operations');
1380
+ }
1381
+ return this.contract.write.__ERC1155RaribleUser_init([_name, _symbol, baseURI, contractURI, operators, transferProxy, lazyTransferProxy] as const, options) as Promise<`0x${string}`>;
1382
+ }
1383
+
1384
+ /**
1385
+ * __ERC1155Rarible_init
1386
+ * nonpayable
1387
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1388
+ */
1389
+ async __ERC1155Rarible_init(_name: string, _symbol: string, baseURI: string, contractURI: string, transferProxy: `0x${string}`, lazyTransferProxy: `0x${string}`, options?: {
1390
+ accessList?: import('viem').AccessList;
1391
+ authorizationList?: import('viem').AuthorizationList;
1392
+ chain?: import('viem').Chain | null;
1393
+ dataSuffix?: `0x${string}`;
1394
+ gas?: bigint;
1395
+ gasPrice?: bigint;
1396
+ maxFeePerGas?: bigint;
1397
+ maxPriorityFeePerGas?: bigint;
1398
+ nonce?: number;
1399
+ value?: bigint;
1400
+ }): Promise<`0x${string}`> {
1401
+ if (!this.contract.write) {
1402
+ throw new Error('Wallet client is required for write operations');
1403
+ }
1404
+ return this.contract.write.__ERC1155Rarible_init([_name, _symbol, baseURI, contractURI, transferProxy, lazyTransferProxy] as const, options) as Promise<`0x${string}`>;
1405
+ }
1406
+
1407
+ /**
1408
+ * addMinter
1409
+ * nonpayable
1410
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1411
+ */
1412
+ async addMinter(minter: `0x${string}`, options?: {
1413
+ accessList?: import('viem').AccessList;
1414
+ authorizationList?: import('viem').AuthorizationList;
1415
+ chain?: import('viem').Chain | null;
1416
+ dataSuffix?: `0x${string}`;
1417
+ gas?: bigint;
1418
+ gasPrice?: bigint;
1419
+ maxFeePerGas?: bigint;
1420
+ maxPriorityFeePerGas?: bigint;
1421
+ nonce?: number;
1422
+ value?: bigint;
1423
+ }): Promise<`0x${string}`> {
1424
+ if (!this.contract.write) {
1425
+ throw new Error('Wallet client is required for write operations');
1426
+ }
1427
+ return this.contract.write.addMinter([minter] as const, options) as Promise<`0x${string}`>;
1428
+ }
1429
+
1430
+ /**
1431
+ * addMinters
1432
+ * nonpayable
1433
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1434
+ */
1435
+ async addMinters(minters: `0x${string}`[], options?: {
1436
+ accessList?: import('viem').AccessList;
1437
+ authorizationList?: import('viem').AuthorizationList;
1438
+ chain?: import('viem').Chain | null;
1439
+ dataSuffix?: `0x${string}`;
1440
+ gas?: bigint;
1441
+ gasPrice?: bigint;
1442
+ maxFeePerGas?: bigint;
1443
+ maxPriorityFeePerGas?: bigint;
1444
+ nonce?: number;
1445
+ value?: bigint;
1446
+ }): Promise<`0x${string}`> {
1447
+ if (!this.contract.write) {
1448
+ throw new Error('Wallet client is required for write operations');
1449
+ }
1450
+ return this.contract.write.addMinters([minters] as const, options) as Promise<`0x${string}`>;
1451
+ }
1452
+
1453
+ /**
1454
+ * burn
1455
+ * nonpayable
1456
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1457
+ */
1458
+ async burn(account: `0x${string}`, id: bigint, amount: bigint, options?: {
1459
+ accessList?: import('viem').AccessList;
1460
+ authorizationList?: import('viem').AuthorizationList;
1461
+ chain?: import('viem').Chain | null;
1462
+ dataSuffix?: `0x${string}`;
1463
+ gas?: bigint;
1464
+ gasPrice?: bigint;
1465
+ maxFeePerGas?: bigint;
1466
+ maxPriorityFeePerGas?: bigint;
1467
+ nonce?: number;
1468
+ value?: bigint;
1469
+ }): Promise<`0x${string}`> {
1470
+ if (!this.contract.write) {
1471
+ throw new Error('Wallet client is required for write operations');
1472
+ }
1473
+ return this.contract.write.burn([account, id, amount] as const, options) as Promise<`0x${string}`>;
1474
+ }
1475
+
1476
+ /**
1477
+ * burnBatch
1478
+ * nonpayable
1479
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1480
+ */
1481
+ async burnBatch(account: `0x${string}`, ids: bigint[], amounts: bigint[], options?: {
1482
+ accessList?: import('viem').AccessList;
1483
+ authorizationList?: import('viem').AuthorizationList;
1484
+ chain?: import('viem').Chain | null;
1485
+ dataSuffix?: `0x${string}`;
1486
+ gas?: bigint;
1487
+ gasPrice?: bigint;
1488
+ maxFeePerGas?: bigint;
1489
+ maxPriorityFeePerGas?: bigint;
1490
+ nonce?: number;
1491
+ value?: bigint;
1492
+ }): Promise<`0x${string}`> {
1493
+ if (!this.contract.write) {
1494
+ throw new Error('Wallet client is required for write operations');
1495
+ }
1496
+ return this.contract.write.burnBatch([account, ids, amounts] as const, options) as Promise<`0x${string}`>;
1497
+ }
1498
+
1499
+ /**
1500
+ * mintAndTransfer
1501
+ * nonpayable
1502
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1503
+ */
1504
+ async mintAndTransfer(data: LibERC1155LazyMint_Mint1155Data, to: `0x${string}`, _amount: bigint, options?: {
1505
+ accessList?: import('viem').AccessList;
1506
+ authorizationList?: import('viem').AuthorizationList;
1507
+ chain?: import('viem').Chain | null;
1508
+ dataSuffix?: `0x${string}`;
1509
+ gas?: bigint;
1510
+ gasPrice?: bigint;
1511
+ maxFeePerGas?: bigint;
1512
+ maxPriorityFeePerGas?: bigint;
1513
+ nonce?: number;
1514
+ value?: bigint;
1515
+ }): Promise<`0x${string}`> {
1516
+ if (!this.contract.write) {
1517
+ throw new Error('Wallet client is required for write operations');
1518
+ }
1519
+ return this.contract.write.mintAndTransfer([data, to, _amount] as const, options) as Promise<`0x${string}`>;
1520
+ }
1521
+
1522
+ /**
1523
+ * removeMinter
1524
+ * nonpayable
1525
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1526
+ */
1527
+ async removeMinter(_minter: `0x${string}`, options?: {
1528
+ accessList?: import('viem').AccessList;
1529
+ authorizationList?: import('viem').AuthorizationList;
1530
+ chain?: import('viem').Chain | null;
1531
+ dataSuffix?: `0x${string}`;
1532
+ gas?: bigint;
1533
+ gasPrice?: bigint;
1534
+ maxFeePerGas?: bigint;
1535
+ maxPriorityFeePerGas?: bigint;
1536
+ nonce?: number;
1537
+ value?: bigint;
1538
+ }): Promise<`0x${string}`> {
1539
+ if (!this.contract.write) {
1540
+ throw new Error('Wallet client is required for write operations');
1541
+ }
1542
+ return this.contract.write.removeMinter([_minter] as const, options) as Promise<`0x${string}`>;
1543
+ }
1544
+
1545
+ /**
1546
+ * renounceOwnership
1547
+ * nonpayable
1548
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1549
+ */
1550
+ async renounceOwnership(options?: {
1551
+ accessList?: import('viem').AccessList;
1552
+ authorizationList?: import('viem').AuthorizationList;
1553
+ chain?: import('viem').Chain | null;
1554
+ dataSuffix?: `0x${string}`;
1555
+ gas?: bigint;
1556
+ gasPrice?: bigint;
1557
+ maxFeePerGas?: bigint;
1558
+ maxPriorityFeePerGas?: bigint;
1559
+ nonce?: number;
1560
+ value?: bigint;
1561
+ }): Promise<`0x${string}`> {
1562
+ if (!this.contract.write) {
1563
+ throw new Error('Wallet client is required for write operations');
1564
+ }
1565
+ return this.contract.write.renounceOwnership(options) as Promise<`0x${string}`>;
1566
+ }
1567
+
1568
+ /**
1569
+ * safeBatchTransferFrom
1570
+ * nonpayable
1571
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1572
+ */
1573
+ async safeBatchTransferFrom(from: `0x${string}`, to: `0x${string}`, ids: bigint[], amounts: bigint[], data: `0x${string}`, options?: {
1574
+ accessList?: import('viem').AccessList;
1575
+ authorizationList?: import('viem').AuthorizationList;
1576
+ chain?: import('viem').Chain | null;
1577
+ dataSuffix?: `0x${string}`;
1578
+ gas?: bigint;
1579
+ gasPrice?: bigint;
1580
+ maxFeePerGas?: bigint;
1581
+ maxPriorityFeePerGas?: bigint;
1582
+ nonce?: number;
1583
+ value?: bigint;
1584
+ }): Promise<`0x${string}`> {
1585
+ if (!this.contract.write) {
1586
+ throw new Error('Wallet client is required for write operations');
1587
+ }
1588
+ return this.contract.write.safeBatchTransferFrom([from, to, ids, amounts, data] as const, options) as Promise<`0x${string}`>;
1589
+ }
1590
+
1591
+ /**
1592
+ * safeTransferFrom
1593
+ * nonpayable
1594
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1595
+ */
1596
+ async safeTransferFrom(from: `0x${string}`, to: `0x${string}`, id: bigint, amount: bigint, data: `0x${string}`, options?: {
1597
+ accessList?: import('viem').AccessList;
1598
+ authorizationList?: import('viem').AuthorizationList;
1599
+ chain?: import('viem').Chain | null;
1600
+ dataSuffix?: `0x${string}`;
1601
+ gas?: bigint;
1602
+ gasPrice?: bigint;
1603
+ maxFeePerGas?: bigint;
1604
+ maxPriorityFeePerGas?: bigint;
1605
+ nonce?: number;
1606
+ value?: bigint;
1607
+ }): Promise<`0x${string}`> {
1608
+ if (!this.contract.write) {
1609
+ throw new Error('Wallet client is required for write operations');
1610
+ }
1611
+ return this.contract.write.safeTransferFrom([from, to, id, amount, data] as const, options) as Promise<`0x${string}`>;
1612
+ }
1613
+
1614
+ /**
1615
+ * setApprovalForAll
1616
+ * nonpayable
1617
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1618
+ */
1619
+ async setApprovalForAll(operator: `0x${string}`, approved: boolean, options?: {
1620
+ accessList?: import('viem').AccessList;
1621
+ authorizationList?: import('viem').AuthorizationList;
1622
+ chain?: import('viem').Chain | null;
1623
+ dataSuffix?: `0x${string}`;
1624
+ gas?: bigint;
1625
+ gasPrice?: bigint;
1626
+ maxFeePerGas?: bigint;
1627
+ maxPriorityFeePerGas?: bigint;
1628
+ nonce?: number;
1629
+ value?: bigint;
1630
+ }): Promise<`0x${string}`> {
1631
+ if (!this.contract.write) {
1632
+ throw new Error('Wallet client is required for write operations');
1633
+ }
1634
+ return this.contract.write.setApprovalForAll([operator, approved] as const, options) as Promise<`0x${string}`>;
1635
+ }
1636
+
1637
+ /**
1638
+ * setBaseURI
1639
+ * nonpayable
1640
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1641
+ */
1642
+ async setBaseURI(newBaseURI: string, options?: {
1643
+ accessList?: import('viem').AccessList;
1644
+ authorizationList?: import('viem').AuthorizationList;
1645
+ chain?: import('viem').Chain | null;
1646
+ dataSuffix?: `0x${string}`;
1647
+ gas?: bigint;
1648
+ gasPrice?: bigint;
1649
+ maxFeePerGas?: bigint;
1650
+ maxPriorityFeePerGas?: bigint;
1651
+ nonce?: number;
1652
+ value?: bigint;
1653
+ }): Promise<`0x${string}`> {
1654
+ if (!this.contract.write) {
1655
+ throw new Error('Wallet client is required for write operations');
1656
+ }
1657
+ return this.contract.write.setBaseURI([newBaseURI] as const, options) as Promise<`0x${string}`>;
1658
+ }
1659
+
1660
+ /**
1661
+ * transferFromOrMint
1662
+ * nonpayable
1663
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1664
+ */
1665
+ async transferFromOrMint(data: LibERC1155LazyMint_Mint1155Data, from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
1666
+ accessList?: import('viem').AccessList;
1667
+ authorizationList?: import('viem').AuthorizationList;
1668
+ chain?: import('viem').Chain | null;
1669
+ dataSuffix?: `0x${string}`;
1670
+ gas?: bigint;
1671
+ gasPrice?: bigint;
1672
+ maxFeePerGas?: bigint;
1673
+ maxPriorityFeePerGas?: bigint;
1674
+ nonce?: number;
1675
+ value?: bigint;
1676
+ }): Promise<`0x${string}`> {
1677
+ if (!this.contract.write) {
1678
+ throw new Error('Wallet client is required for write operations');
1679
+ }
1680
+ return this.contract.write.transferFromOrMint([data, from, to, amount] as const, options) as Promise<`0x${string}`>;
1681
+ }
1682
+
1683
+ /**
1684
+ * transferOwnership
1685
+ * nonpayable
1686
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1687
+ */
1688
+ async transferOwnership(newOwner: `0x${string}`, options?: {
1689
+ accessList?: import('viem').AccessList;
1690
+ authorizationList?: import('viem').AuthorizationList;
1691
+ chain?: import('viem').Chain | null;
1692
+ dataSuffix?: `0x${string}`;
1693
+ gas?: bigint;
1694
+ gasPrice?: bigint;
1695
+ maxFeePerGas?: bigint;
1696
+ maxPriorityFeePerGas?: bigint;
1697
+ nonce?: number;
1698
+ value?: bigint;
1699
+ }): Promise<`0x${string}`> {
1700
+ if (!this.contract.write) {
1701
+ throw new Error('Wallet client is required for write operations');
1702
+ }
1703
+ return this.contract.write.transferOwnership([newOwner] as const, options) as Promise<`0x${string}`>;
1704
+ }
1705
+
1706
+ /**
1707
+ * updateAccount
1708
+ * nonpayable
1709
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1710
+ */
1711
+ async updateAccount(_id: bigint, _from: `0x${string}`, _to: `0x${string}`, options?: {
1712
+ accessList?: import('viem').AccessList;
1713
+ authorizationList?: import('viem').AuthorizationList;
1714
+ chain?: import('viem').Chain | null;
1715
+ dataSuffix?: `0x${string}`;
1716
+ gas?: bigint;
1717
+ gasPrice?: bigint;
1718
+ maxFeePerGas?: bigint;
1719
+ maxPriorityFeePerGas?: bigint;
1720
+ nonce?: number;
1721
+ value?: bigint;
1722
+ }): Promise<`0x${string}`> {
1723
+ if (!this.contract.write) {
1724
+ throw new Error('Wallet client is required for write operations');
1725
+ }
1726
+ return this.contract.write.updateAccount([_id, _from, _to] as const, options) as Promise<`0x${string}`>;
1727
+ }
1728
+
1729
+
1730
+
1731
+ /**
1732
+ * Simulate contract write operations (dry-run without sending transaction)
1733
+ *
1734
+ * @example
1735
+ * const result = await contract.simulate.transfer('0x...', 1000n);
1736
+ * console.log('Gas estimate:', result.request.gas);
1737
+ * console.log('Would succeed:', result.result);
1738
+ */
1739
+ get simulate() {
1740
+ const contract = this.contract;
1741
+ if (!contract.simulate) {
1742
+ throw new Error('Public client is required for simulation');
1743
+ }
1744
+ return {
1745
+ /**
1746
+ * Simulate __ERC1155RaribleUser_init
1747
+ * Returns gas estimate and result without sending transaction
1748
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1749
+ */
1750
+ async __ERC1155RaribleUser_init(_name: string, _symbol: string, baseURI: string, contractURI: string, operators: `0x${string}`[], transferProxy: `0x${string}`, lazyTransferProxy: `0x${string}`, options?: {
1751
+ accessList?: import('viem').AccessList;
1752
+ authorizationList?: import('viem').AuthorizationList;
1753
+ chain?: import('viem').Chain | null;
1754
+ dataSuffix?: `0x${string}`;
1755
+ gas?: bigint;
1756
+ gasPrice?: bigint;
1757
+ maxFeePerGas?: bigint;
1758
+ maxPriorityFeePerGas?: bigint;
1759
+ nonce?: number;
1760
+ value?: bigint;
1761
+ }): Promise<void> {
1762
+ return contract.simulate.__ERC1155RaribleUser_init([_name, _symbol, baseURI, contractURI, operators, transferProxy, lazyTransferProxy] as const, options) as Promise<void>;
1763
+ },
1764
+ /**
1765
+ * Simulate __ERC1155Rarible_init
1766
+ * Returns gas estimate and result without sending transaction
1767
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1768
+ */
1769
+ async __ERC1155Rarible_init(_name: string, _symbol: string, baseURI: string, contractURI: string, transferProxy: `0x${string}`, lazyTransferProxy: `0x${string}`, options?: {
1770
+ accessList?: import('viem').AccessList;
1771
+ authorizationList?: import('viem').AuthorizationList;
1772
+ chain?: import('viem').Chain | null;
1773
+ dataSuffix?: `0x${string}`;
1774
+ gas?: bigint;
1775
+ gasPrice?: bigint;
1776
+ maxFeePerGas?: bigint;
1777
+ maxPriorityFeePerGas?: bigint;
1778
+ nonce?: number;
1779
+ value?: bigint;
1780
+ }): Promise<void> {
1781
+ return contract.simulate.__ERC1155Rarible_init([_name, _symbol, baseURI, contractURI, transferProxy, lazyTransferProxy] as const, options) as Promise<void>;
1782
+ },
1783
+ /**
1784
+ * Simulate addMinter
1785
+ * Returns gas estimate and result without sending transaction
1786
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1787
+ */
1788
+ async addMinter(minter: `0x${string}`, options?: {
1789
+ accessList?: import('viem').AccessList;
1790
+ authorizationList?: import('viem').AuthorizationList;
1791
+ chain?: import('viem').Chain | null;
1792
+ dataSuffix?: `0x${string}`;
1793
+ gas?: bigint;
1794
+ gasPrice?: bigint;
1795
+ maxFeePerGas?: bigint;
1796
+ maxPriorityFeePerGas?: bigint;
1797
+ nonce?: number;
1798
+ value?: bigint;
1799
+ }): Promise<void> {
1800
+ return contract.simulate.addMinter([minter] as const, options) as Promise<void>;
1801
+ },
1802
+ /**
1803
+ * Simulate addMinters
1804
+ * Returns gas estimate and result without sending transaction
1805
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1806
+ */
1807
+ async addMinters(minters: `0x${string}`[], options?: {
1808
+ accessList?: import('viem').AccessList;
1809
+ authorizationList?: import('viem').AuthorizationList;
1810
+ chain?: import('viem').Chain | null;
1811
+ dataSuffix?: `0x${string}`;
1812
+ gas?: bigint;
1813
+ gasPrice?: bigint;
1814
+ maxFeePerGas?: bigint;
1815
+ maxPriorityFeePerGas?: bigint;
1816
+ nonce?: number;
1817
+ value?: bigint;
1818
+ }): Promise<void> {
1819
+ return contract.simulate.addMinters([minters] as const, options) as Promise<void>;
1820
+ },
1821
+ /**
1822
+ * Simulate burn
1823
+ * Returns gas estimate and result without sending transaction
1824
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1825
+ */
1826
+ async burn(account: `0x${string}`, id: bigint, amount: bigint, options?: {
1827
+ accessList?: import('viem').AccessList;
1828
+ authorizationList?: import('viem').AuthorizationList;
1829
+ chain?: import('viem').Chain | null;
1830
+ dataSuffix?: `0x${string}`;
1831
+ gas?: bigint;
1832
+ gasPrice?: bigint;
1833
+ maxFeePerGas?: bigint;
1834
+ maxPriorityFeePerGas?: bigint;
1835
+ nonce?: number;
1836
+ value?: bigint;
1837
+ }): Promise<void> {
1838
+ return contract.simulate.burn([account, id, amount] as const, options) as Promise<void>;
1839
+ },
1840
+ /**
1841
+ * Simulate burnBatch
1842
+ * Returns gas estimate and result without sending transaction
1843
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1844
+ */
1845
+ async burnBatch(account: `0x${string}`, ids: bigint[], amounts: bigint[], options?: {
1846
+ accessList?: import('viem').AccessList;
1847
+ authorizationList?: import('viem').AuthorizationList;
1848
+ chain?: import('viem').Chain | null;
1849
+ dataSuffix?: `0x${string}`;
1850
+ gas?: bigint;
1851
+ gasPrice?: bigint;
1852
+ maxFeePerGas?: bigint;
1853
+ maxPriorityFeePerGas?: bigint;
1854
+ nonce?: number;
1855
+ value?: bigint;
1856
+ }): Promise<void> {
1857
+ return contract.simulate.burnBatch([account, ids, amounts] as const, options) as Promise<void>;
1858
+ },
1859
+ /**
1860
+ * Simulate mintAndTransfer
1861
+ * Returns gas estimate and result without sending transaction
1862
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1863
+ */
1864
+ async mintAndTransfer(data: LibERC1155LazyMint_Mint1155Data, to: `0x${string}`, _amount: bigint, options?: {
1865
+ accessList?: import('viem').AccessList;
1866
+ authorizationList?: import('viem').AuthorizationList;
1867
+ chain?: import('viem').Chain | null;
1868
+ dataSuffix?: `0x${string}`;
1869
+ gas?: bigint;
1870
+ gasPrice?: bigint;
1871
+ maxFeePerGas?: bigint;
1872
+ maxPriorityFeePerGas?: bigint;
1873
+ nonce?: number;
1874
+ value?: bigint;
1875
+ }): Promise<void> {
1876
+ return contract.simulate.mintAndTransfer([data, to, _amount] as const, options) as Promise<void>;
1877
+ },
1878
+ /**
1879
+ * Simulate removeMinter
1880
+ * Returns gas estimate and result without sending transaction
1881
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1882
+ */
1883
+ async removeMinter(_minter: `0x${string}`, options?: {
1884
+ accessList?: import('viem').AccessList;
1885
+ authorizationList?: import('viem').AuthorizationList;
1886
+ chain?: import('viem').Chain | null;
1887
+ dataSuffix?: `0x${string}`;
1888
+ gas?: bigint;
1889
+ gasPrice?: bigint;
1890
+ maxFeePerGas?: bigint;
1891
+ maxPriorityFeePerGas?: bigint;
1892
+ nonce?: number;
1893
+ value?: bigint;
1894
+ }): Promise<void> {
1895
+ return contract.simulate.removeMinter([_minter] as const, options) as Promise<void>;
1896
+ },
1897
+ /**
1898
+ * Simulate renounceOwnership
1899
+ * Returns gas estimate and result without sending transaction
1900
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1901
+ */
1902
+ async renounceOwnership(options?: {
1903
+ accessList?: import('viem').AccessList;
1904
+ authorizationList?: import('viem').AuthorizationList;
1905
+ chain?: import('viem').Chain | null;
1906
+ dataSuffix?: `0x${string}`;
1907
+ gas?: bigint;
1908
+ gasPrice?: bigint;
1909
+ maxFeePerGas?: bigint;
1910
+ maxPriorityFeePerGas?: bigint;
1911
+ nonce?: number;
1912
+ value?: bigint;
1913
+ }): Promise<void> {
1914
+ return contract.simulate.renounceOwnership(options) as Promise<void>;
1915
+ },
1916
+ /**
1917
+ * Simulate safeBatchTransferFrom
1918
+ * Returns gas estimate and result without sending transaction
1919
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1920
+ */
1921
+ async safeBatchTransferFrom(from: `0x${string}`, to: `0x${string}`, ids: bigint[], amounts: bigint[], data: `0x${string}`, options?: {
1922
+ accessList?: import('viem').AccessList;
1923
+ authorizationList?: import('viem').AuthorizationList;
1924
+ chain?: import('viem').Chain | null;
1925
+ dataSuffix?: `0x${string}`;
1926
+ gas?: bigint;
1927
+ gasPrice?: bigint;
1928
+ maxFeePerGas?: bigint;
1929
+ maxPriorityFeePerGas?: bigint;
1930
+ nonce?: number;
1931
+ value?: bigint;
1932
+ }): Promise<void> {
1933
+ return contract.simulate.safeBatchTransferFrom([from, to, ids, amounts, data] as const, options) as Promise<void>;
1934
+ },
1935
+ /**
1936
+ * Simulate safeTransferFrom
1937
+ * Returns gas estimate and result without sending transaction
1938
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1939
+ */
1940
+ async safeTransferFrom(from: `0x${string}`, to: `0x${string}`, id: bigint, amount: bigint, data: `0x${string}`, options?: {
1941
+ accessList?: import('viem').AccessList;
1942
+ authorizationList?: import('viem').AuthorizationList;
1943
+ chain?: import('viem').Chain | null;
1944
+ dataSuffix?: `0x${string}`;
1945
+ gas?: bigint;
1946
+ gasPrice?: bigint;
1947
+ maxFeePerGas?: bigint;
1948
+ maxPriorityFeePerGas?: bigint;
1949
+ nonce?: number;
1950
+ value?: bigint;
1951
+ }): Promise<void> {
1952
+ return contract.simulate.safeTransferFrom([from, to, id, amount, data] as const, options) as Promise<void>;
1953
+ },
1954
+ /**
1955
+ * Simulate setApprovalForAll
1956
+ * Returns gas estimate and result without sending transaction
1957
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1958
+ */
1959
+ async setApprovalForAll(operator: `0x${string}`, approved: boolean, options?: {
1960
+ accessList?: import('viem').AccessList;
1961
+ authorizationList?: import('viem').AuthorizationList;
1962
+ chain?: import('viem').Chain | null;
1963
+ dataSuffix?: `0x${string}`;
1964
+ gas?: bigint;
1965
+ gasPrice?: bigint;
1966
+ maxFeePerGas?: bigint;
1967
+ maxPriorityFeePerGas?: bigint;
1968
+ nonce?: number;
1969
+ value?: bigint;
1970
+ }): Promise<void> {
1971
+ return contract.simulate.setApprovalForAll([operator, approved] as const, options) as Promise<void>;
1972
+ },
1973
+ /**
1974
+ * Simulate setBaseURI
1975
+ * Returns gas estimate and result without sending transaction
1976
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1977
+ */
1978
+ async setBaseURI(newBaseURI: string, options?: {
1979
+ accessList?: import('viem').AccessList;
1980
+ authorizationList?: import('viem').AuthorizationList;
1981
+ chain?: import('viem').Chain | null;
1982
+ dataSuffix?: `0x${string}`;
1983
+ gas?: bigint;
1984
+ gasPrice?: bigint;
1985
+ maxFeePerGas?: bigint;
1986
+ maxPriorityFeePerGas?: bigint;
1987
+ nonce?: number;
1988
+ value?: bigint;
1989
+ }): Promise<void> {
1990
+ return contract.simulate.setBaseURI([newBaseURI] as const, options) as Promise<void>;
1991
+ },
1992
+ /**
1993
+ * Simulate transferFromOrMint
1994
+ * Returns gas estimate and result without sending transaction
1995
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1996
+ */
1997
+ async transferFromOrMint(data: LibERC1155LazyMint_Mint1155Data, from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
1998
+ accessList?: import('viem').AccessList;
1999
+ authorizationList?: import('viem').AuthorizationList;
2000
+ chain?: import('viem').Chain | null;
2001
+ dataSuffix?: `0x${string}`;
2002
+ gas?: bigint;
2003
+ gasPrice?: bigint;
2004
+ maxFeePerGas?: bigint;
2005
+ maxPriorityFeePerGas?: bigint;
2006
+ nonce?: number;
2007
+ value?: bigint;
2008
+ }): Promise<void> {
2009
+ return contract.simulate.transferFromOrMint([data, from, to, amount] as const, options) as Promise<void>;
2010
+ },
2011
+ /**
2012
+ * Simulate transferOwnership
2013
+ * Returns gas estimate and result without sending transaction
2014
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2015
+ */
2016
+ async transferOwnership(newOwner: `0x${string}`, options?: {
2017
+ accessList?: import('viem').AccessList;
2018
+ authorizationList?: import('viem').AuthorizationList;
2019
+ chain?: import('viem').Chain | null;
2020
+ dataSuffix?: `0x${string}`;
2021
+ gas?: bigint;
2022
+ gasPrice?: bigint;
2023
+ maxFeePerGas?: bigint;
2024
+ maxPriorityFeePerGas?: bigint;
2025
+ nonce?: number;
2026
+ value?: bigint;
2027
+ }): Promise<void> {
2028
+ return contract.simulate.transferOwnership([newOwner] as const, options) as Promise<void>;
2029
+ },
2030
+ /**
2031
+ * Simulate updateAccount
2032
+ * Returns gas estimate and result without sending transaction
2033
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2034
+ */
2035
+ async updateAccount(_id: bigint, _from: `0x${string}`, _to: `0x${string}`, options?: {
2036
+ accessList?: import('viem').AccessList;
2037
+ authorizationList?: import('viem').AuthorizationList;
2038
+ chain?: import('viem').Chain | null;
2039
+ dataSuffix?: `0x${string}`;
2040
+ gas?: bigint;
2041
+ gasPrice?: bigint;
2042
+ maxFeePerGas?: bigint;
2043
+ maxPriorityFeePerGas?: bigint;
2044
+ nonce?: number;
2045
+ value?: bigint;
2046
+ }): Promise<void> {
2047
+ return contract.simulate.updateAccount([_id, _from, _to] as const, options) as Promise<void>;
2048
+ }
2049
+ };
2050
+ }
2051
+
2052
+ /**
2053
+ * Watch contract events
2054
+ *
2055
+ * @example
2056
+ * // Watch all Transfer events
2057
+ * const unwatch = contract.watch.Transfer((event) => {
2058
+ * console.log('Transfer:', event);
2059
+ * });
2060
+ *
2061
+ * // Stop watching
2062
+ * unwatch();
2063
+ */
2064
+ get watch() {
2065
+ return {
2066
+ /**
2067
+ * Watch ApprovalForAll events
2068
+ * @param callback Function to call when event is emitted
2069
+ * @param filter Optional filter for indexed parameters
2070
+ * @returns Unwatch function to stop listening
2071
+ */
2072
+ ApprovalForAll: (callback: (event: { account: `0x${string}`; operator: `0x${string}`; approved: boolean }) => void, filter?: { account: `0x${string}`; operator: `0x${string}` }) => {
2073
+ return this.publicClient.watchContractEvent({
2074
+ address: this.contractAddress,
2075
+ abi: ERC1155Rarible_jsonAbi,
2076
+ eventName: 'ApprovalForAll',
2077
+ args: filter,
2078
+ onLogs: (logs: any[]) => {
2079
+ logs.forEach((log: any) => {
2080
+ callback(log.args as any);
2081
+ });
2082
+ },
2083
+ }) as () => void;
2084
+ },
2085
+ /**
2086
+ * Watch BaseUriChanged events
2087
+ * @param callback Function to call when event is emitted
2088
+ * @param filter Optional filter for indexed parameters
2089
+ * @returns Unwatch function to stop listening
2090
+ */
2091
+ BaseUriChanged: (callback: (event: { newBaseURI: string }) => void) => {
2092
+ return this.publicClient.watchContractEvent({
2093
+ address: this.contractAddress,
2094
+ abi: ERC1155Rarible_jsonAbi,
2095
+ eventName: 'BaseUriChanged',
2096
+
2097
+ onLogs: (logs: any[]) => {
2098
+ logs.forEach((log: any) => {
2099
+ callback(log.args as any);
2100
+ });
2101
+ },
2102
+ }) as () => void;
2103
+ },
2104
+ /**
2105
+ * Watch BurnLazy events
2106
+ * @param callback Function to call when event is emitted
2107
+ * @param filter Optional filter for indexed parameters
2108
+ * @returns Unwatch function to stop listening
2109
+ */
2110
+ BurnLazy: (callback: (event: { operator: `0x${string}`; account: `0x${string}`; id: bigint; amount: bigint }) => void, filter?: { operator: `0x${string}`; account: `0x${string}` }) => {
2111
+ return this.publicClient.watchContractEvent({
2112
+ address: this.contractAddress,
2113
+ abi: ERC1155Rarible_jsonAbi,
2114
+ eventName: 'BurnLazy',
2115
+ args: filter,
2116
+ onLogs: (logs: any[]) => {
2117
+ logs.forEach((log: any) => {
2118
+ callback(log.args as any);
2119
+ });
2120
+ },
2121
+ }) as () => void;
2122
+ },
2123
+ /**
2124
+ * Watch BurnLazyBatch events
2125
+ * @param callback Function to call when event is emitted
2126
+ * @param filter Optional filter for indexed parameters
2127
+ * @returns Unwatch function to stop listening
2128
+ */
2129
+ BurnLazyBatch: (callback: (event: { operator: `0x${string}`; account: `0x${string}`; ids: bigint[]; amounts: bigint[] }) => void, filter?: { operator: `0x${string}`; account: `0x${string}` }) => {
2130
+ return this.publicClient.watchContractEvent({
2131
+ address: this.contractAddress,
2132
+ abi: ERC1155Rarible_jsonAbi,
2133
+ eventName: 'BurnLazyBatch',
2134
+ args: filter,
2135
+ onLogs: (logs: any[]) => {
2136
+ logs.forEach((log: any) => {
2137
+ callback(log.args as any);
2138
+ });
2139
+ },
2140
+ }) as () => void;
2141
+ },
2142
+ /**
2143
+ * Watch CreateERC1155Rarible events
2144
+ * @param callback Function to call when event is emitted
2145
+ * @param filter Optional filter for indexed parameters
2146
+ * @returns Unwatch function to stop listening
2147
+ */
2148
+ CreateERC1155Rarible: (callback: (event: { owner: `0x${string}`; name: string; symbol: string }) => void) => {
2149
+ return this.publicClient.watchContractEvent({
2150
+ address: this.contractAddress,
2151
+ abi: ERC1155Rarible_jsonAbi,
2152
+ eventName: 'CreateERC1155Rarible',
2153
+
2154
+ onLogs: (logs: any[]) => {
2155
+ logs.forEach((log: any) => {
2156
+ callback(log.args as any);
2157
+ });
2158
+ },
2159
+ }) as () => void;
2160
+ },
2161
+ /**
2162
+ * Watch CreateERC1155RaribleUser events
2163
+ * @param callback Function to call when event is emitted
2164
+ * @param filter Optional filter for indexed parameters
2165
+ * @returns Unwatch function to stop listening
2166
+ */
2167
+ CreateERC1155RaribleUser: (callback: (event: { owner: `0x${string}`; name: string; symbol: string }) => void) => {
2168
+ return this.publicClient.watchContractEvent({
2169
+ address: this.contractAddress,
2170
+ abi: ERC1155Rarible_jsonAbi,
2171
+ eventName: 'CreateERC1155RaribleUser',
2172
+
2173
+ onLogs: (logs: any[]) => {
2174
+ logs.forEach((log: any) => {
2175
+ callback(log.args as any);
2176
+ });
2177
+ },
2178
+ }) as () => void;
2179
+ },
2180
+ /**
2181
+ * Watch Creators events
2182
+ * @param callback Function to call when event is emitted
2183
+ * @param filter Optional filter for indexed parameters
2184
+ * @returns Unwatch function to stop listening
2185
+ */
2186
+ Creators: (callback: (event: { tokenId: bigint; creators: LibPart_Part[] }) => void) => {
2187
+ return this.publicClient.watchContractEvent({
2188
+ address: this.contractAddress,
2189
+ abi: ERC1155Rarible_jsonAbi,
2190
+ eventName: 'Creators',
2191
+
2192
+ onLogs: (logs: any[]) => {
2193
+ logs.forEach((log: any) => {
2194
+ callback(log.args as any);
2195
+ });
2196
+ },
2197
+ }) as () => void;
2198
+ },
2199
+ /**
2200
+ * Watch DefaultApproval events
2201
+ * @param callback Function to call when event is emitted
2202
+ * @param filter Optional filter for indexed parameters
2203
+ * @returns Unwatch function to stop listening
2204
+ */
2205
+ DefaultApproval: (callback: (event: { operator: `0x${string}`; hasApproval: boolean }) => void, filter?: { operator: `0x${string}` }) => {
2206
+ return this.publicClient.watchContractEvent({
2207
+ address: this.contractAddress,
2208
+ abi: ERC1155Rarible_jsonAbi,
2209
+ eventName: 'DefaultApproval',
2210
+ args: filter,
2211
+ onLogs: (logs: any[]) => {
2212
+ logs.forEach((log: any) => {
2213
+ callback(log.args as any);
2214
+ });
2215
+ },
2216
+ }) as () => void;
2217
+ },
2218
+ /**
2219
+ * Watch MinterStatusChanged events
2220
+ * @param callback Function to call when event is emitted
2221
+ * @param filter Optional filter for indexed parameters
2222
+ * @returns Unwatch function to stop listening
2223
+ */
2224
+ MinterStatusChanged: (callback: (event: { minter: `0x${string}`; status: boolean }) => void, filter?: { minter: `0x${string}`; status: boolean }) => {
2225
+ return this.publicClient.watchContractEvent({
2226
+ address: this.contractAddress,
2227
+ abi: ERC1155Rarible_jsonAbi,
2228
+ eventName: 'MinterStatusChanged',
2229
+ args: filter,
2230
+ onLogs: (logs: any[]) => {
2231
+ logs.forEach((log: any) => {
2232
+ callback(log.args as any);
2233
+ });
2234
+ },
2235
+ }) as () => void;
2236
+ },
2237
+ /**
2238
+ * Watch OwnershipTransferred events
2239
+ * @param callback Function to call when event is emitted
2240
+ * @param filter Optional filter for indexed parameters
2241
+ * @returns Unwatch function to stop listening
2242
+ */
2243
+ OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => {
2244
+ return this.publicClient.watchContractEvent({
2245
+ address: this.contractAddress,
2246
+ abi: ERC1155Rarible_jsonAbi,
2247
+ eventName: 'OwnershipTransferred',
2248
+ args: filter,
2249
+ onLogs: (logs: any[]) => {
2250
+ logs.forEach((log: any) => {
2251
+ callback(log.args as any);
2252
+ });
2253
+ },
2254
+ }) as () => void;
2255
+ },
2256
+ /**
2257
+ * Watch RoyaltiesSet events
2258
+ * @param callback Function to call when event is emitted
2259
+ * @param filter Optional filter for indexed parameters
2260
+ * @returns Unwatch function to stop listening
2261
+ */
2262
+ RoyaltiesSet: (callback: (event: { tokenId: bigint; royalties: LibPart_Part[] }) => void) => {
2263
+ return this.publicClient.watchContractEvent({
2264
+ address: this.contractAddress,
2265
+ abi: ERC1155Rarible_jsonAbi,
2266
+ eventName: 'RoyaltiesSet',
2267
+
2268
+ onLogs: (logs: any[]) => {
2269
+ logs.forEach((log: any) => {
2270
+ callback(log.args as any);
2271
+ });
2272
+ },
2273
+ }) as () => void;
2274
+ },
2275
+ /**
2276
+ * Watch Supply events
2277
+ * @param callback Function to call when event is emitted
2278
+ * @param filter Optional filter for indexed parameters
2279
+ * @returns Unwatch function to stop listening
2280
+ */
2281
+ Supply: (callback: (event: { tokenId: bigint; value: bigint }) => void) => {
2282
+ return this.publicClient.watchContractEvent({
2283
+ address: this.contractAddress,
2284
+ abi: ERC1155Rarible_jsonAbi,
2285
+ eventName: 'Supply',
2286
+
2287
+ onLogs: (logs: any[]) => {
2288
+ logs.forEach((log: any) => {
2289
+ callback(log.args as any);
2290
+ });
2291
+ },
2292
+ }) as () => void;
2293
+ },
2294
+ /**
2295
+ * Watch TransferBatch events
2296
+ * @param callback Function to call when event is emitted
2297
+ * @param filter Optional filter for indexed parameters
2298
+ * @returns Unwatch function to stop listening
2299
+ */
2300
+ TransferBatch: (callback: (event: { operator: `0x${string}`; from: `0x${string}`; to: `0x${string}`; ids: bigint[]; values: bigint[] }) => void, filter?: { operator: `0x${string}`; from: `0x${string}`; to: `0x${string}` }) => {
2301
+ return this.publicClient.watchContractEvent({
2302
+ address: this.contractAddress,
2303
+ abi: ERC1155Rarible_jsonAbi,
2304
+ eventName: 'TransferBatch',
2305
+ args: filter,
2306
+ onLogs: (logs: any[]) => {
2307
+ logs.forEach((log: any) => {
2308
+ callback(log.args as any);
2309
+ });
2310
+ },
2311
+ }) as () => void;
2312
+ },
2313
+ /**
2314
+ * Watch TransferSingle events
2315
+ * @param callback Function to call when event is emitted
2316
+ * @param filter Optional filter for indexed parameters
2317
+ * @returns Unwatch function to stop listening
2318
+ */
2319
+ TransferSingle: (callback: (event: { operator: `0x${string}`; from: `0x${string}`; to: `0x${string}`; id: bigint; value: bigint }) => void, filter?: { operator: `0x${string}`; from: `0x${string}`; to: `0x${string}` }) => {
2320
+ return this.publicClient.watchContractEvent({
2321
+ address: this.contractAddress,
2322
+ abi: ERC1155Rarible_jsonAbi,
2323
+ eventName: 'TransferSingle',
2324
+ args: filter,
2325
+ onLogs: (logs: any[]) => {
2326
+ logs.forEach((log: any) => {
2327
+ callback(log.args as any);
2328
+ });
2329
+ },
2330
+ }) as () => void;
2331
+ },
2332
+ /**
2333
+ * Watch URI events
2334
+ * @param callback Function to call when event is emitted
2335
+ * @param filter Optional filter for indexed parameters
2336
+ * @returns Unwatch function to stop listening
2337
+ */
2338
+ URI: (callback: (event: { id: bigint; value: string }) => void, filter?: { id: bigint }) => {
2339
+ return this.publicClient.watchContractEvent({
2340
+ address: this.contractAddress,
2341
+ abi: ERC1155Rarible_jsonAbi,
2342
+ eventName: 'URI',
2343
+ args: filter,
2344
+ onLogs: (logs: any[]) => {
2345
+ logs.forEach((log: any) => {
2346
+ callback(log.args as any);
2347
+ });
2348
+ },
2349
+ }) as () => void;
2350
+ }
2351
+ };
2352
+ }
2353
+ }