@gitmyabi/erc1155upgradable 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,2579 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+ /**
5
+ * ERC1155Upgradable_json ABI
6
+ *
7
+ * This ABI is typed using viem's type system for full type safety.
8
+ */
9
+ export const ERC1155Upgradable_jsonAbi = [
10
+ {
11
+ "inputs": [],
12
+ "stateMutability": "nonpayable",
13
+ "type": "constructor"
14
+ },
15
+ {
16
+ "inputs": [
17
+ {
18
+ "internalType": "address",
19
+ "name": "operator",
20
+ "type": "address"
21
+ }
22
+ ],
23
+ "name": "OperatorNotAllowed",
24
+ "type": "error"
25
+ },
26
+ {
27
+ "anonymous": false,
28
+ "inputs": [
29
+ {
30
+ "indexed": true,
31
+ "internalType": "address",
32
+ "name": "account",
33
+ "type": "address"
34
+ },
35
+ {
36
+ "indexed": true,
37
+ "internalType": "address",
38
+ "name": "operator",
39
+ "type": "address"
40
+ },
41
+ {
42
+ "indexed": false,
43
+ "internalType": "bool",
44
+ "name": "approved",
45
+ "type": "bool"
46
+ }
47
+ ],
48
+ "name": "ApprovalForAll",
49
+ "type": "event"
50
+ },
51
+ {
52
+ "anonymous": false,
53
+ "inputs": [
54
+ {
55
+ "indexed": false,
56
+ "internalType": "uint8",
57
+ "name": "version",
58
+ "type": "uint8"
59
+ }
60
+ ],
61
+ "name": "Initialized",
62
+ "type": "event"
63
+ },
64
+ {
65
+ "anonymous": false,
66
+ "inputs": [
67
+ {
68
+ "indexed": true,
69
+ "internalType": "address",
70
+ "name": "previousOwner",
71
+ "type": "address"
72
+ },
73
+ {
74
+ "indexed": true,
75
+ "internalType": "address",
76
+ "name": "newOwner",
77
+ "type": "address"
78
+ }
79
+ ],
80
+ "name": "OwnershipTransferred",
81
+ "type": "event"
82
+ },
83
+ {
84
+ "anonymous": false,
85
+ "inputs": [
86
+ {
87
+ "indexed": true,
88
+ "internalType": "address",
89
+ "name": "operator",
90
+ "type": "address"
91
+ },
92
+ {
93
+ "indexed": true,
94
+ "internalType": "address",
95
+ "name": "from",
96
+ "type": "address"
97
+ },
98
+ {
99
+ "indexed": true,
100
+ "internalType": "address",
101
+ "name": "to",
102
+ "type": "address"
103
+ },
104
+ {
105
+ "indexed": false,
106
+ "internalType": "uint256[]",
107
+ "name": "ids",
108
+ "type": "uint256[]"
109
+ },
110
+ {
111
+ "indexed": false,
112
+ "internalType": "uint256[]",
113
+ "name": "values",
114
+ "type": "uint256[]"
115
+ }
116
+ ],
117
+ "name": "TransferBatch",
118
+ "type": "event"
119
+ },
120
+ {
121
+ "anonymous": false,
122
+ "inputs": [
123
+ {
124
+ "indexed": true,
125
+ "internalType": "address",
126
+ "name": "from",
127
+ "type": "address"
128
+ },
129
+ {
130
+ "indexed": true,
131
+ "internalType": "address",
132
+ "name": "to",
133
+ "type": "address"
134
+ },
135
+ {
136
+ "indexed": false,
137
+ "internalType": "uint256",
138
+ "name": "serial",
139
+ "type": "uint256"
140
+ }
141
+ ],
142
+ "name": "TransferSerial",
143
+ "type": "event"
144
+ },
145
+ {
146
+ "anonymous": false,
147
+ "inputs": [
148
+ {
149
+ "indexed": true,
150
+ "internalType": "address",
151
+ "name": "operator",
152
+ "type": "address"
153
+ },
154
+ {
155
+ "indexed": true,
156
+ "internalType": "address",
157
+ "name": "from",
158
+ "type": "address"
159
+ },
160
+ {
161
+ "indexed": true,
162
+ "internalType": "address",
163
+ "name": "to",
164
+ "type": "address"
165
+ },
166
+ {
167
+ "indexed": false,
168
+ "internalType": "uint256",
169
+ "name": "id",
170
+ "type": "uint256"
171
+ },
172
+ {
173
+ "indexed": false,
174
+ "internalType": "uint256",
175
+ "name": "value",
176
+ "type": "uint256"
177
+ }
178
+ ],
179
+ "name": "TransferSingle",
180
+ "type": "event"
181
+ },
182
+ {
183
+ "anonymous": false,
184
+ "inputs": [
185
+ {
186
+ "indexed": false,
187
+ "internalType": "string",
188
+ "name": "value",
189
+ "type": "string"
190
+ },
191
+ {
192
+ "indexed": true,
193
+ "internalType": "uint256",
194
+ "name": "id",
195
+ "type": "uint256"
196
+ }
197
+ ],
198
+ "name": "URI",
199
+ "type": "event"
200
+ },
201
+ {
202
+ "inputs": [
203
+ {
204
+ "internalType": "address",
205
+ "name": "who",
206
+ "type": "address"
207
+ },
208
+ {
209
+ "internalType": "bytes4",
210
+ "name": "functionSig",
211
+ "type": "bytes4"
212
+ },
213
+ {
214
+ "internalType": "uint256",
215
+ "name": "id",
216
+ "type": "uint256"
217
+ }
218
+ ],
219
+ "name": "addBypassRule",
220
+ "outputs": [],
221
+ "stateMutability": "nonpayable",
222
+ "type": "function"
223
+ },
224
+ {
225
+ "inputs": [
226
+ {
227
+ "internalType": "address",
228
+ "name": "account",
229
+ "type": "address"
230
+ },
231
+ {
232
+ "internalType": "uint256",
233
+ "name": "tokenId",
234
+ "type": "uint256"
235
+ }
236
+ ],
237
+ "name": "balanceOf",
238
+ "outputs": [
239
+ {
240
+ "internalType": "uint256",
241
+ "name": "",
242
+ "type": "uint256"
243
+ }
244
+ ],
245
+ "stateMutability": "view",
246
+ "type": "function"
247
+ },
248
+ {
249
+ "inputs": [
250
+ {
251
+ "internalType": "address[]",
252
+ "name": "accounts",
253
+ "type": "address[]"
254
+ },
255
+ {
256
+ "internalType": "uint256[]",
257
+ "name": "ids",
258
+ "type": "uint256[]"
259
+ }
260
+ ],
261
+ "name": "balanceOfBatch",
262
+ "outputs": [
263
+ {
264
+ "internalType": "uint256[]",
265
+ "name": "",
266
+ "type": "uint256[]"
267
+ }
268
+ ],
269
+ "stateMutability": "view",
270
+ "type": "function"
271
+ },
272
+ {
273
+ "inputs": [
274
+ {
275
+ "internalType": "address",
276
+ "name": "_from",
277
+ "type": "address"
278
+ },
279
+ {
280
+ "internalType": "uint256",
281
+ "name": "_tokenId",
282
+ "type": "uint256"
283
+ },
284
+ {
285
+ "internalType": "uint256",
286
+ "name": "_amount",
287
+ "type": "uint256"
288
+ }
289
+ ],
290
+ "name": "burn",
291
+ "outputs": [],
292
+ "stateMutability": "nonpayable",
293
+ "type": "function"
294
+ },
295
+ {
296
+ "inputs": [],
297
+ "name": "byPassable",
298
+ "outputs": [
299
+ {
300
+ "internalType": "bool",
301
+ "name": "",
302
+ "type": "bool"
303
+ }
304
+ ],
305
+ "stateMutability": "view",
306
+ "type": "function"
307
+ },
308
+ {
309
+ "inputs": [
310
+ {
311
+ "internalType": "address",
312
+ "name": "",
313
+ "type": "address"
314
+ },
315
+ {
316
+ "internalType": "bytes4",
317
+ "name": "",
318
+ "type": "bytes4"
319
+ }
320
+ ],
321
+ "name": "byPassableFunction",
322
+ "outputs": [
323
+ {
324
+ "internalType": "bool",
325
+ "name": "",
326
+ "type": "bool"
327
+ }
328
+ ],
329
+ "stateMutability": "view",
330
+ "type": "function"
331
+ },
332
+ {
333
+ "inputs": [
334
+ {
335
+ "internalType": "string",
336
+ "name": "_name",
337
+ "type": "string"
338
+ },
339
+ {
340
+ "internalType": "string",
341
+ "name": "_symbol",
342
+ "type": "string"
343
+ }
344
+ ],
345
+ "name": "changeName",
346
+ "outputs": [],
347
+ "stateMutability": "nonpayable",
348
+ "type": "function"
349
+ },
350
+ {
351
+ "inputs": [
352
+ {
353
+ "internalType": "uint256",
354
+ "name": "_type",
355
+ "type": "uint256"
356
+ }
357
+ ],
358
+ "name": "getAllRegisteredContractsOfType",
359
+ "outputs": [
360
+ {
361
+ "internalType": "address[]",
362
+ "name": "",
363
+ "type": "address[]"
364
+ }
365
+ ],
366
+ "stateMutability": "view",
367
+ "type": "function"
368
+ },
369
+ {
370
+ "inputs": [
371
+ {
372
+ "internalType": "address",
373
+ "name": "_owner",
374
+ "type": "address"
375
+ },
376
+ {
377
+ "internalType": "uint256",
378
+ "name": "tokenId",
379
+ "type": "uint256"
380
+ }
381
+ ],
382
+ "name": "getFirstSerialByOwner",
383
+ "outputs": [
384
+ {
385
+ "internalType": "uint256",
386
+ "name": "",
387
+ "type": "uint256"
388
+ }
389
+ ],
390
+ "stateMutability": "view",
391
+ "type": "function"
392
+ },
393
+ {
394
+ "inputs": [
395
+ {
396
+ "internalType": "uint256",
397
+ "name": "serialNumber",
398
+ "type": "uint256"
399
+ }
400
+ ],
401
+ "name": "getOwnerOfSerial",
402
+ "outputs": [
403
+ {
404
+ "internalType": "address",
405
+ "name": "",
406
+ "type": "address"
407
+ }
408
+ ],
409
+ "stateMutability": "view",
410
+ "type": "function"
411
+ },
412
+ {
413
+ "inputs": [
414
+ {
415
+ "internalType": "uint256",
416
+ "name": "tokenId",
417
+ "type": "uint256"
418
+ },
419
+ {
420
+ "internalType": "uint256",
421
+ "name": "index",
422
+ "type": "uint256"
423
+ }
424
+ ],
425
+ "name": "getSerial",
426
+ "outputs": [
427
+ {
428
+ "internalType": "uint256",
429
+ "name": "",
430
+ "type": "uint256"
431
+ }
432
+ ],
433
+ "stateMutability": "view",
434
+ "type": "function"
435
+ },
436
+ {
437
+ "inputs": [
438
+ {
439
+ "internalType": "address",
440
+ "name": "_owner",
441
+ "type": "address"
442
+ },
443
+ {
444
+ "internalType": "uint256",
445
+ "name": "tokenId",
446
+ "type": "uint256"
447
+ },
448
+ {
449
+ "internalType": "uint256",
450
+ "name": "index",
451
+ "type": "uint256"
452
+ }
453
+ ],
454
+ "name": "getSerialByOwnerAtIndex",
455
+ "outputs": [
456
+ {
457
+ "internalType": "uint256",
458
+ "name": "",
459
+ "type": "uint256"
460
+ }
461
+ ],
462
+ "stateMutability": "view",
463
+ "type": "function"
464
+ },
465
+ {
466
+ "inputs": [
467
+ {
468
+ "internalType": "uint256",
469
+ "name": "serialNumber",
470
+ "type": "uint256"
471
+ }
472
+ ],
473
+ "name": "getTokenIdForSerialNumber",
474
+ "outputs": [
475
+ {
476
+ "internalType": "uint256",
477
+ "name": "",
478
+ "type": "uint256"
479
+ }
480
+ ],
481
+ "stateMutability": "view",
482
+ "type": "function"
483
+ },
484
+ {
485
+ "inputs": [],
486
+ "name": "initialize",
487
+ "outputs": [],
488
+ "stateMutability": "nonpayable",
489
+ "type": "function"
490
+ },
491
+ {
492
+ "inputs": [
493
+ {
494
+ "internalType": "address",
495
+ "name": "account",
496
+ "type": "address"
497
+ },
498
+ {
499
+ "internalType": "address",
500
+ "name": "operator",
501
+ "type": "address"
502
+ }
503
+ ],
504
+ "name": "isApprovedForAll",
505
+ "outputs": [
506
+ {
507
+ "internalType": "bool",
508
+ "name": "",
509
+ "type": "bool"
510
+ }
511
+ ],
512
+ "stateMutability": "view",
513
+ "type": "function"
514
+ },
515
+ {
516
+ "inputs": [],
517
+ "name": "isClaimable",
518
+ "outputs": [
519
+ {
520
+ "internalType": "bool",
521
+ "name": "",
522
+ "type": "bool"
523
+ }
524
+ ],
525
+ "stateMutability": "view",
526
+ "type": "function"
527
+ },
528
+ {
529
+ "inputs": [],
530
+ "name": "isOverloadSerial",
531
+ "outputs": [
532
+ {
533
+ "internalType": "bool",
534
+ "name": "",
535
+ "type": "bool"
536
+ }
537
+ ],
538
+ "stateMutability": "view",
539
+ "type": "function"
540
+ },
541
+ {
542
+ "inputs": [
543
+ {
544
+ "internalType": "address",
545
+ "name": "_contract",
546
+ "type": "address"
547
+ },
548
+ {
549
+ "internalType": "uint256",
550
+ "name": "_type",
551
+ "type": "uint256"
552
+ }
553
+ ],
554
+ "name": "isRegistered",
555
+ "outputs": [
556
+ {
557
+ "internalType": "bool",
558
+ "name": "",
559
+ "type": "bool"
560
+ }
561
+ ],
562
+ "stateMutability": "view",
563
+ "type": "function"
564
+ },
565
+ {
566
+ "inputs": [],
567
+ "name": "isSerialized",
568
+ "outputs": [
569
+ {
570
+ "internalType": "bool",
571
+ "name": "",
572
+ "type": "bool"
573
+ }
574
+ ],
575
+ "stateMutability": "view",
576
+ "type": "function"
577
+ },
578
+ {
579
+ "inputs": [
580
+ {
581
+ "internalType": "uint256",
582
+ "name": "serialNumber",
583
+ "type": "uint256"
584
+ },
585
+ {
586
+ "internalType": "address",
587
+ "name": "account",
588
+ "type": "address"
589
+ },
590
+ {
591
+ "internalType": "uint256",
592
+ "name": "tokenId",
593
+ "type": "uint256"
594
+ }
595
+ ],
596
+ "name": "migrationMint",
597
+ "outputs": [],
598
+ "stateMutability": "nonpayable",
599
+ "type": "function"
600
+ },
601
+ {
602
+ "inputs": [
603
+ {
604
+ "internalType": "uint256[]",
605
+ "name": "serialNumber",
606
+ "type": "uint256[]"
607
+ },
608
+ {
609
+ "internalType": "address[]",
610
+ "name": "account",
611
+ "type": "address[]"
612
+ },
613
+ {
614
+ "internalType": "uint256[]",
615
+ "name": "tokenId",
616
+ "type": "uint256[]"
617
+ }
618
+ ],
619
+ "name": "migrationMintMany",
620
+ "outputs": [],
621
+ "stateMutability": "nonpayable",
622
+ "type": "function"
623
+ },
624
+ {
625
+ "inputs": [
626
+ {
627
+ "internalType": "address",
628
+ "name": "_to",
629
+ "type": "address"
630
+ },
631
+ {
632
+ "internalType": "uint256",
633
+ "name": "_tokenId",
634
+ "type": "uint256"
635
+ },
636
+ {
637
+ "internalType": "uint256",
638
+ "name": "_amount",
639
+ "type": "uint256"
640
+ }
641
+ ],
642
+ "name": "mint",
643
+ "outputs": [],
644
+ "stateMutability": "nonpayable",
645
+ "type": "function"
646
+ },
647
+ {
648
+ "inputs": [
649
+ {
650
+ "internalType": "address[]",
651
+ "name": "to",
652
+ "type": "address[]"
653
+ },
654
+ {
655
+ "internalType": "uint256[]",
656
+ "name": "ids",
657
+ "type": "uint256[]"
658
+ },
659
+ {
660
+ "internalType": "uint256[]",
661
+ "name": "amounts",
662
+ "type": "uint256[]"
663
+ },
664
+ {
665
+ "internalType": "bytes[]",
666
+ "name": "serialNumbers",
667
+ "type": "bytes[]"
668
+ }
669
+ ],
670
+ "name": "mintBatch",
671
+ "outputs": [],
672
+ "stateMutability": "nonpayable",
673
+ "type": "function"
674
+ },
675
+ {
676
+ "inputs": [
677
+ {
678
+ "internalType": "address",
679
+ "name": "_to",
680
+ "type": "address"
681
+ },
682
+ {
683
+ "internalType": "uint256",
684
+ "name": "_tokenId",
685
+ "type": "uint256"
686
+ },
687
+ {
688
+ "internalType": "uint256",
689
+ "name": "_amount",
690
+ "type": "uint256"
691
+ },
692
+ {
693
+ "internalType": "bytes",
694
+ "name": "serialNumber",
695
+ "type": "bytes"
696
+ }
697
+ ],
698
+ "name": "mintWithSerial",
699
+ "outputs": [],
700
+ "stateMutability": "nonpayable",
701
+ "type": "function"
702
+ },
703
+ {
704
+ "inputs": [],
705
+ "name": "owner",
706
+ "outputs": [
707
+ {
708
+ "internalType": "address",
709
+ "name": "",
710
+ "type": "address"
711
+ }
712
+ ],
713
+ "stateMutability": "view",
714
+ "type": "function"
715
+ },
716
+ {
717
+ "inputs": [
718
+ {
719
+ "internalType": "address",
720
+ "name": "_contract",
721
+ "type": "address"
722
+ },
723
+ {
724
+ "internalType": "uint256",
725
+ "name": "_type",
726
+ "type": "uint256"
727
+ }
728
+ ],
729
+ "name": "registerContract",
730
+ "outputs": [],
731
+ "stateMutability": "nonpayable",
732
+ "type": "function"
733
+ },
734
+ {
735
+ "inputs": [
736
+ {
737
+ "internalType": "address",
738
+ "name": "",
739
+ "type": "address"
740
+ }
741
+ ],
742
+ "name": "registeredContracts",
743
+ "outputs": [
744
+ {
745
+ "internalType": "uint256",
746
+ "name": "",
747
+ "type": "uint256"
748
+ }
749
+ ],
750
+ "stateMutability": "view",
751
+ "type": "function"
752
+ },
753
+ {
754
+ "inputs": [
755
+ {
756
+ "internalType": "address",
757
+ "name": "who",
758
+ "type": "address"
759
+ },
760
+ {
761
+ "internalType": "bytes4",
762
+ "name": "functionSig",
763
+ "type": "bytes4"
764
+ },
765
+ {
766
+ "internalType": "uint256",
767
+ "name": "id",
768
+ "type": "uint256"
769
+ }
770
+ ],
771
+ "name": "removeBypassRule",
772
+ "outputs": [],
773
+ "stateMutability": "nonpayable",
774
+ "type": "function"
775
+ },
776
+ {
777
+ "inputs": [],
778
+ "name": "renounceOwnership",
779
+ "outputs": [],
780
+ "stateMutability": "nonpayable",
781
+ "type": "function"
782
+ },
783
+ {
784
+ "inputs": [
785
+ {
786
+ "internalType": "uint256",
787
+ "name": "tokenId",
788
+ "type": "uint256"
789
+ },
790
+ {
791
+ "internalType": "uint256",
792
+ "name": "value",
793
+ "type": "uint256"
794
+ }
795
+ ],
796
+ "name": "royaltyInfo",
797
+ "outputs": [
798
+ {
799
+ "internalType": "address",
800
+ "name": "receiver",
801
+ "type": "address"
802
+ },
803
+ {
804
+ "internalType": "uint256",
805
+ "name": "royaltyAmount",
806
+ "type": "uint256"
807
+ }
808
+ ],
809
+ "stateMutability": "view",
810
+ "type": "function"
811
+ },
812
+ {
813
+ "inputs": [
814
+ {
815
+ "internalType": "address",
816
+ "name": "from",
817
+ "type": "address"
818
+ },
819
+ {
820
+ "internalType": "address",
821
+ "name": "to",
822
+ "type": "address"
823
+ },
824
+ {
825
+ "internalType": "uint256[]",
826
+ "name": "ids",
827
+ "type": "uint256[]"
828
+ },
829
+ {
830
+ "internalType": "uint256[]",
831
+ "name": "amounts",
832
+ "type": "uint256[]"
833
+ },
834
+ {
835
+ "internalType": "bytes",
836
+ "name": "data",
837
+ "type": "bytes"
838
+ }
839
+ ],
840
+ "name": "safeBatchTransferFrom",
841
+ "outputs": [],
842
+ "stateMutability": "nonpayable",
843
+ "type": "function"
844
+ },
845
+ {
846
+ "inputs": [
847
+ {
848
+ "internalType": "address",
849
+ "name": "from",
850
+ "type": "address"
851
+ },
852
+ {
853
+ "internalType": "address[]",
854
+ "name": "tos",
855
+ "type": "address[]"
856
+ },
857
+ {
858
+ "internalType": "uint256",
859
+ "name": "id",
860
+ "type": "uint256"
861
+ },
862
+ {
863
+ "internalType": "uint256",
864
+ "name": "amount",
865
+ "type": "uint256"
866
+ },
867
+ {
868
+ "internalType": "bytes",
869
+ "name": "data",
870
+ "type": "bytes"
871
+ }
872
+ ],
873
+ "name": "safeBatchTransferIdFrom",
874
+ "outputs": [],
875
+ "stateMutability": "nonpayable",
876
+ "type": "function"
877
+ },
878
+ {
879
+ "inputs": [
880
+ {
881
+ "internalType": "address",
882
+ "name": "from",
883
+ "type": "address"
884
+ },
885
+ {
886
+ "internalType": "address",
887
+ "name": "to",
888
+ "type": "address"
889
+ },
890
+ {
891
+ "internalType": "uint256",
892
+ "name": "id",
893
+ "type": "uint256"
894
+ },
895
+ {
896
+ "internalType": "uint256",
897
+ "name": "amount",
898
+ "type": "uint256"
899
+ },
900
+ {
901
+ "internalType": "bytes",
902
+ "name": "",
903
+ "type": "bytes"
904
+ }
905
+ ],
906
+ "name": "safeTransferFrom",
907
+ "outputs": [],
908
+ "stateMutability": "nonpayable",
909
+ "type": "function"
910
+ },
911
+ {
912
+ "inputs": [
913
+ {
914
+ "internalType": "address",
915
+ "name": "operator",
916
+ "type": "address"
917
+ },
918
+ {
919
+ "internalType": "bool",
920
+ "name": "approved",
921
+ "type": "bool"
922
+ }
923
+ ],
924
+ "name": "setApprovalForAll",
925
+ "outputs": [],
926
+ "stateMutability": "nonpayable",
927
+ "type": "function"
928
+ },
929
+ {
930
+ "inputs": [
931
+ {
932
+ "internalType": "uint256",
933
+ "name": "tokenId",
934
+ "type": "uint256"
935
+ },
936
+ {
937
+ "internalType": "address",
938
+ "name": "recipient",
939
+ "type": "address"
940
+ },
941
+ {
942
+ "internalType": "uint256",
943
+ "name": "value",
944
+ "type": "uint256"
945
+ }
946
+ ],
947
+ "name": "setTokenRoyalty",
948
+ "outputs": [],
949
+ "stateMutability": "nonpayable",
950
+ "type": "function"
951
+ },
952
+ {
953
+ "inputs": [
954
+ {
955
+ "internalType": "string",
956
+ "name": "newuri",
957
+ "type": "string"
958
+ }
959
+ ],
960
+ "name": "setURI",
961
+ "outputs": [],
962
+ "stateMutability": "nonpayable",
963
+ "type": "function"
964
+ },
965
+ {
966
+ "inputs": [],
967
+ "name": "streamAddress",
968
+ "outputs": [
969
+ {
970
+ "internalType": "address payable",
971
+ "name": "",
972
+ "type": "address"
973
+ }
974
+ ],
975
+ "stateMutability": "view",
976
+ "type": "function"
977
+ },
978
+ {
979
+ "inputs": [
980
+ {
981
+ "internalType": "bytes4",
982
+ "name": "interfaceId",
983
+ "type": "bytes4"
984
+ }
985
+ ],
986
+ "name": "supportsInterface",
987
+ "outputs": [
988
+ {
989
+ "internalType": "bool",
990
+ "name": "",
991
+ "type": "bool"
992
+ }
993
+ ],
994
+ "stateMutability": "view",
995
+ "type": "function"
996
+ },
997
+ {
998
+ "inputs": [],
999
+ "name": "toggleBypassability",
1000
+ "outputs": [],
1001
+ "stateMutability": "nonpayable",
1002
+ "type": "function"
1003
+ },
1004
+ {
1005
+ "inputs": [],
1006
+ "name": "toggleClaimable",
1007
+ "outputs": [],
1008
+ "stateMutability": "nonpayable",
1009
+ "type": "function"
1010
+ },
1011
+ {
1012
+ "inputs": [],
1013
+ "name": "toggleOverloadSerial",
1014
+ "outputs": [],
1015
+ "stateMutability": "nonpayable",
1016
+ "type": "function"
1017
+ },
1018
+ {
1019
+ "inputs": [],
1020
+ "name": "toggleSerialization",
1021
+ "outputs": [],
1022
+ "stateMutability": "nonpayable",
1023
+ "type": "function"
1024
+ },
1025
+ {
1026
+ "inputs": [
1027
+ {
1028
+ "internalType": "address",
1029
+ "name": "newOwner",
1030
+ "type": "address"
1031
+ }
1032
+ ],
1033
+ "name": "transferOwnership",
1034
+ "outputs": [],
1035
+ "stateMutability": "nonpayable",
1036
+ "type": "function"
1037
+ },
1038
+ {
1039
+ "inputs": [
1040
+ {
1041
+ "internalType": "address",
1042
+ "name": "_contract",
1043
+ "type": "address"
1044
+ },
1045
+ {
1046
+ "internalType": "uint256",
1047
+ "name": "index",
1048
+ "type": "uint256"
1049
+ }
1050
+ ],
1051
+ "name": "unregisterContract",
1052
+ "outputs": [],
1053
+ "stateMutability": "nonpayable",
1054
+ "type": "function"
1055
+ },
1056
+ {
1057
+ "inputs": [
1058
+ {
1059
+ "internalType": "address",
1060
+ "name": "oldContract",
1061
+ "type": "address"
1062
+ }
1063
+ ],
1064
+ "name": "upgradeFrom",
1065
+ "outputs": [],
1066
+ "stateMutability": "nonpayable",
1067
+ "type": "function"
1068
+ },
1069
+ {
1070
+ "inputs": [
1071
+ {
1072
+ "internalType": "uint256",
1073
+ "name": "_tokenId",
1074
+ "type": "uint256"
1075
+ }
1076
+ ],
1077
+ "name": "uri",
1078
+ "outputs": [
1079
+ {
1080
+ "internalType": "string",
1081
+ "name": "",
1082
+ "type": "string"
1083
+ }
1084
+ ],
1085
+ "stateMutability": "view",
1086
+ "type": "function"
1087
+ },
1088
+ {
1089
+ "inputs": [],
1090
+ "name": "version",
1091
+ "outputs": [
1092
+ {
1093
+ "internalType": "uint256",
1094
+ "name": "",
1095
+ "type": "uint256"
1096
+ }
1097
+ ],
1098
+ "stateMutability": "pure",
1099
+ "type": "function"
1100
+ }
1101
+ ] as const satisfies Abi;
1102
+
1103
+ /**
1104
+ * Type-safe ABI for ERC1155Upgradable_json
1105
+ */
1106
+ export type ERC1155Upgradable_jsonAbi = typeof ERC1155Upgradable_jsonAbi;
1107
+
1108
+ /**
1109
+ * Contract instance type for ERC1155Upgradable_json
1110
+ */
1111
+ // Use any for contract type to avoid complex viem type issues
1112
+ // The runtime behavior is type-safe through viem's ABI typing
1113
+ export type ERC1155Upgradable_jsonContract = any;
1114
+
1115
+ /**
1116
+ * ERC1155Upgradable_json Contract Class
1117
+ *
1118
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
1119
+ *
1120
+ * @example
1121
+ * ```typescript
1122
+ * import { createPublicClient, createWalletClient, http } from 'viem';
1123
+ * import { mainnet } from 'viem/chains';
1124
+ * import { ERC1155Upgradable_json } from 'ERC1155Upgradable_json';
1125
+ *
1126
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
1127
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
1128
+ *
1129
+ * const contract = new ERC1155Upgradable_json('0x...', { publicClient, walletClient });
1130
+ *
1131
+ * // Read functions
1132
+ * const result = await contract.balanceOf('0x...');
1133
+ *
1134
+ * // Write functions
1135
+ * const hash = await contract.transfer('0x...', 1000n);
1136
+ *
1137
+ * // Simulate transactions (dry-run)
1138
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
1139
+ * console.log('Gas estimate:', simulation.request.gas);
1140
+ *
1141
+ * // Watch events
1142
+ * const unwatch = contract.watch.Transfer((event) => {
1143
+ * console.log('Transfer event:', event);
1144
+ * });
1145
+ * ```
1146
+ */
1147
+ export class ERC1155Upgradable_json {
1148
+ private contract: ERC1155Upgradable_jsonContract;
1149
+ private contractAddress: Address;
1150
+ private publicClient: PublicClient;
1151
+
1152
+ constructor(
1153
+ address: Address,
1154
+ clients: {
1155
+ publicClient: PublicClient;
1156
+ walletClient?: WalletClient;
1157
+ }
1158
+ ) {
1159
+ this.contractAddress = address;
1160
+ this.publicClient = clients.publicClient;
1161
+ this.contract = getContract({
1162
+ address,
1163
+ abi: ERC1155Upgradable_jsonAbi,
1164
+ client: {
1165
+ public: clients.publicClient,
1166
+ wallet: clients.walletClient,
1167
+ },
1168
+ });
1169
+ }
1170
+
1171
+ /**
1172
+ * Get the contract address
1173
+ */
1174
+ get address(): Address {
1175
+ return this.contractAddress;
1176
+ }
1177
+
1178
+ /**
1179
+ * Get the underlying viem contract instance
1180
+ */
1181
+ getContract(): ERC1155Upgradable_jsonContract {
1182
+ return this.contract;
1183
+ }
1184
+
1185
+ /**
1186
+ * balanceOf
1187
+ * view
1188
+ */
1189
+ async balanceOf(account: `0x${string}`, tokenId: bigint): Promise<bigint> {
1190
+ return this.contract.read.balanceOf([account, tokenId] as const) as Promise<bigint>;
1191
+ }
1192
+
1193
+ /**
1194
+ * balanceOfBatch
1195
+ * view
1196
+ */
1197
+ async balanceOfBatch(accounts: `0x${string}`[], ids: bigint[]): Promise<bigint[]> {
1198
+ return this.contract.read.balanceOfBatch([accounts, ids] as const) as Promise<bigint[]>;
1199
+ }
1200
+
1201
+ /**
1202
+ * byPassable
1203
+ * view
1204
+ */
1205
+ async byPassable(): Promise<boolean> {
1206
+ return this.contract.read.byPassable() as Promise<boolean>;
1207
+ }
1208
+
1209
+ /**
1210
+ * byPassableFunction
1211
+ * view
1212
+ */
1213
+ async byPassableFunction(arg0: `0x${string}`, arg1: `0x${string}`): Promise<boolean> {
1214
+ return this.contract.read.byPassableFunction([arg0, arg1] as const) as Promise<boolean>;
1215
+ }
1216
+
1217
+ /**
1218
+ * getAllRegisteredContractsOfType
1219
+ * view
1220
+ */
1221
+ async getAllRegisteredContractsOfType(_type: bigint): Promise<`0x${string}`[]> {
1222
+ return this.contract.read.getAllRegisteredContractsOfType([_type] as const) as Promise<`0x${string}`[]>;
1223
+ }
1224
+
1225
+ /**
1226
+ * getFirstSerialByOwner
1227
+ * view
1228
+ */
1229
+ async getFirstSerialByOwner(_owner: `0x${string}`, tokenId: bigint): Promise<bigint> {
1230
+ return this.contract.read.getFirstSerialByOwner([_owner, tokenId] as const) as Promise<bigint>;
1231
+ }
1232
+
1233
+ /**
1234
+ * getOwnerOfSerial
1235
+ * view
1236
+ */
1237
+ async getOwnerOfSerial(serialNumber: bigint): Promise<`0x${string}`> {
1238
+ return this.contract.read.getOwnerOfSerial([serialNumber] as const) as Promise<`0x${string}`>;
1239
+ }
1240
+
1241
+ /**
1242
+ * getSerial
1243
+ * view
1244
+ */
1245
+ async getSerial(tokenId: bigint, index: bigint): Promise<bigint> {
1246
+ return this.contract.read.getSerial([tokenId, index] as const) as Promise<bigint>;
1247
+ }
1248
+
1249
+ /**
1250
+ * getSerialByOwnerAtIndex
1251
+ * view
1252
+ */
1253
+ async getSerialByOwnerAtIndex(_owner: `0x${string}`, tokenId: bigint, index: bigint): Promise<bigint> {
1254
+ return this.contract.read.getSerialByOwnerAtIndex([_owner, tokenId, index] as const) as Promise<bigint>;
1255
+ }
1256
+
1257
+ /**
1258
+ * getTokenIdForSerialNumber
1259
+ * view
1260
+ */
1261
+ async getTokenIdForSerialNumber(serialNumber: bigint): Promise<bigint> {
1262
+ return this.contract.read.getTokenIdForSerialNumber([serialNumber] as const) as Promise<bigint>;
1263
+ }
1264
+
1265
+ /**
1266
+ * isApprovedForAll
1267
+ * view
1268
+ */
1269
+ async isApprovedForAll(account: `0x${string}`, operator: `0x${string}`): Promise<boolean> {
1270
+ return this.contract.read.isApprovedForAll([account, operator] as const) as Promise<boolean>;
1271
+ }
1272
+
1273
+ /**
1274
+ * isClaimable
1275
+ * view
1276
+ */
1277
+ async isClaimable(): Promise<boolean> {
1278
+ return this.contract.read.isClaimable() as Promise<boolean>;
1279
+ }
1280
+
1281
+ /**
1282
+ * isOverloadSerial
1283
+ * view
1284
+ */
1285
+ async isOverloadSerial(): Promise<boolean> {
1286
+ return this.contract.read.isOverloadSerial() as Promise<boolean>;
1287
+ }
1288
+
1289
+ /**
1290
+ * isRegistered
1291
+ * view
1292
+ */
1293
+ async isRegistered(_contract: `0x${string}`, _type: bigint): Promise<boolean> {
1294
+ return this.contract.read.isRegistered([_contract, _type] as const) as Promise<boolean>;
1295
+ }
1296
+
1297
+ /**
1298
+ * isSerialized
1299
+ * view
1300
+ */
1301
+ async isSerialized(): Promise<boolean> {
1302
+ return this.contract.read.isSerialized() as Promise<boolean>;
1303
+ }
1304
+
1305
+ /**
1306
+ * owner
1307
+ * view
1308
+ */
1309
+ async owner(): Promise<`0x${string}`> {
1310
+ return this.contract.read.owner() as Promise<`0x${string}`>;
1311
+ }
1312
+
1313
+ /**
1314
+ * registeredContracts
1315
+ * view
1316
+ */
1317
+ async registeredContracts(arg0: `0x${string}`): Promise<bigint> {
1318
+ return this.contract.read.registeredContracts([arg0] as const) as Promise<bigint>;
1319
+ }
1320
+
1321
+ /**
1322
+ * royaltyInfo
1323
+ * view
1324
+ */
1325
+ async royaltyInfo(tokenId: bigint, value: bigint): Promise<[`0x${string}`, bigint]> {
1326
+ return this.contract.read.royaltyInfo([tokenId, value] as const) as Promise<[`0x${string}`, bigint]>;
1327
+ }
1328
+
1329
+ /**
1330
+ * streamAddress
1331
+ * view
1332
+ */
1333
+ async streamAddress(): Promise<`0x${string}`> {
1334
+ return this.contract.read.streamAddress() as Promise<`0x${string}`>;
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
+ * uri
1347
+ * view
1348
+ */
1349
+ async uri(_tokenId: bigint): Promise<string> {
1350
+ return this.contract.read.uri([_tokenId] as const) as Promise<string>;
1351
+ }
1352
+
1353
+ /**
1354
+ * version
1355
+ * pure
1356
+ */
1357
+ async version(): Promise<bigint> {
1358
+ return this.contract.read.version() as Promise<bigint>;
1359
+ }
1360
+
1361
+ /**
1362
+ * addBypassRule
1363
+ * nonpayable
1364
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1365
+ */
1366
+ async addBypassRule(who: `0x${string}`, functionSig: `0x${string}`, id: bigint, 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.addBypassRule([who, functionSig, id] as const, options) as Promise<`0x${string}`>;
1382
+ }
1383
+
1384
+ /**
1385
+ * burn
1386
+ * nonpayable
1387
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1388
+ */
1389
+ async burn(_from: `0x${string}`, _tokenId: bigint, _amount: bigint, 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.burn([_from, _tokenId, _amount] as const, options) as Promise<`0x${string}`>;
1405
+ }
1406
+
1407
+ /**
1408
+ * changeName
1409
+ * nonpayable
1410
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1411
+ */
1412
+ async changeName(_name: string, _symbol: 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.changeName([_name, _symbol] as const, options) as Promise<`0x${string}`>;
1428
+ }
1429
+
1430
+ /**
1431
+ * initialize
1432
+ * nonpayable
1433
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1434
+ */
1435
+ async initialize(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.initialize(options) as Promise<`0x${string}`>;
1451
+ }
1452
+
1453
+ /**
1454
+ * migrationMint
1455
+ * nonpayable
1456
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1457
+ */
1458
+ async migrationMint(serialNumber: bigint, account: `0x${string}`, tokenId: 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.migrationMint([serialNumber, account, tokenId] as const, options) as Promise<`0x${string}`>;
1474
+ }
1475
+
1476
+ /**
1477
+ * migrationMintMany
1478
+ * nonpayable
1479
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1480
+ */
1481
+ async migrationMintMany(serialNumber: bigint[], account: `0x${string}`[], tokenId: 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.migrationMintMany([serialNumber, account, tokenId] as const, options) as Promise<`0x${string}`>;
1497
+ }
1498
+
1499
+ /**
1500
+ * mint
1501
+ * nonpayable
1502
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1503
+ */
1504
+ async mint(_to: `0x${string}`, _tokenId: bigint, _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.mint([_to, _tokenId, _amount] as const, options) as Promise<`0x${string}`>;
1520
+ }
1521
+
1522
+ /**
1523
+ * mintBatch
1524
+ * nonpayable
1525
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1526
+ */
1527
+ async mintBatch(to: `0x${string}`[], ids: bigint[], amounts: bigint[], serialNumbers: `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.mintBatch([to, ids, amounts, serialNumbers] as const, options) as Promise<`0x${string}`>;
1543
+ }
1544
+
1545
+ /**
1546
+ * mintWithSerial
1547
+ * nonpayable
1548
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1549
+ */
1550
+ async mintWithSerial(_to: `0x${string}`, _tokenId: bigint, _amount: bigint, serialNumber: `0x${string}`, 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.mintWithSerial([_to, _tokenId, _amount, serialNumber] as const, options) as Promise<`0x${string}`>;
1566
+ }
1567
+
1568
+ /**
1569
+ * registerContract
1570
+ * nonpayable
1571
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1572
+ */
1573
+ async registerContract(_contract: `0x${string}`, _type: bigint, 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.registerContract([_contract, _type] as const, options) as Promise<`0x${string}`>;
1589
+ }
1590
+
1591
+ /**
1592
+ * removeBypassRule
1593
+ * nonpayable
1594
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1595
+ */
1596
+ async removeBypassRule(who: `0x${string}`, functionSig: `0x${string}`, id: bigint, 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.removeBypassRule([who, functionSig, id] as const, options) as Promise<`0x${string}`>;
1612
+ }
1613
+
1614
+ /**
1615
+ * renounceOwnership
1616
+ * nonpayable
1617
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1618
+ */
1619
+ async renounceOwnership(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.renounceOwnership(options) as Promise<`0x${string}`>;
1635
+ }
1636
+
1637
+ /**
1638
+ * safeBatchTransferFrom
1639
+ * nonpayable
1640
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1641
+ */
1642
+ async safeBatchTransferFrom(from: `0x${string}`, to: `0x${string}`, ids: bigint[], amounts: bigint[], data: `0x${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.safeBatchTransferFrom([from, to, ids, amounts, data] as const, options) as Promise<`0x${string}`>;
1658
+ }
1659
+
1660
+ /**
1661
+ * safeBatchTransferIdFrom
1662
+ * nonpayable
1663
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1664
+ */
1665
+ async safeBatchTransferIdFrom(from: `0x${string}`, tos: `0x${string}`[], id: bigint, amount: bigint, data: `0x${string}`, 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.safeBatchTransferIdFrom([from, tos, id, amount, data] as const, options) as Promise<`0x${string}`>;
1681
+ }
1682
+
1683
+ /**
1684
+ * safeTransferFrom
1685
+ * nonpayable
1686
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1687
+ */
1688
+ async safeTransferFrom(from: `0x${string}`, to: `0x${string}`, id: bigint, amount: bigint, arg4: `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.safeTransferFrom([from, to, id, amount, arg4] as const, options) as Promise<`0x${string}`>;
1704
+ }
1705
+
1706
+ /**
1707
+ * setApprovalForAll
1708
+ * nonpayable
1709
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1710
+ */
1711
+ async setApprovalForAll(operator: `0x${string}`, approved: boolean, 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.setApprovalForAll([operator, approved] as const, options) as Promise<`0x${string}`>;
1727
+ }
1728
+
1729
+ /**
1730
+ * setTokenRoyalty
1731
+ * nonpayable
1732
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1733
+ */
1734
+ async setTokenRoyalty(tokenId: bigint, recipient: `0x${string}`, value: bigint, options?: {
1735
+ accessList?: import('viem').AccessList;
1736
+ authorizationList?: import('viem').AuthorizationList;
1737
+ chain?: import('viem').Chain | null;
1738
+ dataSuffix?: `0x${string}`;
1739
+ gas?: bigint;
1740
+ gasPrice?: bigint;
1741
+ maxFeePerGas?: bigint;
1742
+ maxPriorityFeePerGas?: bigint;
1743
+ nonce?: number;
1744
+ value?: bigint;
1745
+ }): Promise<`0x${string}`> {
1746
+ if (!this.contract.write) {
1747
+ throw new Error('Wallet client is required for write operations');
1748
+ }
1749
+ return this.contract.write.setTokenRoyalty([tokenId, recipient, value] as const, options) as Promise<`0x${string}`>;
1750
+ }
1751
+
1752
+ /**
1753
+ * setURI
1754
+ * nonpayable
1755
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1756
+ */
1757
+ async setURI(newuri: string, options?: {
1758
+ accessList?: import('viem').AccessList;
1759
+ authorizationList?: import('viem').AuthorizationList;
1760
+ chain?: import('viem').Chain | null;
1761
+ dataSuffix?: `0x${string}`;
1762
+ gas?: bigint;
1763
+ gasPrice?: bigint;
1764
+ maxFeePerGas?: bigint;
1765
+ maxPriorityFeePerGas?: bigint;
1766
+ nonce?: number;
1767
+ value?: bigint;
1768
+ }): Promise<`0x${string}`> {
1769
+ if (!this.contract.write) {
1770
+ throw new Error('Wallet client is required for write operations');
1771
+ }
1772
+ return this.contract.write.setURI([newuri] as const, options) as Promise<`0x${string}`>;
1773
+ }
1774
+
1775
+ /**
1776
+ * toggleBypassability
1777
+ * nonpayable
1778
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1779
+ */
1780
+ async toggleBypassability(options?: {
1781
+ accessList?: import('viem').AccessList;
1782
+ authorizationList?: import('viem').AuthorizationList;
1783
+ chain?: import('viem').Chain | null;
1784
+ dataSuffix?: `0x${string}`;
1785
+ gas?: bigint;
1786
+ gasPrice?: bigint;
1787
+ maxFeePerGas?: bigint;
1788
+ maxPriorityFeePerGas?: bigint;
1789
+ nonce?: number;
1790
+ value?: bigint;
1791
+ }): Promise<`0x${string}`> {
1792
+ if (!this.contract.write) {
1793
+ throw new Error('Wallet client is required for write operations');
1794
+ }
1795
+ return this.contract.write.toggleBypassability(options) as Promise<`0x${string}`>;
1796
+ }
1797
+
1798
+ /**
1799
+ * toggleClaimable
1800
+ * nonpayable
1801
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1802
+ */
1803
+ async toggleClaimable(options?: {
1804
+ accessList?: import('viem').AccessList;
1805
+ authorizationList?: import('viem').AuthorizationList;
1806
+ chain?: import('viem').Chain | null;
1807
+ dataSuffix?: `0x${string}`;
1808
+ gas?: bigint;
1809
+ gasPrice?: bigint;
1810
+ maxFeePerGas?: bigint;
1811
+ maxPriorityFeePerGas?: bigint;
1812
+ nonce?: number;
1813
+ value?: bigint;
1814
+ }): Promise<`0x${string}`> {
1815
+ if (!this.contract.write) {
1816
+ throw new Error('Wallet client is required for write operations');
1817
+ }
1818
+ return this.contract.write.toggleClaimable(options) as Promise<`0x${string}`>;
1819
+ }
1820
+
1821
+ /**
1822
+ * toggleOverloadSerial
1823
+ * nonpayable
1824
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1825
+ */
1826
+ async toggleOverloadSerial(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<`0x${string}`> {
1838
+ if (!this.contract.write) {
1839
+ throw new Error('Wallet client is required for write operations');
1840
+ }
1841
+ return this.contract.write.toggleOverloadSerial(options) as Promise<`0x${string}`>;
1842
+ }
1843
+
1844
+ /**
1845
+ * toggleSerialization
1846
+ * nonpayable
1847
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1848
+ */
1849
+ async toggleSerialization(options?: {
1850
+ accessList?: import('viem').AccessList;
1851
+ authorizationList?: import('viem').AuthorizationList;
1852
+ chain?: import('viem').Chain | null;
1853
+ dataSuffix?: `0x${string}`;
1854
+ gas?: bigint;
1855
+ gasPrice?: bigint;
1856
+ maxFeePerGas?: bigint;
1857
+ maxPriorityFeePerGas?: bigint;
1858
+ nonce?: number;
1859
+ value?: bigint;
1860
+ }): Promise<`0x${string}`> {
1861
+ if (!this.contract.write) {
1862
+ throw new Error('Wallet client is required for write operations');
1863
+ }
1864
+ return this.contract.write.toggleSerialization(options) as Promise<`0x${string}`>;
1865
+ }
1866
+
1867
+ /**
1868
+ * transferOwnership
1869
+ * nonpayable
1870
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1871
+ */
1872
+ async transferOwnership(newOwner: `0x${string}`, options?: {
1873
+ accessList?: import('viem').AccessList;
1874
+ authorizationList?: import('viem').AuthorizationList;
1875
+ chain?: import('viem').Chain | null;
1876
+ dataSuffix?: `0x${string}`;
1877
+ gas?: bigint;
1878
+ gasPrice?: bigint;
1879
+ maxFeePerGas?: bigint;
1880
+ maxPriorityFeePerGas?: bigint;
1881
+ nonce?: number;
1882
+ value?: bigint;
1883
+ }): Promise<`0x${string}`> {
1884
+ if (!this.contract.write) {
1885
+ throw new Error('Wallet client is required for write operations');
1886
+ }
1887
+ return this.contract.write.transferOwnership([newOwner] as const, options) as Promise<`0x${string}`>;
1888
+ }
1889
+
1890
+ /**
1891
+ * unregisterContract
1892
+ * nonpayable
1893
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1894
+ */
1895
+ async unregisterContract(_contract: `0x${string}`, index: bigint, options?: {
1896
+ accessList?: import('viem').AccessList;
1897
+ authorizationList?: import('viem').AuthorizationList;
1898
+ chain?: import('viem').Chain | null;
1899
+ dataSuffix?: `0x${string}`;
1900
+ gas?: bigint;
1901
+ gasPrice?: bigint;
1902
+ maxFeePerGas?: bigint;
1903
+ maxPriorityFeePerGas?: bigint;
1904
+ nonce?: number;
1905
+ value?: bigint;
1906
+ }): Promise<`0x${string}`> {
1907
+ if (!this.contract.write) {
1908
+ throw new Error('Wallet client is required for write operations');
1909
+ }
1910
+ return this.contract.write.unregisterContract([_contract, index] as const, options) as Promise<`0x${string}`>;
1911
+ }
1912
+
1913
+ /**
1914
+ * upgradeFrom
1915
+ * nonpayable
1916
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1917
+ */
1918
+ async upgradeFrom(oldContract: `0x${string}`, options?: {
1919
+ accessList?: import('viem').AccessList;
1920
+ authorizationList?: import('viem').AuthorizationList;
1921
+ chain?: import('viem').Chain | null;
1922
+ dataSuffix?: `0x${string}`;
1923
+ gas?: bigint;
1924
+ gasPrice?: bigint;
1925
+ maxFeePerGas?: bigint;
1926
+ maxPriorityFeePerGas?: bigint;
1927
+ nonce?: number;
1928
+ value?: bigint;
1929
+ }): Promise<`0x${string}`> {
1930
+ if (!this.contract.write) {
1931
+ throw new Error('Wallet client is required for write operations');
1932
+ }
1933
+ return this.contract.write.upgradeFrom([oldContract] as const, options) as Promise<`0x${string}`>;
1934
+ }
1935
+
1936
+
1937
+
1938
+ /**
1939
+ * Simulate contract write operations (dry-run without sending transaction)
1940
+ *
1941
+ * @example
1942
+ * const result = await contract.simulate.transfer('0x...', 1000n);
1943
+ * console.log('Gas estimate:', result.request.gas);
1944
+ * console.log('Would succeed:', result.result);
1945
+ */
1946
+ get simulate() {
1947
+ const contract = this.contract;
1948
+ if (!contract.simulate) {
1949
+ throw new Error('Public client is required for simulation');
1950
+ }
1951
+ return {
1952
+ /**
1953
+ * Simulate addBypassRule
1954
+ * Returns gas estimate and result without sending transaction
1955
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1956
+ */
1957
+ async addBypassRule(who: `0x${string}`, functionSig: `0x${string}`, id: bigint, options?: {
1958
+ accessList?: import('viem').AccessList;
1959
+ authorizationList?: import('viem').AuthorizationList;
1960
+ chain?: import('viem').Chain | null;
1961
+ dataSuffix?: `0x${string}`;
1962
+ gas?: bigint;
1963
+ gasPrice?: bigint;
1964
+ maxFeePerGas?: bigint;
1965
+ maxPriorityFeePerGas?: bigint;
1966
+ nonce?: number;
1967
+ value?: bigint;
1968
+ }): Promise<void> {
1969
+ return contract.simulate.addBypassRule([who, functionSig, id] as const, options) as Promise<void>;
1970
+ },
1971
+ /**
1972
+ * Simulate burn
1973
+ * Returns gas estimate and result without sending transaction
1974
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1975
+ */
1976
+ async burn(_from: `0x${string}`, _tokenId: bigint, _amount: bigint, options?: {
1977
+ accessList?: import('viem').AccessList;
1978
+ authorizationList?: import('viem').AuthorizationList;
1979
+ chain?: import('viem').Chain | null;
1980
+ dataSuffix?: `0x${string}`;
1981
+ gas?: bigint;
1982
+ gasPrice?: bigint;
1983
+ maxFeePerGas?: bigint;
1984
+ maxPriorityFeePerGas?: bigint;
1985
+ nonce?: number;
1986
+ value?: bigint;
1987
+ }): Promise<void> {
1988
+ return contract.simulate.burn([_from, _tokenId, _amount] as const, options) as Promise<void>;
1989
+ },
1990
+ /**
1991
+ * Simulate changeName
1992
+ * Returns gas estimate and result without sending transaction
1993
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1994
+ */
1995
+ async changeName(_name: string, _symbol: string, options?: {
1996
+ accessList?: import('viem').AccessList;
1997
+ authorizationList?: import('viem').AuthorizationList;
1998
+ chain?: import('viem').Chain | null;
1999
+ dataSuffix?: `0x${string}`;
2000
+ gas?: bigint;
2001
+ gasPrice?: bigint;
2002
+ maxFeePerGas?: bigint;
2003
+ maxPriorityFeePerGas?: bigint;
2004
+ nonce?: number;
2005
+ value?: bigint;
2006
+ }): Promise<void> {
2007
+ return contract.simulate.changeName([_name, _symbol] as const, options) as Promise<void>;
2008
+ },
2009
+ /**
2010
+ * Simulate initialize
2011
+ * Returns gas estimate and result without sending transaction
2012
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2013
+ */
2014
+ async initialize(options?: {
2015
+ accessList?: import('viem').AccessList;
2016
+ authorizationList?: import('viem').AuthorizationList;
2017
+ chain?: import('viem').Chain | null;
2018
+ dataSuffix?: `0x${string}`;
2019
+ gas?: bigint;
2020
+ gasPrice?: bigint;
2021
+ maxFeePerGas?: bigint;
2022
+ maxPriorityFeePerGas?: bigint;
2023
+ nonce?: number;
2024
+ value?: bigint;
2025
+ }): Promise<void> {
2026
+ return contract.simulate.initialize(options) as Promise<void>;
2027
+ },
2028
+ /**
2029
+ * Simulate migrationMint
2030
+ * Returns gas estimate and result without sending transaction
2031
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2032
+ */
2033
+ async migrationMint(serialNumber: bigint, account: `0x${string}`, tokenId: bigint, options?: {
2034
+ accessList?: import('viem').AccessList;
2035
+ authorizationList?: import('viem').AuthorizationList;
2036
+ chain?: import('viem').Chain | null;
2037
+ dataSuffix?: `0x${string}`;
2038
+ gas?: bigint;
2039
+ gasPrice?: bigint;
2040
+ maxFeePerGas?: bigint;
2041
+ maxPriorityFeePerGas?: bigint;
2042
+ nonce?: number;
2043
+ value?: bigint;
2044
+ }): Promise<void> {
2045
+ return contract.simulate.migrationMint([serialNumber, account, tokenId] as const, options) as Promise<void>;
2046
+ },
2047
+ /**
2048
+ * Simulate migrationMintMany
2049
+ * Returns gas estimate and result without sending transaction
2050
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2051
+ */
2052
+ async migrationMintMany(serialNumber: bigint[], account: `0x${string}`[], tokenId: bigint[], options?: {
2053
+ accessList?: import('viem').AccessList;
2054
+ authorizationList?: import('viem').AuthorizationList;
2055
+ chain?: import('viem').Chain | null;
2056
+ dataSuffix?: `0x${string}`;
2057
+ gas?: bigint;
2058
+ gasPrice?: bigint;
2059
+ maxFeePerGas?: bigint;
2060
+ maxPriorityFeePerGas?: bigint;
2061
+ nonce?: number;
2062
+ value?: bigint;
2063
+ }): Promise<void> {
2064
+ return contract.simulate.migrationMintMany([serialNumber, account, tokenId] as const, options) as Promise<void>;
2065
+ },
2066
+ /**
2067
+ * Simulate mint
2068
+ * Returns gas estimate and result without sending transaction
2069
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2070
+ */
2071
+ async mint(_to: `0x${string}`, _tokenId: bigint, _amount: bigint, options?: {
2072
+ accessList?: import('viem').AccessList;
2073
+ authorizationList?: import('viem').AuthorizationList;
2074
+ chain?: import('viem').Chain | null;
2075
+ dataSuffix?: `0x${string}`;
2076
+ gas?: bigint;
2077
+ gasPrice?: bigint;
2078
+ maxFeePerGas?: bigint;
2079
+ maxPriorityFeePerGas?: bigint;
2080
+ nonce?: number;
2081
+ value?: bigint;
2082
+ }): Promise<void> {
2083
+ return contract.simulate.mint([_to, _tokenId, _amount] as const, options) as Promise<void>;
2084
+ },
2085
+ /**
2086
+ * Simulate mintBatch
2087
+ * Returns gas estimate and result without sending transaction
2088
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2089
+ */
2090
+ async mintBatch(to: `0x${string}`[], ids: bigint[], amounts: bigint[], serialNumbers: `0x${string}`[], options?: {
2091
+ accessList?: import('viem').AccessList;
2092
+ authorizationList?: import('viem').AuthorizationList;
2093
+ chain?: import('viem').Chain | null;
2094
+ dataSuffix?: `0x${string}`;
2095
+ gas?: bigint;
2096
+ gasPrice?: bigint;
2097
+ maxFeePerGas?: bigint;
2098
+ maxPriorityFeePerGas?: bigint;
2099
+ nonce?: number;
2100
+ value?: bigint;
2101
+ }): Promise<void> {
2102
+ return contract.simulate.mintBatch([to, ids, amounts, serialNumbers] as const, options) as Promise<void>;
2103
+ },
2104
+ /**
2105
+ * Simulate mintWithSerial
2106
+ * Returns gas estimate and result without sending transaction
2107
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2108
+ */
2109
+ async mintWithSerial(_to: `0x${string}`, _tokenId: bigint, _amount: bigint, serialNumber: `0x${string}`, options?: {
2110
+ accessList?: import('viem').AccessList;
2111
+ authorizationList?: import('viem').AuthorizationList;
2112
+ chain?: import('viem').Chain | null;
2113
+ dataSuffix?: `0x${string}`;
2114
+ gas?: bigint;
2115
+ gasPrice?: bigint;
2116
+ maxFeePerGas?: bigint;
2117
+ maxPriorityFeePerGas?: bigint;
2118
+ nonce?: number;
2119
+ value?: bigint;
2120
+ }): Promise<void> {
2121
+ return contract.simulate.mintWithSerial([_to, _tokenId, _amount, serialNumber] as const, options) as Promise<void>;
2122
+ },
2123
+ /**
2124
+ * Simulate registerContract
2125
+ * Returns gas estimate and result without sending transaction
2126
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2127
+ */
2128
+ async registerContract(_contract: `0x${string}`, _type: bigint, options?: {
2129
+ accessList?: import('viem').AccessList;
2130
+ authorizationList?: import('viem').AuthorizationList;
2131
+ chain?: import('viem').Chain | null;
2132
+ dataSuffix?: `0x${string}`;
2133
+ gas?: bigint;
2134
+ gasPrice?: bigint;
2135
+ maxFeePerGas?: bigint;
2136
+ maxPriorityFeePerGas?: bigint;
2137
+ nonce?: number;
2138
+ value?: bigint;
2139
+ }): Promise<void> {
2140
+ return contract.simulate.registerContract([_contract, _type] as const, options) as Promise<void>;
2141
+ },
2142
+ /**
2143
+ * Simulate removeBypassRule
2144
+ * Returns gas estimate and result without sending transaction
2145
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2146
+ */
2147
+ async removeBypassRule(who: `0x${string}`, functionSig: `0x${string}`, id: bigint, options?: {
2148
+ accessList?: import('viem').AccessList;
2149
+ authorizationList?: import('viem').AuthorizationList;
2150
+ chain?: import('viem').Chain | null;
2151
+ dataSuffix?: `0x${string}`;
2152
+ gas?: bigint;
2153
+ gasPrice?: bigint;
2154
+ maxFeePerGas?: bigint;
2155
+ maxPriorityFeePerGas?: bigint;
2156
+ nonce?: number;
2157
+ value?: bigint;
2158
+ }): Promise<void> {
2159
+ return contract.simulate.removeBypassRule([who, functionSig, id] as const, options) as Promise<void>;
2160
+ },
2161
+ /**
2162
+ * Simulate renounceOwnership
2163
+ * Returns gas estimate and result without sending transaction
2164
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2165
+ */
2166
+ async renounceOwnership(options?: {
2167
+ accessList?: import('viem').AccessList;
2168
+ authorizationList?: import('viem').AuthorizationList;
2169
+ chain?: import('viem').Chain | null;
2170
+ dataSuffix?: `0x${string}`;
2171
+ gas?: bigint;
2172
+ gasPrice?: bigint;
2173
+ maxFeePerGas?: bigint;
2174
+ maxPriorityFeePerGas?: bigint;
2175
+ nonce?: number;
2176
+ value?: bigint;
2177
+ }): Promise<void> {
2178
+ return contract.simulate.renounceOwnership(options) as Promise<void>;
2179
+ },
2180
+ /**
2181
+ * Simulate safeBatchTransferFrom
2182
+ * Returns gas estimate and result without sending transaction
2183
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2184
+ */
2185
+ async safeBatchTransferFrom(from: `0x${string}`, to: `0x${string}`, ids: bigint[], amounts: bigint[], data: `0x${string}`, options?: {
2186
+ accessList?: import('viem').AccessList;
2187
+ authorizationList?: import('viem').AuthorizationList;
2188
+ chain?: import('viem').Chain | null;
2189
+ dataSuffix?: `0x${string}`;
2190
+ gas?: bigint;
2191
+ gasPrice?: bigint;
2192
+ maxFeePerGas?: bigint;
2193
+ maxPriorityFeePerGas?: bigint;
2194
+ nonce?: number;
2195
+ value?: bigint;
2196
+ }): Promise<void> {
2197
+ return contract.simulate.safeBatchTransferFrom([from, to, ids, amounts, data] as const, options) as Promise<void>;
2198
+ },
2199
+ /**
2200
+ * Simulate safeBatchTransferIdFrom
2201
+ * Returns gas estimate and result without sending transaction
2202
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2203
+ */
2204
+ async safeBatchTransferIdFrom(from: `0x${string}`, tos: `0x${string}`[], id: bigint, amount: bigint, data: `0x${string}`, options?: {
2205
+ accessList?: import('viem').AccessList;
2206
+ authorizationList?: import('viem').AuthorizationList;
2207
+ chain?: import('viem').Chain | null;
2208
+ dataSuffix?: `0x${string}`;
2209
+ gas?: bigint;
2210
+ gasPrice?: bigint;
2211
+ maxFeePerGas?: bigint;
2212
+ maxPriorityFeePerGas?: bigint;
2213
+ nonce?: number;
2214
+ value?: bigint;
2215
+ }): Promise<void> {
2216
+ return contract.simulate.safeBatchTransferIdFrom([from, tos, id, amount, data] as const, options) as Promise<void>;
2217
+ },
2218
+ /**
2219
+ * Simulate safeTransferFrom
2220
+ * Returns gas estimate and result without sending transaction
2221
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2222
+ */
2223
+ async safeTransferFrom(from: `0x${string}`, to: `0x${string}`, id: bigint, amount: bigint, arg4: `0x${string}`, options?: {
2224
+ accessList?: import('viem').AccessList;
2225
+ authorizationList?: import('viem').AuthorizationList;
2226
+ chain?: import('viem').Chain | null;
2227
+ dataSuffix?: `0x${string}`;
2228
+ gas?: bigint;
2229
+ gasPrice?: bigint;
2230
+ maxFeePerGas?: bigint;
2231
+ maxPriorityFeePerGas?: bigint;
2232
+ nonce?: number;
2233
+ value?: bigint;
2234
+ }): Promise<void> {
2235
+ return contract.simulate.safeTransferFrom([from, to, id, amount, arg4] as const, options) as Promise<void>;
2236
+ },
2237
+ /**
2238
+ * Simulate setApprovalForAll
2239
+ * Returns gas estimate and result without sending transaction
2240
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2241
+ */
2242
+ async setApprovalForAll(operator: `0x${string}`, approved: boolean, options?: {
2243
+ accessList?: import('viem').AccessList;
2244
+ authorizationList?: import('viem').AuthorizationList;
2245
+ chain?: import('viem').Chain | null;
2246
+ dataSuffix?: `0x${string}`;
2247
+ gas?: bigint;
2248
+ gasPrice?: bigint;
2249
+ maxFeePerGas?: bigint;
2250
+ maxPriorityFeePerGas?: bigint;
2251
+ nonce?: number;
2252
+ value?: bigint;
2253
+ }): Promise<void> {
2254
+ return contract.simulate.setApprovalForAll([operator, approved] as const, options) as Promise<void>;
2255
+ },
2256
+ /**
2257
+ * Simulate setTokenRoyalty
2258
+ * Returns gas estimate and result without sending transaction
2259
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2260
+ */
2261
+ async setTokenRoyalty(tokenId: bigint, recipient: `0x${string}`, value: bigint, options?: {
2262
+ accessList?: import('viem').AccessList;
2263
+ authorizationList?: import('viem').AuthorizationList;
2264
+ chain?: import('viem').Chain | null;
2265
+ dataSuffix?: `0x${string}`;
2266
+ gas?: bigint;
2267
+ gasPrice?: bigint;
2268
+ maxFeePerGas?: bigint;
2269
+ maxPriorityFeePerGas?: bigint;
2270
+ nonce?: number;
2271
+ value?: bigint;
2272
+ }): Promise<void> {
2273
+ return contract.simulate.setTokenRoyalty([tokenId, recipient, value] as const, options) as Promise<void>;
2274
+ },
2275
+ /**
2276
+ * Simulate setURI
2277
+ * Returns gas estimate and result without sending transaction
2278
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2279
+ */
2280
+ async setURI(newuri: string, options?: {
2281
+ accessList?: import('viem').AccessList;
2282
+ authorizationList?: import('viem').AuthorizationList;
2283
+ chain?: import('viem').Chain | null;
2284
+ dataSuffix?: `0x${string}`;
2285
+ gas?: bigint;
2286
+ gasPrice?: bigint;
2287
+ maxFeePerGas?: bigint;
2288
+ maxPriorityFeePerGas?: bigint;
2289
+ nonce?: number;
2290
+ value?: bigint;
2291
+ }): Promise<void> {
2292
+ return contract.simulate.setURI([newuri] as const, options) as Promise<void>;
2293
+ },
2294
+ /**
2295
+ * Simulate toggleBypassability
2296
+ * Returns gas estimate and result without sending transaction
2297
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2298
+ */
2299
+ async toggleBypassability(options?: {
2300
+ accessList?: import('viem').AccessList;
2301
+ authorizationList?: import('viem').AuthorizationList;
2302
+ chain?: import('viem').Chain | null;
2303
+ dataSuffix?: `0x${string}`;
2304
+ gas?: bigint;
2305
+ gasPrice?: bigint;
2306
+ maxFeePerGas?: bigint;
2307
+ maxPriorityFeePerGas?: bigint;
2308
+ nonce?: number;
2309
+ value?: bigint;
2310
+ }): Promise<void> {
2311
+ return contract.simulate.toggleBypassability(options) as Promise<void>;
2312
+ },
2313
+ /**
2314
+ * Simulate toggleClaimable
2315
+ * Returns gas estimate and result without sending transaction
2316
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2317
+ */
2318
+ async toggleClaimable(options?: {
2319
+ accessList?: import('viem').AccessList;
2320
+ authorizationList?: import('viem').AuthorizationList;
2321
+ chain?: import('viem').Chain | null;
2322
+ dataSuffix?: `0x${string}`;
2323
+ gas?: bigint;
2324
+ gasPrice?: bigint;
2325
+ maxFeePerGas?: bigint;
2326
+ maxPriorityFeePerGas?: bigint;
2327
+ nonce?: number;
2328
+ value?: bigint;
2329
+ }): Promise<void> {
2330
+ return contract.simulate.toggleClaimable(options) as Promise<void>;
2331
+ },
2332
+ /**
2333
+ * Simulate toggleOverloadSerial
2334
+ * Returns gas estimate and result without sending transaction
2335
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2336
+ */
2337
+ async toggleOverloadSerial(options?: {
2338
+ accessList?: import('viem').AccessList;
2339
+ authorizationList?: import('viem').AuthorizationList;
2340
+ chain?: import('viem').Chain | null;
2341
+ dataSuffix?: `0x${string}`;
2342
+ gas?: bigint;
2343
+ gasPrice?: bigint;
2344
+ maxFeePerGas?: bigint;
2345
+ maxPriorityFeePerGas?: bigint;
2346
+ nonce?: number;
2347
+ value?: bigint;
2348
+ }): Promise<void> {
2349
+ return contract.simulate.toggleOverloadSerial(options) as Promise<void>;
2350
+ },
2351
+ /**
2352
+ * Simulate toggleSerialization
2353
+ * Returns gas estimate and result without sending transaction
2354
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2355
+ */
2356
+ async toggleSerialization(options?: {
2357
+ accessList?: import('viem').AccessList;
2358
+ authorizationList?: import('viem').AuthorizationList;
2359
+ chain?: import('viem').Chain | null;
2360
+ dataSuffix?: `0x${string}`;
2361
+ gas?: bigint;
2362
+ gasPrice?: bigint;
2363
+ maxFeePerGas?: bigint;
2364
+ maxPriorityFeePerGas?: bigint;
2365
+ nonce?: number;
2366
+ value?: bigint;
2367
+ }): Promise<void> {
2368
+ return contract.simulate.toggleSerialization(options) as Promise<void>;
2369
+ },
2370
+ /**
2371
+ * Simulate transferOwnership
2372
+ * Returns gas estimate and result without sending transaction
2373
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2374
+ */
2375
+ async transferOwnership(newOwner: `0x${string}`, options?: {
2376
+ accessList?: import('viem').AccessList;
2377
+ authorizationList?: import('viem').AuthorizationList;
2378
+ chain?: import('viem').Chain | null;
2379
+ dataSuffix?: `0x${string}`;
2380
+ gas?: bigint;
2381
+ gasPrice?: bigint;
2382
+ maxFeePerGas?: bigint;
2383
+ maxPriorityFeePerGas?: bigint;
2384
+ nonce?: number;
2385
+ value?: bigint;
2386
+ }): Promise<void> {
2387
+ return contract.simulate.transferOwnership([newOwner] as const, options) as Promise<void>;
2388
+ },
2389
+ /**
2390
+ * Simulate unregisterContract
2391
+ * Returns gas estimate and result without sending transaction
2392
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2393
+ */
2394
+ async unregisterContract(_contract: `0x${string}`, index: bigint, options?: {
2395
+ accessList?: import('viem').AccessList;
2396
+ authorizationList?: import('viem').AuthorizationList;
2397
+ chain?: import('viem').Chain | null;
2398
+ dataSuffix?: `0x${string}`;
2399
+ gas?: bigint;
2400
+ gasPrice?: bigint;
2401
+ maxFeePerGas?: bigint;
2402
+ maxPriorityFeePerGas?: bigint;
2403
+ nonce?: number;
2404
+ value?: bigint;
2405
+ }): Promise<void> {
2406
+ return contract.simulate.unregisterContract([_contract, index] as const, options) as Promise<void>;
2407
+ },
2408
+ /**
2409
+ * Simulate upgradeFrom
2410
+ * Returns gas estimate and result without sending transaction
2411
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2412
+ */
2413
+ async upgradeFrom(oldContract: `0x${string}`, options?: {
2414
+ accessList?: import('viem').AccessList;
2415
+ authorizationList?: import('viem').AuthorizationList;
2416
+ chain?: import('viem').Chain | null;
2417
+ dataSuffix?: `0x${string}`;
2418
+ gas?: bigint;
2419
+ gasPrice?: bigint;
2420
+ maxFeePerGas?: bigint;
2421
+ maxPriorityFeePerGas?: bigint;
2422
+ nonce?: number;
2423
+ value?: bigint;
2424
+ }): Promise<void> {
2425
+ return contract.simulate.upgradeFrom([oldContract] as const, options) as Promise<void>;
2426
+ }
2427
+ };
2428
+ }
2429
+
2430
+ /**
2431
+ * Watch contract events
2432
+ *
2433
+ * @example
2434
+ * // Watch all Transfer events
2435
+ * const unwatch = contract.watch.Transfer((event) => {
2436
+ * console.log('Transfer:', event);
2437
+ * });
2438
+ *
2439
+ * // Stop watching
2440
+ * unwatch();
2441
+ */
2442
+ get watch() {
2443
+ return {
2444
+ /**
2445
+ * Watch ApprovalForAll events
2446
+ * @param callback Function to call when event is emitted
2447
+ * @param filter Optional filter for indexed parameters
2448
+ * @returns Unwatch function to stop listening
2449
+ */
2450
+ ApprovalForAll: (callback: (event: { account: `0x${string}`; operator: `0x${string}`; approved: boolean }) => void, filter?: { account: `0x${string}`; operator: `0x${string}` }) => {
2451
+ return this.publicClient.watchContractEvent({
2452
+ address: this.contractAddress,
2453
+ abi: ERC1155Upgradable_jsonAbi,
2454
+ eventName: 'ApprovalForAll',
2455
+ args: filter,
2456
+ onLogs: (logs: any[]) => {
2457
+ logs.forEach((log: any) => {
2458
+ callback(log.args as any);
2459
+ });
2460
+ },
2461
+ }) as () => void;
2462
+ },
2463
+ /**
2464
+ * Watch Initialized events
2465
+ * @param callback Function to call when event is emitted
2466
+ * @param filter Optional filter for indexed parameters
2467
+ * @returns Unwatch function to stop listening
2468
+ */
2469
+ Initialized: (callback: (event: { version: bigint }) => void) => {
2470
+ return this.publicClient.watchContractEvent({
2471
+ address: this.contractAddress,
2472
+ abi: ERC1155Upgradable_jsonAbi,
2473
+ eventName: 'Initialized',
2474
+
2475
+ onLogs: (logs: any[]) => {
2476
+ logs.forEach((log: any) => {
2477
+ callback(log.args as any);
2478
+ });
2479
+ },
2480
+ }) as () => void;
2481
+ },
2482
+ /**
2483
+ * Watch OwnershipTransferred events
2484
+ * @param callback Function to call when event is emitted
2485
+ * @param filter Optional filter for indexed parameters
2486
+ * @returns Unwatch function to stop listening
2487
+ */
2488
+ OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => {
2489
+ return this.publicClient.watchContractEvent({
2490
+ address: this.contractAddress,
2491
+ abi: ERC1155Upgradable_jsonAbi,
2492
+ eventName: 'OwnershipTransferred',
2493
+ args: filter,
2494
+ onLogs: (logs: any[]) => {
2495
+ logs.forEach((log: any) => {
2496
+ callback(log.args as any);
2497
+ });
2498
+ },
2499
+ }) as () => void;
2500
+ },
2501
+ /**
2502
+ * Watch TransferBatch events
2503
+ * @param callback Function to call when event is emitted
2504
+ * @param filter Optional filter for indexed parameters
2505
+ * @returns Unwatch function to stop listening
2506
+ */
2507
+ 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}` }) => {
2508
+ return this.publicClient.watchContractEvent({
2509
+ address: this.contractAddress,
2510
+ abi: ERC1155Upgradable_jsonAbi,
2511
+ eventName: 'TransferBatch',
2512
+ args: filter,
2513
+ onLogs: (logs: any[]) => {
2514
+ logs.forEach((log: any) => {
2515
+ callback(log.args as any);
2516
+ });
2517
+ },
2518
+ }) as () => void;
2519
+ },
2520
+ /**
2521
+ * Watch TransferSerial events
2522
+ * @param callback Function to call when event is emitted
2523
+ * @param filter Optional filter for indexed parameters
2524
+ * @returns Unwatch function to stop listening
2525
+ */
2526
+ TransferSerial: (callback: (event: { from: `0x${string}`; to: `0x${string}`; serial: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
2527
+ return this.publicClient.watchContractEvent({
2528
+ address: this.contractAddress,
2529
+ abi: ERC1155Upgradable_jsonAbi,
2530
+ eventName: 'TransferSerial',
2531
+ args: filter,
2532
+ onLogs: (logs: any[]) => {
2533
+ logs.forEach((log: any) => {
2534
+ callback(log.args as any);
2535
+ });
2536
+ },
2537
+ }) as () => void;
2538
+ },
2539
+ /**
2540
+ * Watch TransferSingle events
2541
+ * @param callback Function to call when event is emitted
2542
+ * @param filter Optional filter for indexed parameters
2543
+ * @returns Unwatch function to stop listening
2544
+ */
2545
+ 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}` }) => {
2546
+ return this.publicClient.watchContractEvent({
2547
+ address: this.contractAddress,
2548
+ abi: ERC1155Upgradable_jsonAbi,
2549
+ eventName: 'TransferSingle',
2550
+ args: filter,
2551
+ onLogs: (logs: any[]) => {
2552
+ logs.forEach((log: any) => {
2553
+ callback(log.args as any);
2554
+ });
2555
+ },
2556
+ }) as () => void;
2557
+ },
2558
+ /**
2559
+ * Watch URI events
2560
+ * @param callback Function to call when event is emitted
2561
+ * @param filter Optional filter for indexed parameters
2562
+ * @returns Unwatch function to stop listening
2563
+ */
2564
+ URI: (callback: (event: { id: bigint; value: string }) => void, filter?: { id: bigint }) => {
2565
+ return this.publicClient.watchContractEvent({
2566
+ address: this.contractAddress,
2567
+ abi: ERC1155Upgradable_jsonAbi,
2568
+ eventName: 'URI',
2569
+ args: filter,
2570
+ onLogs: (logs: any[]) => {
2571
+ logs.forEach((log: any) => {
2572
+ callback(log.args as any);
2573
+ });
2574
+ },
2575
+ }) as () => void;
2576
+ }
2577
+ };
2578
+ }
2579
+ }