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