@gitmyabi/metabella 0.0.0-stage → 1.0.0

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