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