@gitmyabi/zombi 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,1396 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProjectZombi = exports.ProjectZombiAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * ProjectZombi ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.ProjectZombiAbi = [
11
+ {
12
+ "inputs": [],
13
+ "stateMutability": "nonpayable",
14
+ "type": "constructor"
15
+ },
16
+ {
17
+ "inputs": [],
18
+ "name": "AccountBalanceOverflow",
19
+ "type": "error"
20
+ },
21
+ {
22
+ "inputs": [],
23
+ "name": "AlreadyMinted",
24
+ "type": "error"
25
+ },
26
+ {
27
+ "inputs": [],
28
+ "name": "BalanceQueryForZeroAddress",
29
+ "type": "error"
30
+ },
31
+ {
32
+ "inputs": [],
33
+ "name": "InvalidSignature",
34
+ "type": "error"
35
+ },
36
+ {
37
+ "inputs": [],
38
+ "name": "MintedOut",
39
+ "type": "error"
40
+ },
41
+ {
42
+ "inputs": [
43
+ {
44
+ "internalType": "uint256",
45
+ "name": "required",
46
+ "type": "uint256"
47
+ }
48
+ ],
49
+ "name": "NeedsTac",
50
+ "type": "error"
51
+ },
52
+ {
53
+ "inputs": [],
54
+ "name": "NotAZombi",
55
+ "type": "error"
56
+ },
57
+ {
58
+ "inputs": [],
59
+ "name": "NotOwnerNorApproved",
60
+ "type": "error"
61
+ },
62
+ {
63
+ "inputs": [],
64
+ "name": "NotZombiOwner",
65
+ "type": "error"
66
+ },
67
+ {
68
+ "inputs": [],
69
+ "name": "NotZorgOwner",
70
+ "type": "error"
71
+ },
72
+ {
73
+ "inputs": [],
74
+ "name": "TokenAlreadyExists",
75
+ "type": "error"
76
+ },
77
+ {
78
+ "inputs": [],
79
+ "name": "TokenDoesNotExist",
80
+ "type": "error"
81
+ },
82
+ {
83
+ "inputs": [],
84
+ "name": "TransferFromIncorrectOwner",
85
+ "type": "error"
86
+ },
87
+ {
88
+ "inputs": [],
89
+ "name": "TransferToNonERC721ReceiverImplementer",
90
+ "type": "error"
91
+ },
92
+ {
93
+ "inputs": [],
94
+ "name": "TransferToZeroAddress",
95
+ "type": "error"
96
+ },
97
+ {
98
+ "inputs": [],
99
+ "name": "ZorgAlreadyTransmuted",
100
+ "type": "error"
101
+ },
102
+ {
103
+ "anonymous": false,
104
+ "inputs": [
105
+ {
106
+ "indexed": true,
107
+ "internalType": "address",
108
+ "name": "owner",
109
+ "type": "address"
110
+ },
111
+ {
112
+ "indexed": true,
113
+ "internalType": "address",
114
+ "name": "account",
115
+ "type": "address"
116
+ },
117
+ {
118
+ "indexed": true,
119
+ "internalType": "uint256",
120
+ "name": "id",
121
+ "type": "uint256"
122
+ }
123
+ ],
124
+ "name": "Approval",
125
+ "type": "event"
126
+ },
127
+ {
128
+ "anonymous": false,
129
+ "inputs": [
130
+ {
131
+ "indexed": true,
132
+ "internalType": "address",
133
+ "name": "owner",
134
+ "type": "address"
135
+ },
136
+ {
137
+ "indexed": true,
138
+ "internalType": "address",
139
+ "name": "operator",
140
+ "type": "address"
141
+ },
142
+ {
143
+ "indexed": false,
144
+ "internalType": "bool",
145
+ "name": "isApproved",
146
+ "type": "bool"
147
+ }
148
+ ],
149
+ "name": "ApprovalForAll",
150
+ "type": "event"
151
+ },
152
+ {
153
+ "anonymous": false,
154
+ "inputs": [
155
+ {
156
+ "indexed": true,
157
+ "internalType": "address",
158
+ "name": "from",
159
+ "type": "address"
160
+ },
161
+ {
162
+ "indexed": true,
163
+ "internalType": "address",
164
+ "name": "to",
165
+ "type": "address"
166
+ },
167
+ {
168
+ "indexed": true,
169
+ "internalType": "uint256",
170
+ "name": "id",
171
+ "type": "uint256"
172
+ }
173
+ ],
174
+ "name": "Transfer",
175
+ "type": "event"
176
+ },
177
+ {
178
+ "anonymous": false,
179
+ "inputs": [
180
+ {
181
+ "indexed": true,
182
+ "internalType": "address",
183
+ "name": "owner",
184
+ "type": "address"
185
+ },
186
+ {
187
+ "indexed": true,
188
+ "internalType": "uint256",
189
+ "name": "zombiId",
190
+ "type": "uint256"
191
+ },
192
+ {
193
+ "indexed": true,
194
+ "internalType": "uint256",
195
+ "name": "zorgId",
196
+ "type": "uint256"
197
+ },
198
+ {
199
+ "indexed": false,
200
+ "internalType": "uint256",
201
+ "name": "hybridId",
202
+ "type": "uint256"
203
+ }
204
+ ],
205
+ "name": "Transmuted",
206
+ "type": "event"
207
+ },
208
+ {
209
+ "inputs": [],
210
+ "name": "FREE_TIER",
211
+ "outputs": [
212
+ {
213
+ "internalType": "uint256",
214
+ "name": "",
215
+ "type": "uint256"
216
+ }
217
+ ],
218
+ "stateMutability": "view",
219
+ "type": "function"
220
+ },
221
+ {
222
+ "inputs": [],
223
+ "name": "HYBRID_OFFSET",
224
+ "outputs": [
225
+ {
226
+ "internalType": "uint256",
227
+ "name": "",
228
+ "type": "uint256"
229
+ }
230
+ ],
231
+ "stateMutability": "view",
232
+ "type": "function"
233
+ },
234
+ {
235
+ "inputs": [],
236
+ "name": "MAX_SUPPLY",
237
+ "outputs": [
238
+ {
239
+ "internalType": "uint256",
240
+ "name": "",
241
+ "type": "uint256"
242
+ }
243
+ ],
244
+ "stateMutability": "view",
245
+ "type": "function"
246
+ },
247
+ {
248
+ "inputs": [],
249
+ "name": "MIN_TAC",
250
+ "outputs": [
251
+ {
252
+ "internalType": "uint256",
253
+ "name": "",
254
+ "type": "uint256"
255
+ }
256
+ ],
257
+ "stateMutability": "view",
258
+ "type": "function"
259
+ },
260
+ {
261
+ "inputs": [],
262
+ "name": "RENDERER",
263
+ "outputs": [
264
+ {
265
+ "internalType": "contract ZombiRenderer",
266
+ "name": "",
267
+ "type": "address"
268
+ }
269
+ ],
270
+ "stateMutability": "view",
271
+ "type": "function"
272
+ },
273
+ {
274
+ "inputs": [],
275
+ "name": "STEP",
276
+ "outputs": [
277
+ {
278
+ "internalType": "uint256",
279
+ "name": "",
280
+ "type": "uint256"
281
+ }
282
+ ],
283
+ "stateMutability": "view",
284
+ "type": "function"
285
+ },
286
+ {
287
+ "inputs": [],
288
+ "name": "TAC",
289
+ "outputs": [
290
+ {
291
+ "internalType": "address",
292
+ "name": "",
293
+ "type": "address"
294
+ }
295
+ ],
296
+ "stateMutability": "view",
297
+ "type": "function"
298
+ },
299
+ {
300
+ "inputs": [],
301
+ "name": "ZORGZ",
302
+ "outputs": [
303
+ {
304
+ "internalType": "address",
305
+ "name": "",
306
+ "type": "address"
307
+ }
308
+ ],
309
+ "stateMutability": "view",
310
+ "type": "function"
311
+ },
312
+ {
313
+ "inputs": [
314
+ {
315
+ "internalType": "address",
316
+ "name": "account",
317
+ "type": "address"
318
+ },
319
+ {
320
+ "internalType": "uint256",
321
+ "name": "id",
322
+ "type": "uint256"
323
+ }
324
+ ],
325
+ "name": "approve",
326
+ "outputs": [],
327
+ "stateMutability": "payable",
328
+ "type": "function"
329
+ },
330
+ {
331
+ "inputs": [
332
+ {
333
+ "internalType": "address",
334
+ "name": "owner",
335
+ "type": "address"
336
+ }
337
+ ],
338
+ "name": "balanceOf",
339
+ "outputs": [
340
+ {
341
+ "internalType": "uint256",
342
+ "name": "result",
343
+ "type": "uint256"
344
+ }
345
+ ],
346
+ "stateMutability": "view",
347
+ "type": "function"
348
+ },
349
+ {
350
+ "inputs": [
351
+ {
352
+ "internalType": "uint256",
353
+ "name": "id",
354
+ "type": "uint256"
355
+ }
356
+ ],
357
+ "name": "eraOf",
358
+ "outputs": [
359
+ {
360
+ "internalType": "uint256",
361
+ "name": "",
362
+ "type": "uint256"
363
+ }
364
+ ],
365
+ "stateMutability": "view",
366
+ "type": "function"
367
+ },
368
+ {
369
+ "inputs": [
370
+ {
371
+ "internalType": "uint256",
372
+ "name": "id",
373
+ "type": "uint256"
374
+ }
375
+ ],
376
+ "name": "getApproved",
377
+ "outputs": [
378
+ {
379
+ "internalType": "address",
380
+ "name": "result",
381
+ "type": "address"
382
+ }
383
+ ],
384
+ "stateMutability": "view",
385
+ "type": "function"
386
+ },
387
+ {
388
+ "inputs": [
389
+ {
390
+ "internalType": "address",
391
+ "name": "account",
392
+ "type": "address"
393
+ }
394
+ ],
395
+ "name": "hasMinted",
396
+ "outputs": [
397
+ {
398
+ "internalType": "bool",
399
+ "name": "",
400
+ "type": "bool"
401
+ }
402
+ ],
403
+ "stateMutability": "view",
404
+ "type": "function"
405
+ },
406
+ {
407
+ "inputs": [],
408
+ "name": "hybridsMinted",
409
+ "outputs": [
410
+ {
411
+ "internalType": "uint256",
412
+ "name": "",
413
+ "type": "uint256"
414
+ }
415
+ ],
416
+ "stateMutability": "view",
417
+ "type": "function"
418
+ },
419
+ {
420
+ "inputs": [
421
+ {
422
+ "internalType": "address",
423
+ "name": "owner",
424
+ "type": "address"
425
+ },
426
+ {
427
+ "internalType": "address",
428
+ "name": "operator",
429
+ "type": "address"
430
+ }
431
+ ],
432
+ "name": "isApprovedForAll",
433
+ "outputs": [
434
+ {
435
+ "internalType": "bool",
436
+ "name": "result",
437
+ "type": "bool"
438
+ }
439
+ ],
440
+ "stateMutability": "view",
441
+ "type": "function"
442
+ },
443
+ {
444
+ "inputs": [
445
+ {
446
+ "internalType": "uint256",
447
+ "name": "zorgId",
448
+ "type": "uint256"
449
+ }
450
+ ],
451
+ "name": "isTransmuted",
452
+ "outputs": [
453
+ {
454
+ "internalType": "bool",
455
+ "name": "",
456
+ "type": "bool"
457
+ }
458
+ ],
459
+ "stateMutability": "view",
460
+ "type": "function"
461
+ },
462
+ {
463
+ "inputs": [
464
+ {
465
+ "internalType": "bytes",
466
+ "name": "signature",
467
+ "type": "bytes"
468
+ }
469
+ ],
470
+ "name": "mint",
471
+ "outputs": [
472
+ {
473
+ "internalType": "uint256",
474
+ "name": "id",
475
+ "type": "uint256"
476
+ }
477
+ ],
478
+ "stateMutability": "nonpayable",
479
+ "type": "function"
480
+ },
481
+ {
482
+ "inputs": [],
483
+ "name": "name",
484
+ "outputs": [
485
+ {
486
+ "internalType": "string",
487
+ "name": "",
488
+ "type": "string"
489
+ }
490
+ ],
491
+ "stateMutability": "pure",
492
+ "type": "function"
493
+ },
494
+ {
495
+ "inputs": [],
496
+ "name": "nextRequiredTac",
497
+ "outputs": [
498
+ {
499
+ "internalType": "uint256",
500
+ "name": "",
501
+ "type": "uint256"
502
+ }
503
+ ],
504
+ "stateMutability": "view",
505
+ "type": "function"
506
+ },
507
+ {
508
+ "inputs": [
509
+ {
510
+ "internalType": "uint256",
511
+ "name": "id",
512
+ "type": "uint256"
513
+ }
514
+ ],
515
+ "name": "ownerOf",
516
+ "outputs": [
517
+ {
518
+ "internalType": "address",
519
+ "name": "result",
520
+ "type": "address"
521
+ }
522
+ ],
523
+ "stateMutability": "view",
524
+ "type": "function"
525
+ },
526
+ {
527
+ "inputs": [
528
+ {
529
+ "internalType": "uint256",
530
+ "name": "id",
531
+ "type": "uint256"
532
+ }
533
+ ],
534
+ "name": "requiredTac",
535
+ "outputs": [
536
+ {
537
+ "internalType": "uint256",
538
+ "name": "",
539
+ "type": "uint256"
540
+ }
541
+ ],
542
+ "stateMutability": "pure",
543
+ "type": "function"
544
+ },
545
+ {
546
+ "inputs": [
547
+ {
548
+ "internalType": "uint256",
549
+ "name": "hybridId",
550
+ "type": "uint256"
551
+ }
552
+ ],
553
+ "name": "sacrificeOf",
554
+ "outputs": [
555
+ {
556
+ "internalType": "uint256",
557
+ "name": "",
558
+ "type": "uint256"
559
+ }
560
+ ],
561
+ "stateMutability": "view",
562
+ "type": "function"
563
+ },
564
+ {
565
+ "inputs": [
566
+ {
567
+ "internalType": "address",
568
+ "name": "from",
569
+ "type": "address"
570
+ },
571
+ {
572
+ "internalType": "address",
573
+ "name": "to",
574
+ "type": "address"
575
+ },
576
+ {
577
+ "internalType": "uint256",
578
+ "name": "id",
579
+ "type": "uint256"
580
+ }
581
+ ],
582
+ "name": "safeTransferFrom",
583
+ "outputs": [],
584
+ "stateMutability": "payable",
585
+ "type": "function"
586
+ },
587
+ {
588
+ "inputs": [
589
+ {
590
+ "internalType": "address",
591
+ "name": "from",
592
+ "type": "address"
593
+ },
594
+ {
595
+ "internalType": "address",
596
+ "name": "to",
597
+ "type": "address"
598
+ },
599
+ {
600
+ "internalType": "uint256",
601
+ "name": "id",
602
+ "type": "uint256"
603
+ },
604
+ {
605
+ "internalType": "bytes",
606
+ "name": "data",
607
+ "type": "bytes"
608
+ }
609
+ ],
610
+ "name": "safeTransferFrom",
611
+ "outputs": [],
612
+ "stateMutability": "payable",
613
+ "type": "function"
614
+ },
615
+ {
616
+ "inputs": [
617
+ {
618
+ "internalType": "uint256",
619
+ "name": "id",
620
+ "type": "uint256"
621
+ }
622
+ ],
623
+ "name": "seedOf",
624
+ "outputs": [
625
+ {
626
+ "internalType": "uint256",
627
+ "name": "",
628
+ "type": "uint256"
629
+ }
630
+ ],
631
+ "stateMutability": "view",
632
+ "type": "function"
633
+ },
634
+ {
635
+ "inputs": [
636
+ {
637
+ "internalType": "address",
638
+ "name": "operator",
639
+ "type": "address"
640
+ },
641
+ {
642
+ "internalType": "bool",
643
+ "name": "isApproved",
644
+ "type": "bool"
645
+ }
646
+ ],
647
+ "name": "setApprovalForAll",
648
+ "outputs": [],
649
+ "stateMutability": "nonpayable",
650
+ "type": "function"
651
+ },
652
+ {
653
+ "inputs": [
654
+ {
655
+ "internalType": "address",
656
+ "name": "account",
657
+ "type": "address"
658
+ }
659
+ ],
660
+ "name": "statementFor",
661
+ "outputs": [
662
+ {
663
+ "internalType": "string",
664
+ "name": "",
665
+ "type": "string"
666
+ }
667
+ ],
668
+ "stateMutability": "pure",
669
+ "type": "function"
670
+ },
671
+ {
672
+ "inputs": [
673
+ {
674
+ "internalType": "bytes4",
675
+ "name": "interfaceId",
676
+ "type": "bytes4"
677
+ }
678
+ ],
679
+ "name": "supportsInterface",
680
+ "outputs": [
681
+ {
682
+ "internalType": "bool",
683
+ "name": "result",
684
+ "type": "bool"
685
+ }
686
+ ],
687
+ "stateMutability": "view",
688
+ "type": "function"
689
+ },
690
+ {
691
+ "inputs": [],
692
+ "name": "symbol",
693
+ "outputs": [
694
+ {
695
+ "internalType": "string",
696
+ "name": "",
697
+ "type": "string"
698
+ }
699
+ ],
700
+ "stateMutability": "pure",
701
+ "type": "function"
702
+ },
703
+ {
704
+ "inputs": [
705
+ {
706
+ "internalType": "uint256",
707
+ "name": "id",
708
+ "type": "uint256"
709
+ }
710
+ ],
711
+ "name": "tierOf",
712
+ "outputs": [
713
+ {
714
+ "internalType": "uint256",
715
+ "name": "",
716
+ "type": "uint256"
717
+ }
718
+ ],
719
+ "stateMutability": "view",
720
+ "type": "function"
721
+ },
722
+ {
723
+ "inputs": [
724
+ {
725
+ "internalType": "uint256",
726
+ "name": "id",
727
+ "type": "uint256"
728
+ }
729
+ ],
730
+ "name": "tokenSVG",
731
+ "outputs": [
732
+ {
733
+ "internalType": "string",
734
+ "name": "",
735
+ "type": "string"
736
+ }
737
+ ],
738
+ "stateMutability": "view",
739
+ "type": "function"
740
+ },
741
+ {
742
+ "inputs": [
743
+ {
744
+ "internalType": "uint256",
745
+ "name": "id",
746
+ "type": "uint256"
747
+ }
748
+ ],
749
+ "name": "tokenURI",
750
+ "outputs": [
751
+ {
752
+ "internalType": "string",
753
+ "name": "",
754
+ "type": "string"
755
+ }
756
+ ],
757
+ "stateMutability": "view",
758
+ "type": "function"
759
+ },
760
+ {
761
+ "inputs": [],
762
+ "name": "totalSupply",
763
+ "outputs": [
764
+ {
765
+ "internalType": "uint256",
766
+ "name": "",
767
+ "type": "uint256"
768
+ }
769
+ ],
770
+ "stateMutability": "view",
771
+ "type": "function"
772
+ },
773
+ {
774
+ "inputs": [
775
+ {
776
+ "internalType": "uint256",
777
+ "name": "id",
778
+ "type": "uint256"
779
+ }
780
+ ],
781
+ "name": "traitsOf",
782
+ "outputs": [
783
+ {
784
+ "components": [
785
+ {
786
+ "internalType": "uint256",
787
+ "name": "variant",
788
+ "type": "uint256"
789
+ },
790
+ {
791
+ "internalType": "uint256",
792
+ "name": "body",
793
+ "type": "uint256"
794
+ },
795
+ {
796
+ "internalType": "uint256",
797
+ "name": "eyes",
798
+ "type": "uint256"
799
+ },
800
+ {
801
+ "internalType": "uint256",
802
+ "name": "mouth",
803
+ "type": "uint256"
804
+ },
805
+ {
806
+ "internalType": "uint256",
807
+ "name": "head",
808
+ "type": "uint256"
809
+ },
810
+ {
811
+ "internalType": "uint256",
812
+ "name": "arms",
813
+ "type": "uint256"
814
+ },
815
+ {
816
+ "internalType": "uint256",
817
+ "name": "accessory",
818
+ "type": "uint256"
819
+ },
820
+ {
821
+ "internalType": "uint256",
822
+ "name": "background",
823
+ "type": "uint256"
824
+ },
825
+ {
826
+ "internalType": "uint256",
827
+ "name": "drips",
828
+ "type": "uint256"
829
+ },
830
+ {
831
+ "internalType": "uint256",
832
+ "name": "era",
833
+ "type": "uint256"
834
+ },
835
+ {
836
+ "internalType": "uint256",
837
+ "name": "tier",
838
+ "type": "uint256"
839
+ }
840
+ ],
841
+ "internalType": "struct ZombiRenderer.Traits",
842
+ "name": "",
843
+ "type": "tuple"
844
+ }
845
+ ],
846
+ "stateMutability": "view",
847
+ "type": "function"
848
+ },
849
+ {
850
+ "inputs": [
851
+ {
852
+ "internalType": "address",
853
+ "name": "from",
854
+ "type": "address"
855
+ },
856
+ {
857
+ "internalType": "address",
858
+ "name": "to",
859
+ "type": "address"
860
+ },
861
+ {
862
+ "internalType": "uint256",
863
+ "name": "id",
864
+ "type": "uint256"
865
+ }
866
+ ],
867
+ "name": "transferFrom",
868
+ "outputs": [],
869
+ "stateMutability": "payable",
870
+ "type": "function"
871
+ },
872
+ {
873
+ "inputs": [
874
+ {
875
+ "internalType": "uint256",
876
+ "name": "zombiId",
877
+ "type": "uint256"
878
+ },
879
+ {
880
+ "internalType": "uint256",
881
+ "name": "zorgId",
882
+ "type": "uint256"
883
+ }
884
+ ],
885
+ "name": "transmute",
886
+ "outputs": [
887
+ {
888
+ "internalType": "uint256",
889
+ "name": "hybridId",
890
+ "type": "uint256"
891
+ }
892
+ ],
893
+ "stateMutability": "nonpayable",
894
+ "type": "function"
895
+ },
896
+ {
897
+ "inputs": [],
898
+ "name": "zombisMinted",
899
+ "outputs": [
900
+ {
901
+ "internalType": "uint256",
902
+ "name": "",
903
+ "type": "uint256"
904
+ }
905
+ ],
906
+ "stateMutability": "view",
907
+ "type": "function"
908
+ }
909
+ ];
910
+ /**
911
+ * ProjectZombi Contract Class
912
+ *
913
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
914
+ *
915
+ * @example
916
+ * ```typescript
917
+ * import { createPublicClient, createWalletClient, http } from 'viem';
918
+ * import { mainnet } from 'viem/chains';
919
+ * import { ProjectZombi } from 'ProjectZombi';
920
+ *
921
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
922
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
923
+ *
924
+ * const contract = new ProjectZombi('0x...', { publicClient, walletClient });
925
+ *
926
+ * // Read functions
927
+ * const result = await contract.balanceOf('0x...');
928
+ *
929
+ * // Write functions
930
+ * const hash = await contract.transfer('0x...', 1000n);
931
+ *
932
+ * // Simulate transactions (dry-run)
933
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
934
+ * console.log('Gas estimate:', simulation.request.gas);
935
+ *
936
+ * // Watch events
937
+ * const unwatch = contract.watch.Transfer((event) => {
938
+ * console.log('Transfer event:', event);
939
+ * });
940
+ * ```
941
+ */
942
+ class ProjectZombi {
943
+ constructor(address, clients) {
944
+ this.contractAddress = address;
945
+ this.publicClient = clients.publicClient;
946
+ this.contract = (0, viem_1.getContract)({
947
+ address,
948
+ abi: exports.ProjectZombiAbi,
949
+ client: {
950
+ public: clients.publicClient,
951
+ wallet: clients.walletClient,
952
+ },
953
+ });
954
+ }
955
+ /**
956
+ * Get the contract address
957
+ */
958
+ get address() {
959
+ return this.contractAddress;
960
+ }
961
+ /**
962
+ * Get the underlying viem contract instance.
963
+ */
964
+ getContract() {
965
+ return this.contract;
966
+ }
967
+ /**
968
+ * FREE_TIER
969
+ * view
970
+ */
971
+ async FREE_TIER() {
972
+ return this.contract.read.FREE_TIER();
973
+ }
974
+ /**
975
+ * HYBRID_OFFSET
976
+ * view
977
+ */
978
+ async HYBRID_OFFSET() {
979
+ return this.contract.read.HYBRID_OFFSET();
980
+ }
981
+ /**
982
+ * MAX_SUPPLY
983
+ * view
984
+ */
985
+ async MAX_SUPPLY() {
986
+ return this.contract.read.MAX_SUPPLY();
987
+ }
988
+ /**
989
+ * MIN_TAC
990
+ * view
991
+ */
992
+ async MIN_TAC() {
993
+ return this.contract.read.MIN_TAC();
994
+ }
995
+ /**
996
+ * RENDERER
997
+ * view
998
+ */
999
+ async RENDERER() {
1000
+ return this.contract.read.RENDERER();
1001
+ }
1002
+ /**
1003
+ * STEP
1004
+ * view
1005
+ */
1006
+ async STEP() {
1007
+ return this.contract.read.STEP();
1008
+ }
1009
+ /**
1010
+ * TAC
1011
+ * view
1012
+ */
1013
+ async TAC() {
1014
+ return this.contract.read.TAC();
1015
+ }
1016
+ /**
1017
+ * ZORGZ
1018
+ * view
1019
+ */
1020
+ async ZORGZ() {
1021
+ return this.contract.read.ZORGZ();
1022
+ }
1023
+ /**
1024
+ * balanceOf
1025
+ * view
1026
+ */
1027
+ async balanceOf(owner) {
1028
+ return this.contract.read.balanceOf([owner]);
1029
+ }
1030
+ /**
1031
+ * eraOf
1032
+ * view
1033
+ */
1034
+ async eraOf(id) {
1035
+ return this.contract.read.eraOf([id]);
1036
+ }
1037
+ /**
1038
+ * getApproved
1039
+ * view
1040
+ */
1041
+ async getApproved(id) {
1042
+ return this.contract.read.getApproved([id]);
1043
+ }
1044
+ /**
1045
+ * hasMinted
1046
+ * view
1047
+ */
1048
+ async hasMinted(account) {
1049
+ return this.contract.read.hasMinted([account]);
1050
+ }
1051
+ /**
1052
+ * hybridsMinted
1053
+ * view
1054
+ */
1055
+ async hybridsMinted() {
1056
+ return this.contract.read.hybridsMinted();
1057
+ }
1058
+ /**
1059
+ * isApprovedForAll
1060
+ * view
1061
+ */
1062
+ async isApprovedForAll(owner, operator) {
1063
+ return this.contract.read.isApprovedForAll([owner, operator]);
1064
+ }
1065
+ /**
1066
+ * isTransmuted
1067
+ * view
1068
+ */
1069
+ async isTransmuted(zorgId) {
1070
+ return this.contract.read.isTransmuted([zorgId]);
1071
+ }
1072
+ /**
1073
+ * name
1074
+ * pure
1075
+ */
1076
+ async name() {
1077
+ return this.contract.read.name();
1078
+ }
1079
+ /**
1080
+ * nextRequiredTac
1081
+ * view
1082
+ */
1083
+ async nextRequiredTac() {
1084
+ return this.contract.read.nextRequiredTac();
1085
+ }
1086
+ /**
1087
+ * ownerOf
1088
+ * view
1089
+ */
1090
+ async ownerOf(id) {
1091
+ return this.contract.read.ownerOf([id]);
1092
+ }
1093
+ /**
1094
+ * requiredTac
1095
+ * pure
1096
+ */
1097
+ async requiredTac(id) {
1098
+ return this.contract.read.requiredTac([id]);
1099
+ }
1100
+ /**
1101
+ * sacrificeOf
1102
+ * view
1103
+ */
1104
+ async sacrificeOf(hybridId) {
1105
+ return this.contract.read.sacrificeOf([hybridId]);
1106
+ }
1107
+ /**
1108
+ * seedOf
1109
+ * view
1110
+ */
1111
+ async seedOf(id) {
1112
+ return this.contract.read.seedOf([id]);
1113
+ }
1114
+ /**
1115
+ * statementFor
1116
+ * pure
1117
+ */
1118
+ async statementFor(account) {
1119
+ return this.contract.read.statementFor([account]);
1120
+ }
1121
+ /**
1122
+ * supportsInterface
1123
+ * view
1124
+ */
1125
+ async supportsInterface(interfaceId) {
1126
+ return this.contract.read.supportsInterface([interfaceId]);
1127
+ }
1128
+ /**
1129
+ * symbol
1130
+ * pure
1131
+ */
1132
+ async symbol() {
1133
+ return this.contract.read.symbol();
1134
+ }
1135
+ /**
1136
+ * tierOf
1137
+ * view
1138
+ */
1139
+ async tierOf(id) {
1140
+ return this.contract.read.tierOf([id]);
1141
+ }
1142
+ /**
1143
+ * tokenSVG
1144
+ * view
1145
+ */
1146
+ async tokenSVG(id) {
1147
+ return this.contract.read.tokenSVG([id]);
1148
+ }
1149
+ /**
1150
+ * tokenURI
1151
+ * view
1152
+ */
1153
+ async tokenURI(id) {
1154
+ return this.contract.read.tokenURI([id]);
1155
+ }
1156
+ /**
1157
+ * totalSupply
1158
+ * view
1159
+ */
1160
+ async totalSupply() {
1161
+ return this.contract.read.totalSupply();
1162
+ }
1163
+ /**
1164
+ * traitsOf
1165
+ * view
1166
+ */
1167
+ async traitsOf(id) {
1168
+ return this.contract.read.traitsOf([id]);
1169
+ }
1170
+ /**
1171
+ * zombisMinted
1172
+ * view
1173
+ */
1174
+ async zombisMinted() {
1175
+ return this.contract.read.zombisMinted();
1176
+ }
1177
+ /**
1178
+ * approve
1179
+ * payable
1180
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1181
+ */
1182
+ async approve(account, id, options) {
1183
+ if (!this.contract.write) {
1184
+ throw new Error('Wallet client is required for write operations');
1185
+ }
1186
+ return this.contract.write.approve([account, id], options);
1187
+ }
1188
+ /**
1189
+ * mint
1190
+ * nonpayable
1191
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1192
+ */
1193
+ async mint(signature, options) {
1194
+ if (!this.contract.write) {
1195
+ throw new Error('Wallet client is required for write operations');
1196
+ }
1197
+ return this.contract.write.mint([signature], options);
1198
+ }
1199
+ async safeTransferFrom(...args) {
1200
+ if (!this.contract.write) {
1201
+ throw new Error('Wallet client is required for write operations');
1202
+ }
1203
+ return this.contract.write.safeTransferFrom(args);
1204
+ }
1205
+ /**
1206
+ * setApprovalForAll
1207
+ * nonpayable
1208
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1209
+ */
1210
+ async setApprovalForAll(operator, isApproved, options) {
1211
+ if (!this.contract.write) {
1212
+ throw new Error('Wallet client is required for write operations');
1213
+ }
1214
+ return this.contract.write.setApprovalForAll([operator, isApproved], options);
1215
+ }
1216
+ /**
1217
+ * transferFrom
1218
+ * payable
1219
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1220
+ */
1221
+ async transferFrom(from, to, id, options) {
1222
+ if (!this.contract.write) {
1223
+ throw new Error('Wallet client is required for write operations');
1224
+ }
1225
+ return this.contract.write.transferFrom([from, to, id], options);
1226
+ }
1227
+ /**
1228
+ * transmute
1229
+ * nonpayable
1230
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1231
+ */
1232
+ async transmute(zombiId, zorgId, options) {
1233
+ if (!this.contract.write) {
1234
+ throw new Error('Wallet client is required for write operations');
1235
+ }
1236
+ return this.contract.write.transmute([zombiId, zorgId], options);
1237
+ }
1238
+ /**
1239
+ * Simulate contract write operations (dry-run without sending transaction)
1240
+ *
1241
+ * @example
1242
+ * const result = await contract.simulate.transfer('0x...', 1000n);
1243
+ * console.log('Gas estimate:', result.request.gas);
1244
+ * console.log('Would succeed:', result.result);
1245
+ */
1246
+ get simulate() {
1247
+ const contract = this.contract;
1248
+ if (!contract.simulate) {
1249
+ throw new Error('Public client is required for simulation');
1250
+ }
1251
+ return {
1252
+ /**
1253
+ * Simulate approve
1254
+ * Returns gas estimate and result without sending transaction
1255
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1256
+ */
1257
+ async approve(account, id, options) {
1258
+ return contract.simulate.approve([account, id], options);
1259
+ },
1260
+ /**
1261
+ * Simulate mint
1262
+ * Returns gas estimate and result without sending transaction
1263
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1264
+ */
1265
+ async mint(signature, options) {
1266
+ return contract.simulate.mint([signature], options);
1267
+ },
1268
+ /**
1269
+ * Simulate safeTransferFrom
1270
+ * Returns gas estimate and result without sending transaction
1271
+ * Supports multiple overloads: (address, address, uint256), (address, address, uint256, bytes)
1272
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1273
+ */
1274
+ async safeTransferFrom(...args) {
1275
+ return contract.simulate.safeTransferFrom(args);
1276
+ },
1277
+ /**
1278
+ * Simulate setApprovalForAll
1279
+ * Returns gas estimate and result without sending transaction
1280
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1281
+ */
1282
+ async setApprovalForAll(operator, isApproved, options) {
1283
+ return contract.simulate.setApprovalForAll([operator, isApproved], options);
1284
+ },
1285
+ /**
1286
+ * Simulate transferFrom
1287
+ * Returns gas estimate and result without sending transaction
1288
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1289
+ */
1290
+ async transferFrom(from, to, id, options) {
1291
+ return contract.simulate.transferFrom([from, to, id], options);
1292
+ },
1293
+ /**
1294
+ * Simulate transmute
1295
+ * Returns gas estimate and result without sending transaction
1296
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1297
+ */
1298
+ async transmute(zombiId, zorgId, options) {
1299
+ return contract.simulate.transmute([zombiId, zorgId], options);
1300
+ }
1301
+ };
1302
+ }
1303
+ /**
1304
+ * Watch contract events
1305
+ *
1306
+ * @example
1307
+ * // Watch all Transfer events
1308
+ * const unwatch = contract.watch.Transfer((event) => {
1309
+ * console.log('Transfer:', event);
1310
+ * });
1311
+ *
1312
+ * // Stop watching
1313
+ * unwatch();
1314
+ */
1315
+ get watch() {
1316
+ return {
1317
+ /**
1318
+ * Watch Approval events
1319
+ * @param callback Function to call when event is emitted
1320
+ * @param filter Optional filter for indexed parameters
1321
+ * @returns Unwatch function to stop listening
1322
+ */
1323
+ Approval: (callback, filter) => {
1324
+ return this.publicClient.watchContractEvent({
1325
+ address: this.contractAddress,
1326
+ abi: exports.ProjectZombiAbi,
1327
+ eventName: 'Approval',
1328
+ args: filter,
1329
+ onLogs: (logs) => {
1330
+ logs.forEach((log) => {
1331
+ callback(log.args);
1332
+ });
1333
+ },
1334
+ });
1335
+ },
1336
+ /**
1337
+ * Watch ApprovalForAll events
1338
+ * @param callback Function to call when event is emitted
1339
+ * @param filter Optional filter for indexed parameters
1340
+ * @returns Unwatch function to stop listening
1341
+ */
1342
+ ApprovalForAll: (callback, filter) => {
1343
+ return this.publicClient.watchContractEvent({
1344
+ address: this.contractAddress,
1345
+ abi: exports.ProjectZombiAbi,
1346
+ eventName: 'ApprovalForAll',
1347
+ args: filter,
1348
+ onLogs: (logs) => {
1349
+ logs.forEach((log) => {
1350
+ callback(log.args);
1351
+ });
1352
+ },
1353
+ });
1354
+ },
1355
+ /**
1356
+ * Watch Transfer events
1357
+ * @param callback Function to call when event is emitted
1358
+ * @param filter Optional filter for indexed parameters
1359
+ * @returns Unwatch function to stop listening
1360
+ */
1361
+ Transfer: (callback, filter) => {
1362
+ return this.publicClient.watchContractEvent({
1363
+ address: this.contractAddress,
1364
+ abi: exports.ProjectZombiAbi,
1365
+ eventName: 'Transfer',
1366
+ args: filter,
1367
+ onLogs: (logs) => {
1368
+ logs.forEach((log) => {
1369
+ callback(log.args);
1370
+ });
1371
+ },
1372
+ });
1373
+ },
1374
+ /**
1375
+ * Watch Transmuted events
1376
+ * @param callback Function to call when event is emitted
1377
+ * @param filter Optional filter for indexed parameters
1378
+ * @returns Unwatch function to stop listening
1379
+ */
1380
+ Transmuted: (callback, filter) => {
1381
+ return this.publicClient.watchContractEvent({
1382
+ address: this.contractAddress,
1383
+ abi: exports.ProjectZombiAbi,
1384
+ eventName: 'Transmuted',
1385
+ args: filter,
1386
+ onLogs: (logs) => {
1387
+ logs.forEach((log) => {
1388
+ callback(log.args);
1389
+ });
1390
+ },
1391
+ });
1392
+ }
1393
+ };
1394
+ }
1395
+ }
1396
+ exports.ProjectZombi = ProjectZombi;