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