@gitmyabi/weird 0.0.0-stage → 1.0.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,1775 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+
5
+ /**
6
+ * ERC1155Base.Fee struct type
7
+ */
8
+ export type ERC1155Base_Fee = {
9
+ recipient: `0x${string}`;
10
+ value: bigint;
11
+ };
12
+ /**
13
+ * RaribleUserToken ABI
14
+ *
15
+ * This ABI is typed using viem's type system for full type safety.
16
+ */
17
+ export const RaribleUserTokenAbi = [
18
+ {
19
+ "inputs": [
20
+ {
21
+ "internalType": "string",
22
+ "name": "name",
23
+ "type": "string"
24
+ },
25
+ {
26
+ "internalType": "string",
27
+ "name": "symbol",
28
+ "type": "string"
29
+ },
30
+ {
31
+ "internalType": "string",
32
+ "name": "contractURI",
33
+ "type": "string"
34
+ },
35
+ {
36
+ "internalType": "string",
37
+ "name": "tokenURIPrefix",
38
+ "type": "string"
39
+ },
40
+ {
41
+ "internalType": "address",
42
+ "name": "signer",
43
+ "type": "address"
44
+ }
45
+ ],
46
+ "payable": false,
47
+ "stateMutability": "nonpayable",
48
+ "type": "constructor"
49
+ },
50
+ {
51
+ "anonymous": false,
52
+ "inputs": [
53
+ {
54
+ "indexed": true,
55
+ "internalType": "address",
56
+ "name": "_owner",
57
+ "type": "address"
58
+ },
59
+ {
60
+ "indexed": true,
61
+ "internalType": "address",
62
+ "name": "_operator",
63
+ "type": "address"
64
+ },
65
+ {
66
+ "indexed": false,
67
+ "internalType": "bool",
68
+ "name": "_approved",
69
+ "type": "bool"
70
+ }
71
+ ],
72
+ "name": "ApprovalForAll",
73
+ "type": "event"
74
+ },
75
+ {
76
+ "anonymous": false,
77
+ "inputs": [
78
+ {
79
+ "indexed": true,
80
+ "internalType": "address",
81
+ "name": "creator",
82
+ "type": "address"
83
+ },
84
+ {
85
+ "indexed": false,
86
+ "internalType": "string",
87
+ "name": "name",
88
+ "type": "string"
89
+ },
90
+ {
91
+ "indexed": false,
92
+ "internalType": "string",
93
+ "name": "symbol",
94
+ "type": "string"
95
+ }
96
+ ],
97
+ "name": "CreateERC1155_v1",
98
+ "type": "event"
99
+ },
100
+ {
101
+ "anonymous": false,
102
+ "inputs": [
103
+ {
104
+ "indexed": true,
105
+ "internalType": "address",
106
+ "name": "previousOwner",
107
+ "type": "address"
108
+ },
109
+ {
110
+ "indexed": true,
111
+ "internalType": "address",
112
+ "name": "newOwner",
113
+ "type": "address"
114
+ }
115
+ ],
116
+ "name": "OwnershipTransferred",
117
+ "type": "event"
118
+ },
119
+ {
120
+ "anonymous": false,
121
+ "inputs": [
122
+ {
123
+ "indexed": false,
124
+ "internalType": "uint256",
125
+ "name": "tokenId",
126
+ "type": "uint256"
127
+ },
128
+ {
129
+ "indexed": false,
130
+ "internalType": "address[]",
131
+ "name": "recipients",
132
+ "type": "address[]"
133
+ },
134
+ {
135
+ "indexed": false,
136
+ "internalType": "uint256[]",
137
+ "name": "bps",
138
+ "type": "uint256[]"
139
+ }
140
+ ],
141
+ "name": "SecondarySaleFees",
142
+ "type": "event"
143
+ },
144
+ {
145
+ "anonymous": false,
146
+ "inputs": [
147
+ {
148
+ "indexed": true,
149
+ "internalType": "address",
150
+ "name": "account",
151
+ "type": "address"
152
+ }
153
+ ],
154
+ "name": "SignerAdded",
155
+ "type": "event"
156
+ },
157
+ {
158
+ "anonymous": false,
159
+ "inputs": [
160
+ {
161
+ "indexed": true,
162
+ "internalType": "address",
163
+ "name": "account",
164
+ "type": "address"
165
+ }
166
+ ],
167
+ "name": "SignerRemoved",
168
+ "type": "event"
169
+ },
170
+ {
171
+ "anonymous": false,
172
+ "inputs": [
173
+ {
174
+ "indexed": true,
175
+ "internalType": "address",
176
+ "name": "_operator",
177
+ "type": "address"
178
+ },
179
+ {
180
+ "indexed": true,
181
+ "internalType": "address",
182
+ "name": "_from",
183
+ "type": "address"
184
+ },
185
+ {
186
+ "indexed": true,
187
+ "internalType": "address",
188
+ "name": "_to",
189
+ "type": "address"
190
+ },
191
+ {
192
+ "indexed": false,
193
+ "internalType": "uint256[]",
194
+ "name": "_ids",
195
+ "type": "uint256[]"
196
+ },
197
+ {
198
+ "indexed": false,
199
+ "internalType": "uint256[]",
200
+ "name": "_values",
201
+ "type": "uint256[]"
202
+ }
203
+ ],
204
+ "name": "TransferBatch",
205
+ "type": "event"
206
+ },
207
+ {
208
+ "anonymous": false,
209
+ "inputs": [
210
+ {
211
+ "indexed": true,
212
+ "internalType": "address",
213
+ "name": "_operator",
214
+ "type": "address"
215
+ },
216
+ {
217
+ "indexed": true,
218
+ "internalType": "address",
219
+ "name": "_from",
220
+ "type": "address"
221
+ },
222
+ {
223
+ "indexed": true,
224
+ "internalType": "address",
225
+ "name": "_to",
226
+ "type": "address"
227
+ },
228
+ {
229
+ "indexed": false,
230
+ "internalType": "uint256",
231
+ "name": "_id",
232
+ "type": "uint256"
233
+ },
234
+ {
235
+ "indexed": false,
236
+ "internalType": "uint256",
237
+ "name": "_value",
238
+ "type": "uint256"
239
+ }
240
+ ],
241
+ "name": "TransferSingle",
242
+ "type": "event"
243
+ },
244
+ {
245
+ "anonymous": false,
246
+ "inputs": [
247
+ {
248
+ "indexed": false,
249
+ "internalType": "string",
250
+ "name": "_value",
251
+ "type": "string"
252
+ },
253
+ {
254
+ "indexed": true,
255
+ "internalType": "uint256",
256
+ "name": "_id",
257
+ "type": "uint256"
258
+ }
259
+ ],
260
+ "name": "URI",
261
+ "type": "event"
262
+ },
263
+ {
264
+ "constant": false,
265
+ "inputs": [
266
+ {
267
+ "internalType": "address",
268
+ "name": "account",
269
+ "type": "address"
270
+ }
271
+ ],
272
+ "name": "addSigner",
273
+ "outputs": [],
274
+ "payable": false,
275
+ "stateMutability": "nonpayable",
276
+ "type": "function"
277
+ },
278
+ {
279
+ "constant": true,
280
+ "inputs": [
281
+ {
282
+ "internalType": "address",
283
+ "name": "_owner",
284
+ "type": "address"
285
+ },
286
+ {
287
+ "internalType": "uint256",
288
+ "name": "_id",
289
+ "type": "uint256"
290
+ }
291
+ ],
292
+ "name": "balanceOf",
293
+ "outputs": [
294
+ {
295
+ "internalType": "uint256",
296
+ "name": "",
297
+ "type": "uint256"
298
+ }
299
+ ],
300
+ "payable": false,
301
+ "stateMutability": "view",
302
+ "type": "function"
303
+ },
304
+ {
305
+ "constant": true,
306
+ "inputs": [
307
+ {
308
+ "internalType": "address[]",
309
+ "name": "_owners",
310
+ "type": "address[]"
311
+ },
312
+ {
313
+ "internalType": "uint256[]",
314
+ "name": "_ids",
315
+ "type": "uint256[]"
316
+ }
317
+ ],
318
+ "name": "balanceOfBatch",
319
+ "outputs": [
320
+ {
321
+ "internalType": "uint256[]",
322
+ "name": "",
323
+ "type": "uint256[]"
324
+ }
325
+ ],
326
+ "payable": false,
327
+ "stateMutability": "view",
328
+ "type": "function"
329
+ },
330
+ {
331
+ "constant": false,
332
+ "inputs": [
333
+ {
334
+ "internalType": "address",
335
+ "name": "_owner",
336
+ "type": "address"
337
+ },
338
+ {
339
+ "internalType": "uint256",
340
+ "name": "_id",
341
+ "type": "uint256"
342
+ },
343
+ {
344
+ "internalType": "uint256",
345
+ "name": "_value",
346
+ "type": "uint256"
347
+ }
348
+ ],
349
+ "name": "burn",
350
+ "outputs": [],
351
+ "payable": false,
352
+ "stateMutability": "nonpayable",
353
+ "type": "function"
354
+ },
355
+ {
356
+ "constant": true,
357
+ "inputs": [],
358
+ "name": "contractURI",
359
+ "outputs": [
360
+ {
361
+ "internalType": "string",
362
+ "name": "",
363
+ "type": "string"
364
+ }
365
+ ],
366
+ "payable": false,
367
+ "stateMutability": "view",
368
+ "type": "function"
369
+ },
370
+ {
371
+ "constant": true,
372
+ "inputs": [
373
+ {
374
+ "internalType": "uint256",
375
+ "name": "",
376
+ "type": "uint256"
377
+ }
378
+ ],
379
+ "name": "creators",
380
+ "outputs": [
381
+ {
382
+ "internalType": "address",
383
+ "name": "",
384
+ "type": "address"
385
+ }
386
+ ],
387
+ "payable": false,
388
+ "stateMutability": "view",
389
+ "type": "function"
390
+ },
391
+ {
392
+ "constant": true,
393
+ "inputs": [
394
+ {
395
+ "internalType": "uint256",
396
+ "name": "",
397
+ "type": "uint256"
398
+ },
399
+ {
400
+ "internalType": "uint256",
401
+ "name": "",
402
+ "type": "uint256"
403
+ }
404
+ ],
405
+ "name": "fees",
406
+ "outputs": [
407
+ {
408
+ "internalType": "address payable",
409
+ "name": "recipient",
410
+ "type": "address"
411
+ },
412
+ {
413
+ "internalType": "uint256",
414
+ "name": "value",
415
+ "type": "uint256"
416
+ }
417
+ ],
418
+ "payable": false,
419
+ "stateMutability": "view",
420
+ "type": "function"
421
+ },
422
+ {
423
+ "constant": true,
424
+ "inputs": [
425
+ {
426
+ "internalType": "uint256",
427
+ "name": "id",
428
+ "type": "uint256"
429
+ }
430
+ ],
431
+ "name": "getFeeBps",
432
+ "outputs": [
433
+ {
434
+ "internalType": "uint256[]",
435
+ "name": "",
436
+ "type": "uint256[]"
437
+ }
438
+ ],
439
+ "payable": false,
440
+ "stateMutability": "view",
441
+ "type": "function"
442
+ },
443
+ {
444
+ "constant": true,
445
+ "inputs": [
446
+ {
447
+ "internalType": "uint256",
448
+ "name": "id",
449
+ "type": "uint256"
450
+ }
451
+ ],
452
+ "name": "getFeeRecipients",
453
+ "outputs": [
454
+ {
455
+ "internalType": "address payable[]",
456
+ "name": "",
457
+ "type": "address[]"
458
+ }
459
+ ],
460
+ "payable": false,
461
+ "stateMutability": "view",
462
+ "type": "function"
463
+ },
464
+ {
465
+ "constant": true,
466
+ "inputs": [
467
+ {
468
+ "internalType": "address",
469
+ "name": "_owner",
470
+ "type": "address"
471
+ },
472
+ {
473
+ "internalType": "address",
474
+ "name": "_operator",
475
+ "type": "address"
476
+ }
477
+ ],
478
+ "name": "isApprovedForAll",
479
+ "outputs": [
480
+ {
481
+ "internalType": "bool",
482
+ "name": "",
483
+ "type": "bool"
484
+ }
485
+ ],
486
+ "payable": false,
487
+ "stateMutability": "view",
488
+ "type": "function"
489
+ },
490
+ {
491
+ "constant": true,
492
+ "inputs": [],
493
+ "name": "isOwner",
494
+ "outputs": [
495
+ {
496
+ "internalType": "bool",
497
+ "name": "",
498
+ "type": "bool"
499
+ }
500
+ ],
501
+ "payable": false,
502
+ "stateMutability": "view",
503
+ "type": "function"
504
+ },
505
+ {
506
+ "constant": true,
507
+ "inputs": [
508
+ {
509
+ "internalType": "address",
510
+ "name": "account",
511
+ "type": "address"
512
+ }
513
+ ],
514
+ "name": "isSigner",
515
+ "outputs": [
516
+ {
517
+ "internalType": "bool",
518
+ "name": "",
519
+ "type": "bool"
520
+ }
521
+ ],
522
+ "payable": false,
523
+ "stateMutability": "view",
524
+ "type": "function"
525
+ },
526
+ {
527
+ "constant": false,
528
+ "inputs": [
529
+ {
530
+ "internalType": "uint256",
531
+ "name": "id",
532
+ "type": "uint256"
533
+ },
534
+ {
535
+ "internalType": "uint8",
536
+ "name": "v",
537
+ "type": "uint8"
538
+ },
539
+ {
540
+ "internalType": "bytes32",
541
+ "name": "r",
542
+ "type": "bytes32"
543
+ },
544
+ {
545
+ "internalType": "bytes32",
546
+ "name": "s",
547
+ "type": "bytes32"
548
+ },
549
+ {
550
+ "components": [
551
+ {
552
+ "internalType": "address payable",
553
+ "name": "recipient",
554
+ "type": "address"
555
+ },
556
+ {
557
+ "internalType": "uint256",
558
+ "name": "value",
559
+ "type": "uint256"
560
+ }
561
+ ],
562
+ "internalType": "struct ERC1155Base.Fee[]",
563
+ "name": "fees",
564
+ "type": "tuple[]"
565
+ },
566
+ {
567
+ "internalType": "uint256",
568
+ "name": "supply",
569
+ "type": "uint256"
570
+ },
571
+ {
572
+ "internalType": "string",
573
+ "name": "uri",
574
+ "type": "string"
575
+ }
576
+ ],
577
+ "name": "mint",
578
+ "outputs": [],
579
+ "payable": false,
580
+ "stateMutability": "nonpayable",
581
+ "type": "function"
582
+ },
583
+ {
584
+ "constant": true,
585
+ "inputs": [],
586
+ "name": "name",
587
+ "outputs": [
588
+ {
589
+ "internalType": "string",
590
+ "name": "",
591
+ "type": "string"
592
+ }
593
+ ],
594
+ "payable": false,
595
+ "stateMutability": "view",
596
+ "type": "function"
597
+ },
598
+ {
599
+ "constant": true,
600
+ "inputs": [],
601
+ "name": "owner",
602
+ "outputs": [
603
+ {
604
+ "internalType": "address",
605
+ "name": "",
606
+ "type": "address"
607
+ }
608
+ ],
609
+ "payable": false,
610
+ "stateMutability": "view",
611
+ "type": "function"
612
+ },
613
+ {
614
+ "constant": false,
615
+ "inputs": [
616
+ {
617
+ "internalType": "address",
618
+ "name": "account",
619
+ "type": "address"
620
+ }
621
+ ],
622
+ "name": "removeSigner",
623
+ "outputs": [],
624
+ "payable": false,
625
+ "stateMutability": "nonpayable",
626
+ "type": "function"
627
+ },
628
+ {
629
+ "constant": false,
630
+ "inputs": [],
631
+ "name": "renounceOwnership",
632
+ "outputs": [],
633
+ "payable": false,
634
+ "stateMutability": "nonpayable",
635
+ "type": "function"
636
+ },
637
+ {
638
+ "constant": false,
639
+ "inputs": [],
640
+ "name": "renounceSigner",
641
+ "outputs": [],
642
+ "payable": false,
643
+ "stateMutability": "nonpayable",
644
+ "type": "function"
645
+ },
646
+ {
647
+ "constant": false,
648
+ "inputs": [
649
+ {
650
+ "internalType": "address",
651
+ "name": "_from",
652
+ "type": "address"
653
+ },
654
+ {
655
+ "internalType": "address",
656
+ "name": "_to",
657
+ "type": "address"
658
+ },
659
+ {
660
+ "internalType": "uint256[]",
661
+ "name": "_ids",
662
+ "type": "uint256[]"
663
+ },
664
+ {
665
+ "internalType": "uint256[]",
666
+ "name": "_values",
667
+ "type": "uint256[]"
668
+ },
669
+ {
670
+ "internalType": "bytes",
671
+ "name": "_data",
672
+ "type": "bytes"
673
+ }
674
+ ],
675
+ "name": "safeBatchTransferFrom",
676
+ "outputs": [],
677
+ "payable": false,
678
+ "stateMutability": "nonpayable",
679
+ "type": "function"
680
+ },
681
+ {
682
+ "constant": false,
683
+ "inputs": [
684
+ {
685
+ "internalType": "address",
686
+ "name": "_from",
687
+ "type": "address"
688
+ },
689
+ {
690
+ "internalType": "address",
691
+ "name": "_to",
692
+ "type": "address"
693
+ },
694
+ {
695
+ "internalType": "uint256",
696
+ "name": "_id",
697
+ "type": "uint256"
698
+ },
699
+ {
700
+ "internalType": "uint256",
701
+ "name": "_value",
702
+ "type": "uint256"
703
+ },
704
+ {
705
+ "internalType": "bytes",
706
+ "name": "_data",
707
+ "type": "bytes"
708
+ }
709
+ ],
710
+ "name": "safeTransferFrom",
711
+ "outputs": [],
712
+ "payable": false,
713
+ "stateMutability": "nonpayable",
714
+ "type": "function"
715
+ },
716
+ {
717
+ "constant": false,
718
+ "inputs": [
719
+ {
720
+ "internalType": "address",
721
+ "name": "_operator",
722
+ "type": "address"
723
+ },
724
+ {
725
+ "internalType": "bool",
726
+ "name": "_approved",
727
+ "type": "bool"
728
+ }
729
+ ],
730
+ "name": "setApprovalForAll",
731
+ "outputs": [],
732
+ "payable": false,
733
+ "stateMutability": "nonpayable",
734
+ "type": "function"
735
+ },
736
+ {
737
+ "constant": false,
738
+ "inputs": [
739
+ {
740
+ "internalType": "string",
741
+ "name": "contractURI",
742
+ "type": "string"
743
+ }
744
+ ],
745
+ "name": "setContractURI",
746
+ "outputs": [],
747
+ "payable": false,
748
+ "stateMutability": "nonpayable",
749
+ "type": "function"
750
+ },
751
+ {
752
+ "constant": false,
753
+ "inputs": [
754
+ {
755
+ "internalType": "string",
756
+ "name": "tokenURIPrefix",
757
+ "type": "string"
758
+ }
759
+ ],
760
+ "name": "setTokenURIPrefix",
761
+ "outputs": [],
762
+ "payable": false,
763
+ "stateMutability": "nonpayable",
764
+ "type": "function"
765
+ },
766
+ {
767
+ "constant": true,
768
+ "inputs": [
769
+ {
770
+ "internalType": "bytes4",
771
+ "name": "interfaceId",
772
+ "type": "bytes4"
773
+ }
774
+ ],
775
+ "name": "supportsInterface",
776
+ "outputs": [
777
+ {
778
+ "internalType": "bool",
779
+ "name": "",
780
+ "type": "bool"
781
+ }
782
+ ],
783
+ "payable": false,
784
+ "stateMutability": "view",
785
+ "type": "function"
786
+ },
787
+ {
788
+ "constant": true,
789
+ "inputs": [],
790
+ "name": "symbol",
791
+ "outputs": [
792
+ {
793
+ "internalType": "string",
794
+ "name": "",
795
+ "type": "string"
796
+ }
797
+ ],
798
+ "payable": false,
799
+ "stateMutability": "view",
800
+ "type": "function"
801
+ },
802
+ {
803
+ "constant": true,
804
+ "inputs": [],
805
+ "name": "tokenURIPrefix",
806
+ "outputs": [
807
+ {
808
+ "internalType": "string",
809
+ "name": "",
810
+ "type": "string"
811
+ }
812
+ ],
813
+ "payable": false,
814
+ "stateMutability": "view",
815
+ "type": "function"
816
+ },
817
+ {
818
+ "constant": false,
819
+ "inputs": [
820
+ {
821
+ "internalType": "address",
822
+ "name": "newOwner",
823
+ "type": "address"
824
+ }
825
+ ],
826
+ "name": "transferOwnership",
827
+ "outputs": [],
828
+ "payable": false,
829
+ "stateMutability": "nonpayable",
830
+ "type": "function"
831
+ },
832
+ {
833
+ "constant": true,
834
+ "inputs": [
835
+ {
836
+ "internalType": "uint256",
837
+ "name": "_id",
838
+ "type": "uint256"
839
+ }
840
+ ],
841
+ "name": "uri",
842
+ "outputs": [
843
+ {
844
+ "internalType": "string",
845
+ "name": "",
846
+ "type": "string"
847
+ }
848
+ ],
849
+ "payable": false,
850
+ "stateMutability": "view",
851
+ "type": "function"
852
+ }
853
+ ] as const satisfies Abi;
854
+
855
+ /**
856
+ * Type-safe ABI for RaribleUserToken
857
+ */
858
+ export type RaribleUserTokenAbi = typeof RaribleUserTokenAbi;
859
+
860
+ /**
861
+ * Contract instance type for RaribleUserToken
862
+ */
863
+ // Use any for contract type to avoid complex viem type issues
864
+ // The runtime behavior is type-safe through viem's ABI typing
865
+ export type RaribleUserTokenContract = any;
866
+
867
+ /**
868
+ * RaribleUserToken Contract Class
869
+ *
870
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
871
+ *
872
+ * @example
873
+ * ```typescript
874
+ * import { createPublicClient, createWalletClient, http } from 'viem';
875
+ * import { mainnet } from 'viem/chains';
876
+ * import { RaribleUserToken } from 'RaribleUserToken';
877
+ *
878
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
879
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
880
+ *
881
+ * const contract = new RaribleUserToken('0x...', { publicClient, walletClient });
882
+ *
883
+ * // Read functions
884
+ * const result = await contract.balanceOf('0x...');
885
+ *
886
+ * // Write functions
887
+ * const hash = await contract.transfer('0x...', 1000n);
888
+ *
889
+ * // Simulate transactions (dry-run)
890
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
891
+ * console.log('Gas estimate:', simulation.request.gas);
892
+ *
893
+ * // Watch events
894
+ * const unwatch = contract.watch.Transfer((event) => {
895
+ * console.log('Transfer event:', event);
896
+ * });
897
+ * ```
898
+ */
899
+ export class RaribleUserToken {
900
+ private contract: RaribleUserTokenContract;
901
+ private contractAddress: Address;
902
+ private publicClient: PublicClient;
903
+
904
+ constructor(
905
+ address: Address,
906
+ clients: {
907
+ publicClient: PublicClient;
908
+ walletClient?: WalletClient;
909
+ }
910
+ ) {
911
+ this.contractAddress = address;
912
+ this.publicClient = clients.publicClient;
913
+ this.contract = getContract({
914
+ address,
915
+ abi: RaribleUserTokenAbi,
916
+ client: {
917
+ public: clients.publicClient,
918
+ wallet: clients.walletClient,
919
+ },
920
+ });
921
+ }
922
+
923
+ /**
924
+ * Get the contract address
925
+ */
926
+ get address(): Address {
927
+ return this.contractAddress;
928
+ }
929
+
930
+ /**
931
+ * Get the underlying viem contract instance.
932
+ */
933
+ getContract(): RaribleUserTokenContract {
934
+ return this.contract;
935
+ }
936
+
937
+ /**
938
+ * balanceOf
939
+ * view
940
+ */
941
+ async balanceOf(_owner: `0x${string}`, _id: bigint): Promise<bigint> {
942
+ return this.contract.read.balanceOf([_owner, _id] as const) as Promise<bigint>;
943
+ }
944
+
945
+ /**
946
+ * balanceOfBatch
947
+ * view
948
+ */
949
+ async balanceOfBatch(_owners: `0x${string}`[], _ids: bigint[]): Promise<bigint[]> {
950
+ return this.contract.read.balanceOfBatch([_owners, _ids] as const) as Promise<bigint[]>;
951
+ }
952
+
953
+ /**
954
+ * contractURI
955
+ * view
956
+ */
957
+ async contractURI(): Promise<string> {
958
+ return this.contract.read.contractURI() as Promise<string>;
959
+ }
960
+
961
+ /**
962
+ * creators
963
+ * view
964
+ */
965
+ async creators(arg0: bigint): Promise<`0x${string}`> {
966
+ return this.contract.read.creators([arg0] as const) as Promise<`0x${string}`>;
967
+ }
968
+
969
+ /**
970
+ * fees
971
+ * view
972
+ */
973
+ async fees(arg0: bigint, arg1: bigint): Promise<[`0x${string}`, bigint]> {
974
+ return this.contract.read.fees([arg0, arg1] as const) as Promise<[`0x${string}`, bigint]>;
975
+ }
976
+
977
+ /**
978
+ * getFeeBps
979
+ * view
980
+ */
981
+ async getFeeBps(id: bigint): Promise<bigint[]> {
982
+ return this.contract.read.getFeeBps([id] as const) as Promise<bigint[]>;
983
+ }
984
+
985
+ /**
986
+ * getFeeRecipients
987
+ * view
988
+ */
989
+ async getFeeRecipients(id: bigint): Promise<`0x${string}`[]> {
990
+ return this.contract.read.getFeeRecipients([id] as const) as Promise<`0x${string}`[]>;
991
+ }
992
+
993
+ /**
994
+ * isApprovedForAll
995
+ * view
996
+ */
997
+ async isApprovedForAll(_owner: `0x${string}`, _operator: `0x${string}`): Promise<boolean> {
998
+ return this.contract.read.isApprovedForAll([_owner, _operator] as const) as Promise<boolean>;
999
+ }
1000
+
1001
+ /**
1002
+ * isOwner
1003
+ * view
1004
+ */
1005
+ async isOwner(): Promise<boolean> {
1006
+ return this.contract.read.isOwner() as Promise<boolean>;
1007
+ }
1008
+
1009
+ /**
1010
+ * isSigner
1011
+ * view
1012
+ */
1013
+ async isSigner(account: `0x${string}`): Promise<boolean> {
1014
+ return this.contract.read.isSigner([account] as const) as Promise<boolean>;
1015
+ }
1016
+
1017
+ /**
1018
+ * name
1019
+ * view
1020
+ */
1021
+ async name(): Promise<string> {
1022
+ return this.contract.read.name() as Promise<string>;
1023
+ }
1024
+
1025
+ /**
1026
+ * owner
1027
+ * view
1028
+ */
1029
+ async owner(): Promise<`0x${string}`> {
1030
+ return this.contract.read.owner() as Promise<`0x${string}`>;
1031
+ }
1032
+
1033
+ /**
1034
+ * supportsInterface
1035
+ * view
1036
+ */
1037
+ async supportsInterface(interfaceId: `0x${string}`): Promise<boolean> {
1038
+ return this.contract.read.supportsInterface([interfaceId] as const) as Promise<boolean>;
1039
+ }
1040
+
1041
+ /**
1042
+ * symbol
1043
+ * view
1044
+ */
1045
+ async symbol(): Promise<string> {
1046
+ return this.contract.read.symbol() as Promise<string>;
1047
+ }
1048
+
1049
+ /**
1050
+ * tokenURIPrefix
1051
+ * view
1052
+ */
1053
+ async tokenURIPrefix(): Promise<string> {
1054
+ return this.contract.read.tokenURIPrefix() as Promise<string>;
1055
+ }
1056
+
1057
+ /**
1058
+ * uri
1059
+ * view
1060
+ */
1061
+ async uri(_id: bigint): Promise<string> {
1062
+ return this.contract.read.uri([_id] as const) as Promise<string>;
1063
+ }
1064
+
1065
+ /**
1066
+ * addSigner
1067
+ * nonpayable
1068
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1069
+ */
1070
+ async addSigner(account: `0x${string}`, options?: {
1071
+ accessList?: import('viem').AccessList;
1072
+ authorizationList?: import('viem').AuthorizationList;
1073
+ chain?: import('viem').Chain | null;
1074
+ dataSuffix?: `0x${string}`;
1075
+ gas?: bigint;
1076
+ gasPrice?: bigint;
1077
+ maxFeePerGas?: bigint;
1078
+ maxPriorityFeePerGas?: bigint;
1079
+ nonce?: number;
1080
+ value?: bigint;
1081
+ }): Promise<`0x${string}`> {
1082
+ if (!this.contract.write) {
1083
+ throw new Error('Wallet client is required for write operations');
1084
+ }
1085
+ return this.contract.write.addSigner([account] as const, options) as Promise<`0x${string}`>;
1086
+ }
1087
+
1088
+ /**
1089
+ * burn
1090
+ * nonpayable
1091
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1092
+ */
1093
+ async burn(_owner: `0x${string}`, _id: bigint, _value: bigint, options?: {
1094
+ accessList?: import('viem').AccessList;
1095
+ authorizationList?: import('viem').AuthorizationList;
1096
+ chain?: import('viem').Chain | null;
1097
+ dataSuffix?: `0x${string}`;
1098
+ gas?: bigint;
1099
+ gasPrice?: bigint;
1100
+ maxFeePerGas?: bigint;
1101
+ maxPriorityFeePerGas?: bigint;
1102
+ nonce?: number;
1103
+ value?: bigint;
1104
+ }): Promise<`0x${string}`> {
1105
+ if (!this.contract.write) {
1106
+ throw new Error('Wallet client is required for write operations');
1107
+ }
1108
+ return this.contract.write.burn([_owner, _id, _value] as const, options) as Promise<`0x${string}`>;
1109
+ }
1110
+
1111
+ /**
1112
+ * mint
1113
+ * nonpayable
1114
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1115
+ */
1116
+ async mint(id: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, fees: ERC1155Base_Fee[], supply: bigint, uri: string, options?: {
1117
+ accessList?: import('viem').AccessList;
1118
+ authorizationList?: import('viem').AuthorizationList;
1119
+ chain?: import('viem').Chain | null;
1120
+ dataSuffix?: `0x${string}`;
1121
+ gas?: bigint;
1122
+ gasPrice?: bigint;
1123
+ maxFeePerGas?: bigint;
1124
+ maxPriorityFeePerGas?: bigint;
1125
+ nonce?: number;
1126
+ value?: bigint;
1127
+ }): Promise<`0x${string}`> {
1128
+ if (!this.contract.write) {
1129
+ throw new Error('Wallet client is required for write operations');
1130
+ }
1131
+ return this.contract.write.mint([id, v, r, s, fees, supply, uri] as const, options) as Promise<`0x${string}`>;
1132
+ }
1133
+
1134
+ /**
1135
+ * removeSigner
1136
+ * nonpayable
1137
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1138
+ */
1139
+ async removeSigner(account: `0x${string}`, options?: {
1140
+ accessList?: import('viem').AccessList;
1141
+ authorizationList?: import('viem').AuthorizationList;
1142
+ chain?: import('viem').Chain | null;
1143
+ dataSuffix?: `0x${string}`;
1144
+ gas?: bigint;
1145
+ gasPrice?: bigint;
1146
+ maxFeePerGas?: bigint;
1147
+ maxPriorityFeePerGas?: bigint;
1148
+ nonce?: number;
1149
+ value?: bigint;
1150
+ }): Promise<`0x${string}`> {
1151
+ if (!this.contract.write) {
1152
+ throw new Error('Wallet client is required for write operations');
1153
+ }
1154
+ return this.contract.write.removeSigner([account] as const, options) as Promise<`0x${string}`>;
1155
+ }
1156
+
1157
+ /**
1158
+ * renounceOwnership
1159
+ * nonpayable
1160
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1161
+ */
1162
+ async renounceOwnership(options?: {
1163
+ accessList?: import('viem').AccessList;
1164
+ authorizationList?: import('viem').AuthorizationList;
1165
+ chain?: import('viem').Chain | null;
1166
+ dataSuffix?: `0x${string}`;
1167
+ gas?: bigint;
1168
+ gasPrice?: bigint;
1169
+ maxFeePerGas?: bigint;
1170
+ maxPriorityFeePerGas?: bigint;
1171
+ nonce?: number;
1172
+ value?: bigint;
1173
+ }): Promise<`0x${string}`> {
1174
+ if (!this.contract.write) {
1175
+ throw new Error('Wallet client is required for write operations');
1176
+ }
1177
+ return this.contract.write.renounceOwnership(options) as Promise<`0x${string}`>;
1178
+ }
1179
+
1180
+ /**
1181
+ * renounceSigner
1182
+ * nonpayable
1183
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1184
+ */
1185
+ async renounceSigner(options?: {
1186
+ accessList?: import('viem').AccessList;
1187
+ authorizationList?: import('viem').AuthorizationList;
1188
+ chain?: import('viem').Chain | null;
1189
+ dataSuffix?: `0x${string}`;
1190
+ gas?: bigint;
1191
+ gasPrice?: bigint;
1192
+ maxFeePerGas?: bigint;
1193
+ maxPriorityFeePerGas?: bigint;
1194
+ nonce?: number;
1195
+ value?: bigint;
1196
+ }): Promise<`0x${string}`> {
1197
+ if (!this.contract.write) {
1198
+ throw new Error('Wallet client is required for write operations');
1199
+ }
1200
+ return this.contract.write.renounceSigner(options) as Promise<`0x${string}`>;
1201
+ }
1202
+
1203
+ /**
1204
+ * safeBatchTransferFrom
1205
+ * nonpayable
1206
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1207
+ */
1208
+ async safeBatchTransferFrom(_from: `0x${string}`, _to: `0x${string}`, _ids: bigint[], _values: bigint[], _data: `0x${string}`, options?: {
1209
+ accessList?: import('viem').AccessList;
1210
+ authorizationList?: import('viem').AuthorizationList;
1211
+ chain?: import('viem').Chain | null;
1212
+ dataSuffix?: `0x${string}`;
1213
+ gas?: bigint;
1214
+ gasPrice?: bigint;
1215
+ maxFeePerGas?: bigint;
1216
+ maxPriorityFeePerGas?: bigint;
1217
+ nonce?: number;
1218
+ value?: bigint;
1219
+ }): Promise<`0x${string}`> {
1220
+ if (!this.contract.write) {
1221
+ throw new Error('Wallet client is required for write operations');
1222
+ }
1223
+ return this.contract.write.safeBatchTransferFrom([_from, _to, _ids, _values, _data] as const, options) as Promise<`0x${string}`>;
1224
+ }
1225
+
1226
+ /**
1227
+ * safeTransferFrom
1228
+ * nonpayable
1229
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1230
+ */
1231
+ async safeTransferFrom(_from: `0x${string}`, _to: `0x${string}`, _id: bigint, _value: bigint, _data: `0x${string}`, options?: {
1232
+ accessList?: import('viem').AccessList;
1233
+ authorizationList?: import('viem').AuthorizationList;
1234
+ chain?: import('viem').Chain | null;
1235
+ dataSuffix?: `0x${string}`;
1236
+ gas?: bigint;
1237
+ gasPrice?: bigint;
1238
+ maxFeePerGas?: bigint;
1239
+ maxPriorityFeePerGas?: bigint;
1240
+ nonce?: number;
1241
+ value?: bigint;
1242
+ }): Promise<`0x${string}`> {
1243
+ if (!this.contract.write) {
1244
+ throw new Error('Wallet client is required for write operations');
1245
+ }
1246
+ return this.contract.write.safeTransferFrom([_from, _to, _id, _value, _data] as const, options) as Promise<`0x${string}`>;
1247
+ }
1248
+
1249
+ /**
1250
+ * setApprovalForAll
1251
+ * nonpayable
1252
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1253
+ */
1254
+ async setApprovalForAll(_operator: `0x${string}`, _approved: boolean, options?: {
1255
+ accessList?: import('viem').AccessList;
1256
+ authorizationList?: import('viem').AuthorizationList;
1257
+ chain?: import('viem').Chain | null;
1258
+ dataSuffix?: `0x${string}`;
1259
+ gas?: bigint;
1260
+ gasPrice?: bigint;
1261
+ maxFeePerGas?: bigint;
1262
+ maxPriorityFeePerGas?: bigint;
1263
+ nonce?: number;
1264
+ value?: bigint;
1265
+ }): Promise<`0x${string}`> {
1266
+ if (!this.contract.write) {
1267
+ throw new Error('Wallet client is required for write operations');
1268
+ }
1269
+ return this.contract.write.setApprovalForAll([_operator, _approved] as const, options) as Promise<`0x${string}`>;
1270
+ }
1271
+
1272
+ /**
1273
+ * setContractURI
1274
+ * nonpayable
1275
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1276
+ */
1277
+ async setContractURI(contractURI: string, options?: {
1278
+ accessList?: import('viem').AccessList;
1279
+ authorizationList?: import('viem').AuthorizationList;
1280
+ chain?: import('viem').Chain | null;
1281
+ dataSuffix?: `0x${string}`;
1282
+ gas?: bigint;
1283
+ gasPrice?: bigint;
1284
+ maxFeePerGas?: bigint;
1285
+ maxPriorityFeePerGas?: bigint;
1286
+ nonce?: number;
1287
+ value?: bigint;
1288
+ }): Promise<`0x${string}`> {
1289
+ if (!this.contract.write) {
1290
+ throw new Error('Wallet client is required for write operations');
1291
+ }
1292
+ return this.contract.write.setContractURI([contractURI] as const, options) as Promise<`0x${string}`>;
1293
+ }
1294
+
1295
+ /**
1296
+ * setTokenURIPrefix
1297
+ * nonpayable
1298
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1299
+ */
1300
+ async setTokenURIPrefix(tokenURIPrefix: string, options?: {
1301
+ accessList?: import('viem').AccessList;
1302
+ authorizationList?: import('viem').AuthorizationList;
1303
+ chain?: import('viem').Chain | null;
1304
+ dataSuffix?: `0x${string}`;
1305
+ gas?: bigint;
1306
+ gasPrice?: bigint;
1307
+ maxFeePerGas?: bigint;
1308
+ maxPriorityFeePerGas?: bigint;
1309
+ nonce?: number;
1310
+ value?: bigint;
1311
+ }): Promise<`0x${string}`> {
1312
+ if (!this.contract.write) {
1313
+ throw new Error('Wallet client is required for write operations');
1314
+ }
1315
+ return this.contract.write.setTokenURIPrefix([tokenURIPrefix] as const, options) as Promise<`0x${string}`>;
1316
+ }
1317
+
1318
+ /**
1319
+ * transferOwnership
1320
+ * nonpayable
1321
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1322
+ */
1323
+ async transferOwnership(newOwner: `0x${string}`, options?: {
1324
+ accessList?: import('viem').AccessList;
1325
+ authorizationList?: import('viem').AuthorizationList;
1326
+ chain?: import('viem').Chain | null;
1327
+ dataSuffix?: `0x${string}`;
1328
+ gas?: bigint;
1329
+ gasPrice?: bigint;
1330
+ maxFeePerGas?: bigint;
1331
+ maxPriorityFeePerGas?: bigint;
1332
+ nonce?: number;
1333
+ value?: bigint;
1334
+ }): Promise<`0x${string}`> {
1335
+ if (!this.contract.write) {
1336
+ throw new Error('Wallet client is required for write operations');
1337
+ }
1338
+ return this.contract.write.transferOwnership([newOwner] as const, options) as Promise<`0x${string}`>;
1339
+ }
1340
+
1341
+
1342
+
1343
+ /**
1344
+ * Simulate contract write operations (dry-run without sending transaction)
1345
+ *
1346
+ * @example
1347
+ * const result = await contract.simulate.transfer('0x...', 1000n);
1348
+ * console.log('Gas estimate:', result.request.gas);
1349
+ * console.log('Would succeed:', result.result);
1350
+ */
1351
+ get simulate() {
1352
+ const contract = this.contract;
1353
+ if (!contract.simulate) {
1354
+ throw new Error('Public client is required for simulation');
1355
+ }
1356
+ return {
1357
+ /**
1358
+ * Simulate addSigner
1359
+ * Returns gas estimate and result without sending transaction
1360
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1361
+ */
1362
+ async addSigner(account: `0x${string}`, options?: {
1363
+ accessList?: import('viem').AccessList;
1364
+ authorizationList?: import('viem').AuthorizationList;
1365
+ chain?: import('viem').Chain | null;
1366
+ dataSuffix?: `0x${string}`;
1367
+ gas?: bigint;
1368
+ gasPrice?: bigint;
1369
+ maxFeePerGas?: bigint;
1370
+ maxPriorityFeePerGas?: bigint;
1371
+ nonce?: number;
1372
+ value?: bigint;
1373
+ }): Promise<void> {
1374
+ return contract.simulate.addSigner([account] as const, options) as Promise<void>;
1375
+ },
1376
+ /**
1377
+ * Simulate burn
1378
+ * Returns gas estimate and result without sending transaction
1379
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1380
+ */
1381
+ async burn(_owner: `0x${string}`, _id: bigint, _value: bigint, options?: {
1382
+ accessList?: import('viem').AccessList;
1383
+ authorizationList?: import('viem').AuthorizationList;
1384
+ chain?: import('viem').Chain | null;
1385
+ dataSuffix?: `0x${string}`;
1386
+ gas?: bigint;
1387
+ gasPrice?: bigint;
1388
+ maxFeePerGas?: bigint;
1389
+ maxPriorityFeePerGas?: bigint;
1390
+ nonce?: number;
1391
+ value?: bigint;
1392
+ }): Promise<void> {
1393
+ return contract.simulate.burn([_owner, _id, _value] as const, options) as Promise<void>;
1394
+ },
1395
+ /**
1396
+ * Simulate mint
1397
+ * Returns gas estimate and result without sending transaction
1398
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1399
+ */
1400
+ async mint(id: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, fees: ERC1155Base_Fee[], supply: bigint, uri: string, options?: {
1401
+ accessList?: import('viem').AccessList;
1402
+ authorizationList?: import('viem').AuthorizationList;
1403
+ chain?: import('viem').Chain | null;
1404
+ dataSuffix?: `0x${string}`;
1405
+ gas?: bigint;
1406
+ gasPrice?: bigint;
1407
+ maxFeePerGas?: bigint;
1408
+ maxPriorityFeePerGas?: bigint;
1409
+ nonce?: number;
1410
+ value?: bigint;
1411
+ }): Promise<void> {
1412
+ return contract.simulate.mint([id, v, r, s, fees, supply, uri] as const, options) as Promise<void>;
1413
+ },
1414
+ /**
1415
+ * Simulate removeSigner
1416
+ * Returns gas estimate and result without sending transaction
1417
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1418
+ */
1419
+ async removeSigner(account: `0x${string}`, options?: {
1420
+ accessList?: import('viem').AccessList;
1421
+ authorizationList?: import('viem').AuthorizationList;
1422
+ chain?: import('viem').Chain | null;
1423
+ dataSuffix?: `0x${string}`;
1424
+ gas?: bigint;
1425
+ gasPrice?: bigint;
1426
+ maxFeePerGas?: bigint;
1427
+ maxPriorityFeePerGas?: bigint;
1428
+ nonce?: number;
1429
+ value?: bigint;
1430
+ }): Promise<void> {
1431
+ return contract.simulate.removeSigner([account] as const, options) as Promise<void>;
1432
+ },
1433
+ /**
1434
+ * Simulate renounceOwnership
1435
+ * Returns gas estimate and result without sending transaction
1436
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1437
+ */
1438
+ async renounceOwnership(options?: {
1439
+ accessList?: import('viem').AccessList;
1440
+ authorizationList?: import('viem').AuthorizationList;
1441
+ chain?: import('viem').Chain | null;
1442
+ dataSuffix?: `0x${string}`;
1443
+ gas?: bigint;
1444
+ gasPrice?: bigint;
1445
+ maxFeePerGas?: bigint;
1446
+ maxPriorityFeePerGas?: bigint;
1447
+ nonce?: number;
1448
+ value?: bigint;
1449
+ }): Promise<void> {
1450
+ return contract.simulate.renounceOwnership(options) as Promise<void>;
1451
+ },
1452
+ /**
1453
+ * Simulate renounceSigner
1454
+ * Returns gas estimate and result without sending transaction
1455
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1456
+ */
1457
+ async renounceSigner(options?: {
1458
+ accessList?: import('viem').AccessList;
1459
+ authorizationList?: import('viem').AuthorizationList;
1460
+ chain?: import('viem').Chain | null;
1461
+ dataSuffix?: `0x${string}`;
1462
+ gas?: bigint;
1463
+ gasPrice?: bigint;
1464
+ maxFeePerGas?: bigint;
1465
+ maxPriorityFeePerGas?: bigint;
1466
+ nonce?: number;
1467
+ value?: bigint;
1468
+ }): Promise<void> {
1469
+ return contract.simulate.renounceSigner(options) as Promise<void>;
1470
+ },
1471
+ /**
1472
+ * Simulate safeBatchTransferFrom
1473
+ * Returns gas estimate and result without sending transaction
1474
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1475
+ */
1476
+ async safeBatchTransferFrom(_from: `0x${string}`, _to: `0x${string}`, _ids: bigint[], _values: bigint[], _data: `0x${string}`, options?: {
1477
+ accessList?: import('viem').AccessList;
1478
+ authorizationList?: import('viem').AuthorizationList;
1479
+ chain?: import('viem').Chain | null;
1480
+ dataSuffix?: `0x${string}`;
1481
+ gas?: bigint;
1482
+ gasPrice?: bigint;
1483
+ maxFeePerGas?: bigint;
1484
+ maxPriorityFeePerGas?: bigint;
1485
+ nonce?: number;
1486
+ value?: bigint;
1487
+ }): Promise<void> {
1488
+ return contract.simulate.safeBatchTransferFrom([_from, _to, _ids, _values, _data] as const, options) as Promise<void>;
1489
+ },
1490
+ /**
1491
+ * Simulate safeTransferFrom
1492
+ * Returns gas estimate and result without sending transaction
1493
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1494
+ */
1495
+ async safeTransferFrom(_from: `0x${string}`, _to: `0x${string}`, _id: bigint, _value: bigint, _data: `0x${string}`, options?: {
1496
+ accessList?: import('viem').AccessList;
1497
+ authorizationList?: import('viem').AuthorizationList;
1498
+ chain?: import('viem').Chain | null;
1499
+ dataSuffix?: `0x${string}`;
1500
+ gas?: bigint;
1501
+ gasPrice?: bigint;
1502
+ maxFeePerGas?: bigint;
1503
+ maxPriorityFeePerGas?: bigint;
1504
+ nonce?: number;
1505
+ value?: bigint;
1506
+ }): Promise<void> {
1507
+ return contract.simulate.safeTransferFrom([_from, _to, _id, _value, _data] as const, options) as Promise<void>;
1508
+ },
1509
+ /**
1510
+ * Simulate setApprovalForAll
1511
+ * Returns gas estimate and result without sending transaction
1512
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1513
+ */
1514
+ async setApprovalForAll(_operator: `0x${string}`, _approved: boolean, options?: {
1515
+ accessList?: import('viem').AccessList;
1516
+ authorizationList?: import('viem').AuthorizationList;
1517
+ chain?: import('viem').Chain | null;
1518
+ dataSuffix?: `0x${string}`;
1519
+ gas?: bigint;
1520
+ gasPrice?: bigint;
1521
+ maxFeePerGas?: bigint;
1522
+ maxPriorityFeePerGas?: bigint;
1523
+ nonce?: number;
1524
+ value?: bigint;
1525
+ }): Promise<void> {
1526
+ return contract.simulate.setApprovalForAll([_operator, _approved] as const, options) as Promise<void>;
1527
+ },
1528
+ /**
1529
+ * Simulate setContractURI
1530
+ * Returns gas estimate and result without sending transaction
1531
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1532
+ */
1533
+ async setContractURI(contractURI: string, options?: {
1534
+ accessList?: import('viem').AccessList;
1535
+ authorizationList?: import('viem').AuthorizationList;
1536
+ chain?: import('viem').Chain | null;
1537
+ dataSuffix?: `0x${string}`;
1538
+ gas?: bigint;
1539
+ gasPrice?: bigint;
1540
+ maxFeePerGas?: bigint;
1541
+ maxPriorityFeePerGas?: bigint;
1542
+ nonce?: number;
1543
+ value?: bigint;
1544
+ }): Promise<void> {
1545
+ return contract.simulate.setContractURI([contractURI] as const, options) as Promise<void>;
1546
+ },
1547
+ /**
1548
+ * Simulate setTokenURIPrefix
1549
+ * Returns gas estimate and result without sending transaction
1550
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1551
+ */
1552
+ async setTokenURIPrefix(tokenURIPrefix: string, options?: {
1553
+ accessList?: import('viem').AccessList;
1554
+ authorizationList?: import('viem').AuthorizationList;
1555
+ chain?: import('viem').Chain | null;
1556
+ dataSuffix?: `0x${string}`;
1557
+ gas?: bigint;
1558
+ gasPrice?: bigint;
1559
+ maxFeePerGas?: bigint;
1560
+ maxPriorityFeePerGas?: bigint;
1561
+ nonce?: number;
1562
+ value?: bigint;
1563
+ }): Promise<void> {
1564
+ return contract.simulate.setTokenURIPrefix([tokenURIPrefix] as const, options) as Promise<void>;
1565
+ },
1566
+ /**
1567
+ * Simulate transferOwnership
1568
+ * Returns gas estimate and result without sending transaction
1569
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1570
+ */
1571
+ async transferOwnership(newOwner: `0x${string}`, options?: {
1572
+ accessList?: import('viem').AccessList;
1573
+ authorizationList?: import('viem').AuthorizationList;
1574
+ chain?: import('viem').Chain | null;
1575
+ dataSuffix?: `0x${string}`;
1576
+ gas?: bigint;
1577
+ gasPrice?: bigint;
1578
+ maxFeePerGas?: bigint;
1579
+ maxPriorityFeePerGas?: bigint;
1580
+ nonce?: number;
1581
+ value?: bigint;
1582
+ }): Promise<void> {
1583
+ return contract.simulate.transferOwnership([newOwner] as const, options) as Promise<void>;
1584
+ }
1585
+ };
1586
+ }
1587
+
1588
+ /**
1589
+ * Watch contract events
1590
+ *
1591
+ * @example
1592
+ * // Watch all Transfer events
1593
+ * const unwatch = contract.watch.Transfer((event) => {
1594
+ * console.log('Transfer:', event);
1595
+ * });
1596
+ *
1597
+ * // Stop watching
1598
+ * unwatch();
1599
+ */
1600
+ get watch() {
1601
+ return {
1602
+ /**
1603
+ * Watch ApprovalForAll events
1604
+ * @param callback Function to call when event is emitted
1605
+ * @param filter Optional filter for indexed parameters
1606
+ * @returns Unwatch function to stop listening
1607
+ */
1608
+ ApprovalForAll: (callback: (event: { _owner: `0x${string}`; _operator: `0x${string}`; _approved: boolean }) => void, filter?: { _owner?: `0x${string}` | `0x${string}`[] | null; _operator?: `0x${string}` | `0x${string}`[] | null }) => {
1609
+ return this.publicClient.watchContractEvent({
1610
+ address: this.contractAddress,
1611
+ abi: RaribleUserTokenAbi,
1612
+ eventName: 'ApprovalForAll',
1613
+ args: filter as any,
1614
+ onLogs: (logs: any[]) => {
1615
+ logs.forEach((log: any) => {
1616
+ callback(log.args as any);
1617
+ });
1618
+ },
1619
+ }) as () => void;
1620
+ },
1621
+ /**
1622
+ * Watch CreateERC1155_v1 events
1623
+ * @param callback Function to call when event is emitted
1624
+ * @param filter Optional filter for indexed parameters
1625
+ * @returns Unwatch function to stop listening
1626
+ */
1627
+ CreateERC1155_v1: (callback: (event: { creator: `0x${string}`; name: string; symbol: string }) => void, filter?: { creator?: `0x${string}` | `0x${string}`[] | null }) => {
1628
+ return this.publicClient.watchContractEvent({
1629
+ address: this.contractAddress,
1630
+ abi: RaribleUserTokenAbi,
1631
+ eventName: 'CreateERC1155_v1',
1632
+ args: filter as any,
1633
+ onLogs: (logs: any[]) => {
1634
+ logs.forEach((log: any) => {
1635
+ callback(log.args as any);
1636
+ });
1637
+ },
1638
+ }) as () => void;
1639
+ },
1640
+ /**
1641
+ * Watch OwnershipTransferred events
1642
+ * @param callback Function to call when event is emitted
1643
+ * @param filter Optional filter for indexed parameters
1644
+ * @returns Unwatch function to stop listening
1645
+ */
1646
+ OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner?: `0x${string}` | `0x${string}`[] | null; newOwner?: `0x${string}` | `0x${string}`[] | null }) => {
1647
+ return this.publicClient.watchContractEvent({
1648
+ address: this.contractAddress,
1649
+ abi: RaribleUserTokenAbi,
1650
+ eventName: 'OwnershipTransferred',
1651
+ args: filter as any,
1652
+ onLogs: (logs: any[]) => {
1653
+ logs.forEach((log: any) => {
1654
+ callback(log.args as any);
1655
+ });
1656
+ },
1657
+ }) as () => void;
1658
+ },
1659
+ /**
1660
+ * Watch SecondarySaleFees events
1661
+ * @param callback Function to call when event is emitted
1662
+ * @param filter Optional filter for indexed parameters
1663
+ * @returns Unwatch function to stop listening
1664
+ */
1665
+ SecondarySaleFees: (callback: (event: { tokenId: bigint; recipients: `0x${string}`[]; bps: bigint[] }) => void) => {
1666
+ return this.publicClient.watchContractEvent({
1667
+ address: this.contractAddress,
1668
+ abi: RaribleUserTokenAbi,
1669
+ eventName: 'SecondarySaleFees',
1670
+
1671
+ onLogs: (logs: any[]) => {
1672
+ logs.forEach((log: any) => {
1673
+ callback(log.args as any);
1674
+ });
1675
+ },
1676
+ }) as () => void;
1677
+ },
1678
+ /**
1679
+ * Watch SignerAdded events
1680
+ * @param callback Function to call when event is emitted
1681
+ * @param filter Optional filter for indexed parameters
1682
+ * @returns Unwatch function to stop listening
1683
+ */
1684
+ SignerAdded: (callback: (event: { account: `0x${string}` }) => void, filter?: { account?: `0x${string}` | `0x${string}`[] | null }) => {
1685
+ return this.publicClient.watchContractEvent({
1686
+ address: this.contractAddress,
1687
+ abi: RaribleUserTokenAbi,
1688
+ eventName: 'SignerAdded',
1689
+ args: filter as any,
1690
+ onLogs: (logs: any[]) => {
1691
+ logs.forEach((log: any) => {
1692
+ callback(log.args as any);
1693
+ });
1694
+ },
1695
+ }) as () => void;
1696
+ },
1697
+ /**
1698
+ * Watch SignerRemoved events
1699
+ * @param callback Function to call when event is emitted
1700
+ * @param filter Optional filter for indexed parameters
1701
+ * @returns Unwatch function to stop listening
1702
+ */
1703
+ SignerRemoved: (callback: (event: { account: `0x${string}` }) => void, filter?: { account?: `0x${string}` | `0x${string}`[] | null }) => {
1704
+ return this.publicClient.watchContractEvent({
1705
+ address: this.contractAddress,
1706
+ abi: RaribleUserTokenAbi,
1707
+ eventName: 'SignerRemoved',
1708
+ args: filter as any,
1709
+ onLogs: (logs: any[]) => {
1710
+ logs.forEach((log: any) => {
1711
+ callback(log.args as any);
1712
+ });
1713
+ },
1714
+ }) as () => void;
1715
+ },
1716
+ /**
1717
+ * Watch TransferBatch events
1718
+ * @param callback Function to call when event is emitted
1719
+ * @param filter Optional filter for indexed parameters
1720
+ * @returns Unwatch function to stop listening
1721
+ */
1722
+ TransferBatch: (callback: (event: { _operator: `0x${string}`; _from: `0x${string}`; _to: `0x${string}`; _ids: bigint[]; _values: bigint[] }) => void, filter?: { _operator?: `0x${string}` | `0x${string}`[] | null; _from?: `0x${string}` | `0x${string}`[] | null; _to?: `0x${string}` | `0x${string}`[] | null }) => {
1723
+ return this.publicClient.watchContractEvent({
1724
+ address: this.contractAddress,
1725
+ abi: RaribleUserTokenAbi,
1726
+ eventName: 'TransferBatch',
1727
+ args: filter as any,
1728
+ onLogs: (logs: any[]) => {
1729
+ logs.forEach((log: any) => {
1730
+ callback(log.args as any);
1731
+ });
1732
+ },
1733
+ }) as () => void;
1734
+ },
1735
+ /**
1736
+ * Watch TransferSingle events
1737
+ * @param callback Function to call when event is emitted
1738
+ * @param filter Optional filter for indexed parameters
1739
+ * @returns Unwatch function to stop listening
1740
+ */
1741
+ TransferSingle: (callback: (event: { _operator: `0x${string}`; _from: `0x${string}`; _to: `0x${string}`; _id: bigint; _value: bigint }) => void, filter?: { _operator?: `0x${string}` | `0x${string}`[] | null; _from?: `0x${string}` | `0x${string}`[] | null; _to?: `0x${string}` | `0x${string}`[] | null }) => {
1742
+ return this.publicClient.watchContractEvent({
1743
+ address: this.contractAddress,
1744
+ abi: RaribleUserTokenAbi,
1745
+ eventName: 'TransferSingle',
1746
+ args: filter as any,
1747
+ onLogs: (logs: any[]) => {
1748
+ logs.forEach((log: any) => {
1749
+ callback(log.args as any);
1750
+ });
1751
+ },
1752
+ }) as () => void;
1753
+ },
1754
+ /**
1755
+ * Watch URI events
1756
+ * @param callback Function to call when event is emitted
1757
+ * @param filter Optional filter for indexed parameters
1758
+ * @returns Unwatch function to stop listening
1759
+ */
1760
+ URI: (callback: (event: { _value: string; _id: bigint }) => void, filter?: { _id?: bigint | bigint[] | null }) => {
1761
+ return this.publicClient.watchContractEvent({
1762
+ address: this.contractAddress,
1763
+ abi: RaribleUserTokenAbi,
1764
+ eventName: 'URI',
1765
+ args: filter as any,
1766
+ onLogs: (logs: any[]) => {
1767
+ logs.forEach((log: any) => {
1768
+ callback(log.args as any);
1769
+ });
1770
+ },
1771
+ }) as () => void;
1772
+ }
1773
+ };
1774
+ }
1775
+ }