@gitmyabi/vezkc 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3435 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+ /**
5
+ * veZKC ABI
6
+ *
7
+ * This ABI is typed using viem's type system for full type safety.
8
+ */
9
+ export const veZKCAbi = [
10
+ {
11
+ "inputs": [],
12
+ "stateMutability": "nonpayable",
13
+ "type": "constructor"
14
+ },
15
+ {
16
+ "inputs": [],
17
+ "name": "AccessControlBadConfirmation",
18
+ "type": "error"
19
+ },
20
+ {
21
+ "inputs": [
22
+ {
23
+ "internalType": "address",
24
+ "name": "account",
25
+ "type": "address"
26
+ },
27
+ {
28
+ "internalType": "bytes32",
29
+ "name": "neededRole",
30
+ "type": "bytes32"
31
+ }
32
+ ],
33
+ "name": "AccessControlUnauthorizedAccount",
34
+ "type": "error"
35
+ },
36
+ {
37
+ "inputs": [
38
+ {
39
+ "internalType": "address",
40
+ "name": "target",
41
+ "type": "address"
42
+ }
43
+ ],
44
+ "name": "AddressEmptyCode",
45
+ "type": "error"
46
+ },
47
+ {
48
+ "inputs": [],
49
+ "name": "CannotAddToWithdrawingPosition",
50
+ "type": "error"
51
+ },
52
+ {
53
+ "inputs": [],
54
+ "name": "CannotDelegateRewardsWhileWithdrawing",
55
+ "type": "error"
56
+ },
57
+ {
58
+ "inputs": [],
59
+ "name": "CannotDelegateVotesWhileWithdrawing",
60
+ "type": "error"
61
+ },
62
+ {
63
+ "inputs": [],
64
+ "name": "ECDSAInvalidSignature",
65
+ "type": "error"
66
+ },
67
+ {
68
+ "inputs": [
69
+ {
70
+ "internalType": "uint256",
71
+ "name": "length",
72
+ "type": "uint256"
73
+ }
74
+ ],
75
+ "name": "ECDSAInvalidSignatureLength",
76
+ "type": "error"
77
+ },
78
+ {
79
+ "inputs": [
80
+ {
81
+ "internalType": "bytes32",
82
+ "name": "s",
83
+ "type": "bytes32"
84
+ }
85
+ ],
86
+ "name": "ECDSAInvalidSignatureS",
87
+ "type": "error"
88
+ },
89
+ {
90
+ "inputs": [
91
+ {
92
+ "internalType": "address",
93
+ "name": "implementation",
94
+ "type": "address"
95
+ }
96
+ ],
97
+ "name": "ERC1967InvalidImplementation",
98
+ "type": "error"
99
+ },
100
+ {
101
+ "inputs": [],
102
+ "name": "ERC1967NonPayable",
103
+ "type": "error"
104
+ },
105
+ {
106
+ "inputs": [
107
+ {
108
+ "internalType": "uint256",
109
+ "name": "timepoint",
110
+ "type": "uint256"
111
+ },
112
+ {
113
+ "internalType": "uint48",
114
+ "name": "clock",
115
+ "type": "uint48"
116
+ }
117
+ ],
118
+ "name": "ERC5805FutureLookup",
119
+ "type": "error"
120
+ },
121
+ {
122
+ "inputs": [
123
+ {
124
+ "internalType": "address",
125
+ "name": "sender",
126
+ "type": "address"
127
+ },
128
+ {
129
+ "internalType": "uint256",
130
+ "name": "tokenId",
131
+ "type": "uint256"
132
+ },
133
+ {
134
+ "internalType": "address",
135
+ "name": "owner",
136
+ "type": "address"
137
+ }
138
+ ],
139
+ "name": "ERC721IncorrectOwner",
140
+ "type": "error"
141
+ },
142
+ {
143
+ "inputs": [
144
+ {
145
+ "internalType": "address",
146
+ "name": "operator",
147
+ "type": "address"
148
+ },
149
+ {
150
+ "internalType": "uint256",
151
+ "name": "tokenId",
152
+ "type": "uint256"
153
+ }
154
+ ],
155
+ "name": "ERC721InsufficientApproval",
156
+ "type": "error"
157
+ },
158
+ {
159
+ "inputs": [
160
+ {
161
+ "internalType": "address",
162
+ "name": "approver",
163
+ "type": "address"
164
+ }
165
+ ],
166
+ "name": "ERC721InvalidApprover",
167
+ "type": "error"
168
+ },
169
+ {
170
+ "inputs": [
171
+ {
172
+ "internalType": "address",
173
+ "name": "operator",
174
+ "type": "address"
175
+ }
176
+ ],
177
+ "name": "ERC721InvalidOperator",
178
+ "type": "error"
179
+ },
180
+ {
181
+ "inputs": [
182
+ {
183
+ "internalType": "address",
184
+ "name": "owner",
185
+ "type": "address"
186
+ }
187
+ ],
188
+ "name": "ERC721InvalidOwner",
189
+ "type": "error"
190
+ },
191
+ {
192
+ "inputs": [
193
+ {
194
+ "internalType": "address",
195
+ "name": "receiver",
196
+ "type": "address"
197
+ }
198
+ ],
199
+ "name": "ERC721InvalidReceiver",
200
+ "type": "error"
201
+ },
202
+ {
203
+ "inputs": [
204
+ {
205
+ "internalType": "address",
206
+ "name": "sender",
207
+ "type": "address"
208
+ }
209
+ ],
210
+ "name": "ERC721InvalidSender",
211
+ "type": "error"
212
+ },
213
+ {
214
+ "inputs": [
215
+ {
216
+ "internalType": "uint256",
217
+ "name": "tokenId",
218
+ "type": "uint256"
219
+ }
220
+ ],
221
+ "name": "ERC721NonexistentToken",
222
+ "type": "error"
223
+ },
224
+ {
225
+ "inputs": [],
226
+ "name": "FailedCall",
227
+ "type": "error"
228
+ },
229
+ {
230
+ "inputs": [
231
+ {
232
+ "internalType": "address",
233
+ "name": "account",
234
+ "type": "address"
235
+ },
236
+ {
237
+ "internalType": "uint256",
238
+ "name": "currentNonce",
239
+ "type": "uint256"
240
+ }
241
+ ],
242
+ "name": "InvalidAccountNonce",
243
+ "type": "error"
244
+ },
245
+ {
246
+ "inputs": [],
247
+ "name": "InvalidInitialization",
248
+ "type": "error"
249
+ },
250
+ {
251
+ "inputs": [],
252
+ "name": "MustUndelegateRewardsFirst",
253
+ "type": "error"
254
+ },
255
+ {
256
+ "inputs": [],
257
+ "name": "MustUndelegateVotesFirst",
258
+ "type": "error"
259
+ },
260
+ {
261
+ "inputs": [],
262
+ "name": "NoActivePosition",
263
+ "type": "error"
264
+ },
265
+ {
266
+ "inputs": [],
267
+ "name": "NonTransferable",
268
+ "type": "error"
269
+ },
270
+ {
271
+ "inputs": [],
272
+ "name": "NotInitializing",
273
+ "type": "error"
274
+ },
275
+ {
276
+ "inputs": [],
277
+ "name": "ReentrancyGuardReentrantCall",
278
+ "type": "error"
279
+ },
280
+ {
281
+ "inputs": [
282
+ {
283
+ "internalType": "uint256",
284
+ "name": "expiry",
285
+ "type": "uint256"
286
+ }
287
+ ],
288
+ "name": "RewardsExpiredSignature",
289
+ "type": "error"
290
+ },
291
+ {
292
+ "inputs": [
293
+ {
294
+ "internalType": "address",
295
+ "name": "token",
296
+ "type": "address"
297
+ }
298
+ ],
299
+ "name": "SafeERC20FailedOperation",
300
+ "type": "error"
301
+ },
302
+ {
303
+ "inputs": [],
304
+ "name": "TokenDoesNotExist",
305
+ "type": "error"
306
+ },
307
+ {
308
+ "inputs": [],
309
+ "name": "UUPSUnauthorizedCallContext",
310
+ "type": "error"
311
+ },
312
+ {
313
+ "inputs": [
314
+ {
315
+ "internalType": "bytes32",
316
+ "name": "slot",
317
+ "type": "bytes32"
318
+ }
319
+ ],
320
+ "name": "UUPSUnsupportedProxiableUUID",
321
+ "type": "error"
322
+ },
323
+ {
324
+ "inputs": [],
325
+ "name": "UserAlreadyHasActivePosition",
326
+ "type": "error"
327
+ },
328
+ {
329
+ "inputs": [
330
+ {
331
+ "internalType": "uint256",
332
+ "name": "expiry",
333
+ "type": "uint256"
334
+ }
335
+ ],
336
+ "name": "VotesExpiredSignature",
337
+ "type": "error"
338
+ },
339
+ {
340
+ "inputs": [],
341
+ "name": "WithdrawalAlreadyInitiated",
342
+ "type": "error"
343
+ },
344
+ {
345
+ "inputs": [],
346
+ "name": "WithdrawalNotInitiated",
347
+ "type": "error"
348
+ },
349
+ {
350
+ "inputs": [],
351
+ "name": "WithdrawalPeriodNotComplete",
352
+ "type": "error"
353
+ },
354
+ {
355
+ "inputs": [],
356
+ "name": "ZeroAmount",
357
+ "type": "error"
358
+ },
359
+ {
360
+ "anonymous": false,
361
+ "inputs": [
362
+ {
363
+ "indexed": true,
364
+ "internalType": "address",
365
+ "name": "owner",
366
+ "type": "address"
367
+ },
368
+ {
369
+ "indexed": true,
370
+ "internalType": "address",
371
+ "name": "approved",
372
+ "type": "address"
373
+ },
374
+ {
375
+ "indexed": true,
376
+ "internalType": "uint256",
377
+ "name": "tokenId",
378
+ "type": "uint256"
379
+ }
380
+ ],
381
+ "name": "Approval",
382
+ "type": "event"
383
+ },
384
+ {
385
+ "anonymous": false,
386
+ "inputs": [
387
+ {
388
+ "indexed": true,
389
+ "internalType": "address",
390
+ "name": "owner",
391
+ "type": "address"
392
+ },
393
+ {
394
+ "indexed": true,
395
+ "internalType": "address",
396
+ "name": "operator",
397
+ "type": "address"
398
+ },
399
+ {
400
+ "indexed": false,
401
+ "internalType": "bool",
402
+ "name": "approved",
403
+ "type": "bool"
404
+ }
405
+ ],
406
+ "name": "ApprovalForAll",
407
+ "type": "event"
408
+ },
409
+ {
410
+ "anonymous": false,
411
+ "inputs": [
412
+ {
413
+ "indexed": true,
414
+ "internalType": "address",
415
+ "name": "delegator",
416
+ "type": "address"
417
+ },
418
+ {
419
+ "indexed": true,
420
+ "internalType": "address",
421
+ "name": "fromDelegate",
422
+ "type": "address"
423
+ },
424
+ {
425
+ "indexed": true,
426
+ "internalType": "address",
427
+ "name": "toDelegate",
428
+ "type": "address"
429
+ }
430
+ ],
431
+ "name": "DelegateChanged",
432
+ "type": "event"
433
+ },
434
+ {
435
+ "anonymous": false,
436
+ "inputs": [
437
+ {
438
+ "indexed": true,
439
+ "internalType": "address",
440
+ "name": "delegate",
441
+ "type": "address"
442
+ },
443
+ {
444
+ "indexed": false,
445
+ "internalType": "uint256",
446
+ "name": "previousRewards",
447
+ "type": "uint256"
448
+ },
449
+ {
450
+ "indexed": false,
451
+ "internalType": "uint256",
452
+ "name": "newRewards",
453
+ "type": "uint256"
454
+ }
455
+ ],
456
+ "name": "DelegateRewardsChanged",
457
+ "type": "event"
458
+ },
459
+ {
460
+ "anonymous": false,
461
+ "inputs": [
462
+ {
463
+ "indexed": true,
464
+ "internalType": "address",
465
+ "name": "delegate",
466
+ "type": "address"
467
+ },
468
+ {
469
+ "indexed": false,
470
+ "internalType": "uint256",
471
+ "name": "previousVotes",
472
+ "type": "uint256"
473
+ },
474
+ {
475
+ "indexed": false,
476
+ "internalType": "uint256",
477
+ "name": "newVotes",
478
+ "type": "uint256"
479
+ }
480
+ ],
481
+ "name": "DelegateVotesChanged",
482
+ "type": "event"
483
+ },
484
+ {
485
+ "anonymous": false,
486
+ "inputs": [],
487
+ "name": "EIP712DomainChanged",
488
+ "type": "event"
489
+ },
490
+ {
491
+ "anonymous": false,
492
+ "inputs": [
493
+ {
494
+ "indexed": false,
495
+ "internalType": "uint64",
496
+ "name": "version",
497
+ "type": "uint64"
498
+ }
499
+ ],
500
+ "name": "Initialized",
501
+ "type": "event"
502
+ },
503
+ {
504
+ "anonymous": false,
505
+ "inputs": [
506
+ {
507
+ "indexed": true,
508
+ "internalType": "address",
509
+ "name": "delegator",
510
+ "type": "address"
511
+ },
512
+ {
513
+ "indexed": true,
514
+ "internalType": "address",
515
+ "name": "fromDelegate",
516
+ "type": "address"
517
+ },
518
+ {
519
+ "indexed": true,
520
+ "internalType": "address",
521
+ "name": "toDelegate",
522
+ "type": "address"
523
+ }
524
+ ],
525
+ "name": "RewardDelegateChanged",
526
+ "type": "event"
527
+ },
528
+ {
529
+ "anonymous": false,
530
+ "inputs": [
531
+ {
532
+ "indexed": true,
533
+ "internalType": "bytes32",
534
+ "name": "role",
535
+ "type": "bytes32"
536
+ },
537
+ {
538
+ "indexed": true,
539
+ "internalType": "bytes32",
540
+ "name": "previousAdminRole",
541
+ "type": "bytes32"
542
+ },
543
+ {
544
+ "indexed": true,
545
+ "internalType": "bytes32",
546
+ "name": "newAdminRole",
547
+ "type": "bytes32"
548
+ }
549
+ ],
550
+ "name": "RoleAdminChanged",
551
+ "type": "event"
552
+ },
553
+ {
554
+ "anonymous": false,
555
+ "inputs": [
556
+ {
557
+ "indexed": true,
558
+ "internalType": "bytes32",
559
+ "name": "role",
560
+ "type": "bytes32"
561
+ },
562
+ {
563
+ "indexed": true,
564
+ "internalType": "address",
565
+ "name": "account",
566
+ "type": "address"
567
+ },
568
+ {
569
+ "indexed": true,
570
+ "internalType": "address",
571
+ "name": "sender",
572
+ "type": "address"
573
+ }
574
+ ],
575
+ "name": "RoleGranted",
576
+ "type": "event"
577
+ },
578
+ {
579
+ "anonymous": false,
580
+ "inputs": [
581
+ {
582
+ "indexed": true,
583
+ "internalType": "bytes32",
584
+ "name": "role",
585
+ "type": "bytes32"
586
+ },
587
+ {
588
+ "indexed": true,
589
+ "internalType": "address",
590
+ "name": "account",
591
+ "type": "address"
592
+ },
593
+ {
594
+ "indexed": true,
595
+ "internalType": "address",
596
+ "name": "sender",
597
+ "type": "address"
598
+ }
599
+ ],
600
+ "name": "RoleRevoked",
601
+ "type": "event"
602
+ },
603
+ {
604
+ "anonymous": false,
605
+ "inputs": [
606
+ {
607
+ "indexed": true,
608
+ "internalType": "uint256",
609
+ "name": "tokenId",
610
+ "type": "uint256"
611
+ },
612
+ {
613
+ "indexed": true,
614
+ "internalType": "address",
615
+ "name": "owner",
616
+ "type": "address"
617
+ },
618
+ {
619
+ "indexed": false,
620
+ "internalType": "uint256",
621
+ "name": "addedAmount",
622
+ "type": "uint256"
623
+ },
624
+ {
625
+ "indexed": false,
626
+ "internalType": "uint256",
627
+ "name": "newTotal",
628
+ "type": "uint256"
629
+ }
630
+ ],
631
+ "name": "StakeAdded",
632
+ "type": "event"
633
+ },
634
+ {
635
+ "anonymous": false,
636
+ "inputs": [
637
+ {
638
+ "indexed": true,
639
+ "internalType": "uint256",
640
+ "name": "tokenId",
641
+ "type": "uint256"
642
+ }
643
+ ],
644
+ "name": "StakeBurned",
645
+ "type": "event"
646
+ },
647
+ {
648
+ "anonymous": false,
649
+ "inputs": [
650
+ {
651
+ "indexed": true,
652
+ "internalType": "uint256",
653
+ "name": "tokenId",
654
+ "type": "uint256"
655
+ },
656
+ {
657
+ "indexed": true,
658
+ "internalType": "address",
659
+ "name": "owner",
660
+ "type": "address"
661
+ },
662
+ {
663
+ "indexed": false,
664
+ "internalType": "uint256",
665
+ "name": "amount",
666
+ "type": "uint256"
667
+ }
668
+ ],
669
+ "name": "StakeCreated",
670
+ "type": "event"
671
+ },
672
+ {
673
+ "anonymous": false,
674
+ "inputs": [
675
+ {
676
+ "indexed": true,
677
+ "internalType": "address",
678
+ "name": "from",
679
+ "type": "address"
680
+ },
681
+ {
682
+ "indexed": true,
683
+ "internalType": "address",
684
+ "name": "to",
685
+ "type": "address"
686
+ },
687
+ {
688
+ "indexed": true,
689
+ "internalType": "uint256",
690
+ "name": "tokenId",
691
+ "type": "uint256"
692
+ }
693
+ ],
694
+ "name": "Transfer",
695
+ "type": "event"
696
+ },
697
+ {
698
+ "anonymous": false,
699
+ "inputs": [
700
+ {
701
+ "indexed": true,
702
+ "internalType": "uint256",
703
+ "name": "tokenId",
704
+ "type": "uint256"
705
+ },
706
+ {
707
+ "indexed": true,
708
+ "internalType": "address",
709
+ "name": "owner",
710
+ "type": "address"
711
+ },
712
+ {
713
+ "indexed": false,
714
+ "internalType": "uint256",
715
+ "name": "amount",
716
+ "type": "uint256"
717
+ }
718
+ ],
719
+ "name": "UnstakeCompleted",
720
+ "type": "event"
721
+ },
722
+ {
723
+ "anonymous": false,
724
+ "inputs": [
725
+ {
726
+ "indexed": true,
727
+ "internalType": "uint256",
728
+ "name": "tokenId",
729
+ "type": "uint256"
730
+ },
731
+ {
732
+ "indexed": true,
733
+ "internalType": "address",
734
+ "name": "owner",
735
+ "type": "address"
736
+ },
737
+ {
738
+ "indexed": false,
739
+ "internalType": "uint256",
740
+ "name": "withdrawableAt",
741
+ "type": "uint256"
742
+ }
743
+ ],
744
+ "name": "UnstakeInitiated",
745
+ "type": "event"
746
+ },
747
+ {
748
+ "anonymous": false,
749
+ "inputs": [
750
+ {
751
+ "indexed": true,
752
+ "internalType": "address",
753
+ "name": "implementation",
754
+ "type": "address"
755
+ }
756
+ ],
757
+ "name": "Upgraded",
758
+ "type": "event"
759
+ },
760
+ {
761
+ "inputs": [],
762
+ "name": "ADMIN_ROLE",
763
+ "outputs": [
764
+ {
765
+ "internalType": "bytes32",
766
+ "name": "",
767
+ "type": "bytes32"
768
+ }
769
+ ],
770
+ "stateMutability": "view",
771
+ "type": "function"
772
+ },
773
+ {
774
+ "inputs": [],
775
+ "name": "CLOCK_MODE",
776
+ "outputs": [
777
+ {
778
+ "internalType": "string",
779
+ "name": "",
780
+ "type": "string"
781
+ }
782
+ ],
783
+ "stateMutability": "pure",
784
+ "type": "function"
785
+ },
786
+ {
787
+ "inputs": [],
788
+ "name": "DEFAULT_ADMIN_ROLE",
789
+ "outputs": [
790
+ {
791
+ "internalType": "bytes32",
792
+ "name": "",
793
+ "type": "bytes32"
794
+ }
795
+ ],
796
+ "stateMutability": "view",
797
+ "type": "function"
798
+ },
799
+ {
800
+ "inputs": [],
801
+ "name": "UPGRADE_INTERFACE_VERSION",
802
+ "outputs": [
803
+ {
804
+ "internalType": "string",
805
+ "name": "",
806
+ "type": "string"
807
+ }
808
+ ],
809
+ "stateMutability": "view",
810
+ "type": "function"
811
+ },
812
+ {
813
+ "inputs": [
814
+ {
815
+ "internalType": "uint256",
816
+ "name": "amount",
817
+ "type": "uint256"
818
+ }
819
+ ],
820
+ "name": "addToStake",
821
+ "outputs": [],
822
+ "stateMutability": "nonpayable",
823
+ "type": "function"
824
+ },
825
+ {
826
+ "inputs": [
827
+ {
828
+ "internalType": "uint256",
829
+ "name": "tokenId",
830
+ "type": "uint256"
831
+ },
832
+ {
833
+ "internalType": "uint256",
834
+ "name": "amount",
835
+ "type": "uint256"
836
+ }
837
+ ],
838
+ "name": "addToStakeByTokenId",
839
+ "outputs": [],
840
+ "stateMutability": "nonpayable",
841
+ "type": "function"
842
+ },
843
+ {
844
+ "inputs": [
845
+ {
846
+ "internalType": "uint256",
847
+ "name": "amount",
848
+ "type": "uint256"
849
+ },
850
+ {
851
+ "internalType": "uint256",
852
+ "name": "permitDeadline",
853
+ "type": "uint256"
854
+ },
855
+ {
856
+ "internalType": "uint8",
857
+ "name": "v",
858
+ "type": "uint8"
859
+ },
860
+ {
861
+ "internalType": "bytes32",
862
+ "name": "r",
863
+ "type": "bytes32"
864
+ },
865
+ {
866
+ "internalType": "bytes32",
867
+ "name": "s",
868
+ "type": "bytes32"
869
+ }
870
+ ],
871
+ "name": "addToStakeWithPermit",
872
+ "outputs": [],
873
+ "stateMutability": "nonpayable",
874
+ "type": "function"
875
+ },
876
+ {
877
+ "inputs": [
878
+ {
879
+ "internalType": "uint256",
880
+ "name": "tokenId",
881
+ "type": "uint256"
882
+ },
883
+ {
884
+ "internalType": "uint256",
885
+ "name": "amount",
886
+ "type": "uint256"
887
+ },
888
+ {
889
+ "internalType": "uint256",
890
+ "name": "permitDeadline",
891
+ "type": "uint256"
892
+ },
893
+ {
894
+ "internalType": "uint8",
895
+ "name": "v",
896
+ "type": "uint8"
897
+ },
898
+ {
899
+ "internalType": "bytes32",
900
+ "name": "r",
901
+ "type": "bytes32"
902
+ },
903
+ {
904
+ "internalType": "bytes32",
905
+ "name": "s",
906
+ "type": "bytes32"
907
+ }
908
+ ],
909
+ "name": "addToStakeWithPermitByTokenId",
910
+ "outputs": [],
911
+ "stateMutability": "nonpayable",
912
+ "type": "function"
913
+ },
914
+ {
915
+ "inputs": [
916
+ {
917
+ "internalType": "address",
918
+ "name": "to",
919
+ "type": "address"
920
+ },
921
+ {
922
+ "internalType": "uint256",
923
+ "name": "tokenId",
924
+ "type": "uint256"
925
+ }
926
+ ],
927
+ "name": "approve",
928
+ "outputs": [],
929
+ "stateMutability": "nonpayable",
930
+ "type": "function"
931
+ },
932
+ {
933
+ "inputs": [
934
+ {
935
+ "internalType": "address",
936
+ "name": "owner",
937
+ "type": "address"
938
+ }
939
+ ],
940
+ "name": "balanceOf",
941
+ "outputs": [
942
+ {
943
+ "internalType": "uint256",
944
+ "name": "",
945
+ "type": "uint256"
946
+ }
947
+ ],
948
+ "stateMutability": "view",
949
+ "type": "function"
950
+ },
951
+ {
952
+ "inputs": [],
953
+ "name": "clock",
954
+ "outputs": [
955
+ {
956
+ "internalType": "uint48",
957
+ "name": "",
958
+ "type": "uint48"
959
+ }
960
+ ],
961
+ "stateMutability": "view",
962
+ "type": "function"
963
+ },
964
+ {
965
+ "inputs": [],
966
+ "name": "completeUnstake",
967
+ "outputs": [],
968
+ "stateMutability": "nonpayable",
969
+ "type": "function"
970
+ },
971
+ {
972
+ "inputs": [
973
+ {
974
+ "internalType": "address",
975
+ "name": "delegatee",
976
+ "type": "address"
977
+ }
978
+ ],
979
+ "name": "delegate",
980
+ "outputs": [],
981
+ "stateMutability": "nonpayable",
982
+ "type": "function"
983
+ },
984
+ {
985
+ "inputs": [
986
+ {
987
+ "internalType": "address",
988
+ "name": "delegatee",
989
+ "type": "address"
990
+ },
991
+ {
992
+ "internalType": "uint256",
993
+ "name": "nonce",
994
+ "type": "uint256"
995
+ },
996
+ {
997
+ "internalType": "uint256",
998
+ "name": "expiry",
999
+ "type": "uint256"
1000
+ },
1001
+ {
1002
+ "internalType": "uint8",
1003
+ "name": "v",
1004
+ "type": "uint8"
1005
+ },
1006
+ {
1007
+ "internalType": "bytes32",
1008
+ "name": "r",
1009
+ "type": "bytes32"
1010
+ },
1011
+ {
1012
+ "internalType": "bytes32",
1013
+ "name": "s",
1014
+ "type": "bytes32"
1015
+ }
1016
+ ],
1017
+ "name": "delegateBySig",
1018
+ "outputs": [],
1019
+ "stateMutability": "nonpayable",
1020
+ "type": "function"
1021
+ },
1022
+ {
1023
+ "inputs": [
1024
+ {
1025
+ "internalType": "address",
1026
+ "name": "delegatee",
1027
+ "type": "address"
1028
+ }
1029
+ ],
1030
+ "name": "delegateRewards",
1031
+ "outputs": [],
1032
+ "stateMutability": "nonpayable",
1033
+ "type": "function"
1034
+ },
1035
+ {
1036
+ "inputs": [
1037
+ {
1038
+ "internalType": "address",
1039
+ "name": "delegatee",
1040
+ "type": "address"
1041
+ },
1042
+ {
1043
+ "internalType": "uint256",
1044
+ "name": "nonce",
1045
+ "type": "uint256"
1046
+ },
1047
+ {
1048
+ "internalType": "uint256",
1049
+ "name": "expiry",
1050
+ "type": "uint256"
1051
+ },
1052
+ {
1053
+ "internalType": "uint8",
1054
+ "name": "v",
1055
+ "type": "uint8"
1056
+ },
1057
+ {
1058
+ "internalType": "bytes32",
1059
+ "name": "r",
1060
+ "type": "bytes32"
1061
+ },
1062
+ {
1063
+ "internalType": "bytes32",
1064
+ "name": "s",
1065
+ "type": "bytes32"
1066
+ }
1067
+ ],
1068
+ "name": "delegateRewardsBySig",
1069
+ "outputs": [],
1070
+ "stateMutability": "nonpayable",
1071
+ "type": "function"
1072
+ },
1073
+ {
1074
+ "inputs": [
1075
+ {
1076
+ "internalType": "address",
1077
+ "name": "account",
1078
+ "type": "address"
1079
+ }
1080
+ ],
1081
+ "name": "delegates",
1082
+ "outputs": [
1083
+ {
1084
+ "internalType": "address",
1085
+ "name": "",
1086
+ "type": "address"
1087
+ }
1088
+ ],
1089
+ "stateMutability": "view",
1090
+ "type": "function"
1091
+ },
1092
+ {
1093
+ "inputs": [],
1094
+ "name": "eip712Domain",
1095
+ "outputs": [
1096
+ {
1097
+ "internalType": "bytes1",
1098
+ "name": "fields",
1099
+ "type": "bytes1"
1100
+ },
1101
+ {
1102
+ "internalType": "string",
1103
+ "name": "name",
1104
+ "type": "string"
1105
+ },
1106
+ {
1107
+ "internalType": "string",
1108
+ "name": "version",
1109
+ "type": "string"
1110
+ },
1111
+ {
1112
+ "internalType": "uint256",
1113
+ "name": "chainId",
1114
+ "type": "uint256"
1115
+ },
1116
+ {
1117
+ "internalType": "address",
1118
+ "name": "verifyingContract",
1119
+ "type": "address"
1120
+ },
1121
+ {
1122
+ "internalType": "bytes32",
1123
+ "name": "salt",
1124
+ "type": "bytes32"
1125
+ },
1126
+ {
1127
+ "internalType": "uint256[]",
1128
+ "name": "extensions",
1129
+ "type": "uint256[]"
1130
+ }
1131
+ ],
1132
+ "stateMutability": "view",
1133
+ "type": "function"
1134
+ },
1135
+ {
1136
+ "inputs": [
1137
+ {
1138
+ "internalType": "address",
1139
+ "name": "user",
1140
+ "type": "address"
1141
+ }
1142
+ ],
1143
+ "name": "getActiveTokenId",
1144
+ "outputs": [
1145
+ {
1146
+ "internalType": "uint256",
1147
+ "name": "",
1148
+ "type": "uint256"
1149
+ }
1150
+ ],
1151
+ "stateMutability": "view",
1152
+ "type": "function"
1153
+ },
1154
+ {
1155
+ "inputs": [
1156
+ {
1157
+ "internalType": "uint256",
1158
+ "name": "tokenId",
1159
+ "type": "uint256"
1160
+ }
1161
+ ],
1162
+ "name": "getApproved",
1163
+ "outputs": [
1164
+ {
1165
+ "internalType": "address",
1166
+ "name": "",
1167
+ "type": "address"
1168
+ }
1169
+ ],
1170
+ "stateMutability": "view",
1171
+ "type": "function"
1172
+ },
1173
+ {
1174
+ "inputs": [
1175
+ {
1176
+ "internalType": "address",
1177
+ "name": "account",
1178
+ "type": "address"
1179
+ },
1180
+ {
1181
+ "internalType": "uint256",
1182
+ "name": "timepoint",
1183
+ "type": "uint256"
1184
+ }
1185
+ ],
1186
+ "name": "getPastPoVWRewardCap",
1187
+ "outputs": [
1188
+ {
1189
+ "internalType": "uint256",
1190
+ "name": "",
1191
+ "type": "uint256"
1192
+ }
1193
+ ],
1194
+ "stateMutability": "view",
1195
+ "type": "function"
1196
+ },
1197
+ {
1198
+ "inputs": [
1199
+ {
1200
+ "internalType": "address",
1201
+ "name": "account",
1202
+ "type": "address"
1203
+ },
1204
+ {
1205
+ "internalType": "uint256",
1206
+ "name": "timepoint",
1207
+ "type": "uint256"
1208
+ }
1209
+ ],
1210
+ "name": "getPastStakingRewards",
1211
+ "outputs": [
1212
+ {
1213
+ "internalType": "uint256",
1214
+ "name": "",
1215
+ "type": "uint256"
1216
+ }
1217
+ ],
1218
+ "stateMutability": "view",
1219
+ "type": "function"
1220
+ },
1221
+ {
1222
+ "inputs": [
1223
+ {
1224
+ "internalType": "uint256",
1225
+ "name": "timepoint",
1226
+ "type": "uint256"
1227
+ }
1228
+ ],
1229
+ "name": "getPastTotalStakingRewards",
1230
+ "outputs": [
1231
+ {
1232
+ "internalType": "uint256",
1233
+ "name": "",
1234
+ "type": "uint256"
1235
+ }
1236
+ ],
1237
+ "stateMutability": "view",
1238
+ "type": "function"
1239
+ },
1240
+ {
1241
+ "inputs": [
1242
+ {
1243
+ "internalType": "uint256",
1244
+ "name": "timepoint",
1245
+ "type": "uint256"
1246
+ }
1247
+ ],
1248
+ "name": "getPastTotalSupply",
1249
+ "outputs": [
1250
+ {
1251
+ "internalType": "uint256",
1252
+ "name": "",
1253
+ "type": "uint256"
1254
+ }
1255
+ ],
1256
+ "stateMutability": "view",
1257
+ "type": "function"
1258
+ },
1259
+ {
1260
+ "inputs": [
1261
+ {
1262
+ "internalType": "address",
1263
+ "name": "account",
1264
+ "type": "address"
1265
+ },
1266
+ {
1267
+ "internalType": "uint256",
1268
+ "name": "timepoint",
1269
+ "type": "uint256"
1270
+ }
1271
+ ],
1272
+ "name": "getPastVotes",
1273
+ "outputs": [
1274
+ {
1275
+ "internalType": "uint256",
1276
+ "name": "",
1277
+ "type": "uint256"
1278
+ }
1279
+ ],
1280
+ "stateMutability": "view",
1281
+ "type": "function"
1282
+ },
1283
+ {
1284
+ "inputs": [
1285
+ {
1286
+ "internalType": "address",
1287
+ "name": "account",
1288
+ "type": "address"
1289
+ }
1290
+ ],
1291
+ "name": "getPoVWRewardCap",
1292
+ "outputs": [
1293
+ {
1294
+ "internalType": "uint256",
1295
+ "name": "",
1296
+ "type": "uint256"
1297
+ }
1298
+ ],
1299
+ "stateMutability": "view",
1300
+ "type": "function"
1301
+ },
1302
+ {
1303
+ "inputs": [
1304
+ {
1305
+ "internalType": "bytes32",
1306
+ "name": "role",
1307
+ "type": "bytes32"
1308
+ }
1309
+ ],
1310
+ "name": "getRoleAdmin",
1311
+ "outputs": [
1312
+ {
1313
+ "internalType": "bytes32",
1314
+ "name": "",
1315
+ "type": "bytes32"
1316
+ }
1317
+ ],
1318
+ "stateMutability": "view",
1319
+ "type": "function"
1320
+ },
1321
+ {
1322
+ "inputs": [
1323
+ {
1324
+ "internalType": "address",
1325
+ "name": "account",
1326
+ "type": "address"
1327
+ }
1328
+ ],
1329
+ "name": "getStakedAmountAndWithdrawalTime",
1330
+ "outputs": [
1331
+ {
1332
+ "internalType": "uint256",
1333
+ "name": "",
1334
+ "type": "uint256"
1335
+ },
1336
+ {
1337
+ "internalType": "uint256",
1338
+ "name": "",
1339
+ "type": "uint256"
1340
+ }
1341
+ ],
1342
+ "stateMutability": "view",
1343
+ "type": "function"
1344
+ },
1345
+ {
1346
+ "inputs": [
1347
+ {
1348
+ "internalType": "address",
1349
+ "name": "account",
1350
+ "type": "address"
1351
+ }
1352
+ ],
1353
+ "name": "getStakingRewards",
1354
+ "outputs": [
1355
+ {
1356
+ "internalType": "uint256",
1357
+ "name": "",
1358
+ "type": "uint256"
1359
+ }
1360
+ ],
1361
+ "stateMutability": "view",
1362
+ "type": "function"
1363
+ },
1364
+ {
1365
+ "inputs": [],
1366
+ "name": "getTotalStakingRewards",
1367
+ "outputs": [
1368
+ {
1369
+ "internalType": "uint256",
1370
+ "name": "",
1371
+ "type": "uint256"
1372
+ }
1373
+ ],
1374
+ "stateMutability": "view",
1375
+ "type": "function"
1376
+ },
1377
+ {
1378
+ "inputs": [
1379
+ {
1380
+ "internalType": "address",
1381
+ "name": "account",
1382
+ "type": "address"
1383
+ }
1384
+ ],
1385
+ "name": "getVotes",
1386
+ "outputs": [
1387
+ {
1388
+ "internalType": "uint256",
1389
+ "name": "",
1390
+ "type": "uint256"
1391
+ }
1392
+ ],
1393
+ "stateMutability": "view",
1394
+ "type": "function"
1395
+ },
1396
+ {
1397
+ "inputs": [
1398
+ {
1399
+ "internalType": "bytes32",
1400
+ "name": "role",
1401
+ "type": "bytes32"
1402
+ },
1403
+ {
1404
+ "internalType": "address",
1405
+ "name": "account",
1406
+ "type": "address"
1407
+ }
1408
+ ],
1409
+ "name": "grantRole",
1410
+ "outputs": [],
1411
+ "stateMutability": "nonpayable",
1412
+ "type": "function"
1413
+ },
1414
+ {
1415
+ "inputs": [
1416
+ {
1417
+ "internalType": "bytes32",
1418
+ "name": "role",
1419
+ "type": "bytes32"
1420
+ },
1421
+ {
1422
+ "internalType": "address",
1423
+ "name": "account",
1424
+ "type": "address"
1425
+ }
1426
+ ],
1427
+ "name": "hasRole",
1428
+ "outputs": [
1429
+ {
1430
+ "internalType": "bool",
1431
+ "name": "",
1432
+ "type": "bool"
1433
+ }
1434
+ ],
1435
+ "stateMutability": "view",
1436
+ "type": "function"
1437
+ },
1438
+ {
1439
+ "inputs": [
1440
+ {
1441
+ "internalType": "address",
1442
+ "name": "zkcTokenAddress",
1443
+ "type": "address"
1444
+ },
1445
+ {
1446
+ "internalType": "address",
1447
+ "name": "_admin",
1448
+ "type": "address"
1449
+ }
1450
+ ],
1451
+ "name": "initialize",
1452
+ "outputs": [],
1453
+ "stateMutability": "nonpayable",
1454
+ "type": "function"
1455
+ },
1456
+ {
1457
+ "inputs": [],
1458
+ "name": "initiateUnstake",
1459
+ "outputs": [],
1460
+ "stateMutability": "nonpayable",
1461
+ "type": "function"
1462
+ },
1463
+ {
1464
+ "inputs": [
1465
+ {
1466
+ "internalType": "address",
1467
+ "name": "owner",
1468
+ "type": "address"
1469
+ },
1470
+ {
1471
+ "internalType": "address",
1472
+ "name": "operator",
1473
+ "type": "address"
1474
+ }
1475
+ ],
1476
+ "name": "isApprovedForAll",
1477
+ "outputs": [
1478
+ {
1479
+ "internalType": "bool",
1480
+ "name": "",
1481
+ "type": "bool"
1482
+ }
1483
+ ],
1484
+ "stateMutability": "view",
1485
+ "type": "function"
1486
+ },
1487
+ {
1488
+ "inputs": [],
1489
+ "name": "name",
1490
+ "outputs": [
1491
+ {
1492
+ "internalType": "string",
1493
+ "name": "",
1494
+ "type": "string"
1495
+ }
1496
+ ],
1497
+ "stateMutability": "view",
1498
+ "type": "function"
1499
+ },
1500
+ {
1501
+ "inputs": [
1502
+ {
1503
+ "internalType": "address",
1504
+ "name": "owner",
1505
+ "type": "address"
1506
+ }
1507
+ ],
1508
+ "name": "nonces",
1509
+ "outputs": [
1510
+ {
1511
+ "internalType": "uint256",
1512
+ "name": "",
1513
+ "type": "uint256"
1514
+ }
1515
+ ],
1516
+ "stateMutability": "view",
1517
+ "type": "function"
1518
+ },
1519
+ {
1520
+ "inputs": [
1521
+ {
1522
+ "internalType": "uint256",
1523
+ "name": "tokenId",
1524
+ "type": "uint256"
1525
+ }
1526
+ ],
1527
+ "name": "ownerOf",
1528
+ "outputs": [
1529
+ {
1530
+ "internalType": "address",
1531
+ "name": "",
1532
+ "type": "address"
1533
+ }
1534
+ ],
1535
+ "stateMutability": "view",
1536
+ "type": "function"
1537
+ },
1538
+ {
1539
+ "inputs": [],
1540
+ "name": "proxiableUUID",
1541
+ "outputs": [
1542
+ {
1543
+ "internalType": "bytes32",
1544
+ "name": "",
1545
+ "type": "bytes32"
1546
+ }
1547
+ ],
1548
+ "stateMutability": "view",
1549
+ "type": "function"
1550
+ },
1551
+ {
1552
+ "inputs": [
1553
+ {
1554
+ "internalType": "bytes32",
1555
+ "name": "role",
1556
+ "type": "bytes32"
1557
+ },
1558
+ {
1559
+ "internalType": "address",
1560
+ "name": "callerConfirmation",
1561
+ "type": "address"
1562
+ }
1563
+ ],
1564
+ "name": "renounceRole",
1565
+ "outputs": [],
1566
+ "stateMutability": "nonpayable",
1567
+ "type": "function"
1568
+ },
1569
+ {
1570
+ "inputs": [
1571
+ {
1572
+ "internalType": "bytes32",
1573
+ "name": "role",
1574
+ "type": "bytes32"
1575
+ },
1576
+ {
1577
+ "internalType": "address",
1578
+ "name": "account",
1579
+ "type": "address"
1580
+ }
1581
+ ],
1582
+ "name": "revokeRole",
1583
+ "outputs": [],
1584
+ "stateMutability": "nonpayable",
1585
+ "type": "function"
1586
+ },
1587
+ {
1588
+ "inputs": [
1589
+ {
1590
+ "internalType": "address",
1591
+ "name": "account",
1592
+ "type": "address"
1593
+ }
1594
+ ],
1595
+ "name": "rewardDelegates",
1596
+ "outputs": [
1597
+ {
1598
+ "internalType": "address",
1599
+ "name": "",
1600
+ "type": "address"
1601
+ }
1602
+ ],
1603
+ "stateMutability": "view",
1604
+ "type": "function"
1605
+ },
1606
+ {
1607
+ "inputs": [
1608
+ {
1609
+ "internalType": "address",
1610
+ "name": "from",
1611
+ "type": "address"
1612
+ },
1613
+ {
1614
+ "internalType": "address",
1615
+ "name": "to",
1616
+ "type": "address"
1617
+ },
1618
+ {
1619
+ "internalType": "uint256",
1620
+ "name": "tokenId",
1621
+ "type": "uint256"
1622
+ }
1623
+ ],
1624
+ "name": "safeTransferFrom",
1625
+ "outputs": [],
1626
+ "stateMutability": "nonpayable",
1627
+ "type": "function"
1628
+ },
1629
+ {
1630
+ "inputs": [
1631
+ {
1632
+ "internalType": "address",
1633
+ "name": "from",
1634
+ "type": "address"
1635
+ },
1636
+ {
1637
+ "internalType": "address",
1638
+ "name": "to",
1639
+ "type": "address"
1640
+ },
1641
+ {
1642
+ "internalType": "uint256",
1643
+ "name": "tokenId",
1644
+ "type": "uint256"
1645
+ },
1646
+ {
1647
+ "internalType": "bytes",
1648
+ "name": "data",
1649
+ "type": "bytes"
1650
+ }
1651
+ ],
1652
+ "name": "safeTransferFrom",
1653
+ "outputs": [],
1654
+ "stateMutability": "nonpayable",
1655
+ "type": "function"
1656
+ },
1657
+ {
1658
+ "inputs": [
1659
+ {
1660
+ "internalType": "address",
1661
+ "name": "operator",
1662
+ "type": "address"
1663
+ },
1664
+ {
1665
+ "internalType": "bool",
1666
+ "name": "approved",
1667
+ "type": "bool"
1668
+ }
1669
+ ],
1670
+ "name": "setApprovalForAll",
1671
+ "outputs": [],
1672
+ "stateMutability": "nonpayable",
1673
+ "type": "function"
1674
+ },
1675
+ {
1676
+ "inputs": [
1677
+ {
1678
+ "internalType": "uint256",
1679
+ "name": "amount",
1680
+ "type": "uint256"
1681
+ }
1682
+ ],
1683
+ "name": "stake",
1684
+ "outputs": [
1685
+ {
1686
+ "internalType": "uint256",
1687
+ "name": "tokenId",
1688
+ "type": "uint256"
1689
+ }
1690
+ ],
1691
+ "stateMutability": "nonpayable",
1692
+ "type": "function"
1693
+ },
1694
+ {
1695
+ "inputs": [
1696
+ {
1697
+ "internalType": "uint256",
1698
+ "name": "amount",
1699
+ "type": "uint256"
1700
+ },
1701
+ {
1702
+ "internalType": "uint256",
1703
+ "name": "permitDeadline",
1704
+ "type": "uint256"
1705
+ },
1706
+ {
1707
+ "internalType": "uint8",
1708
+ "name": "v",
1709
+ "type": "uint8"
1710
+ },
1711
+ {
1712
+ "internalType": "bytes32",
1713
+ "name": "r",
1714
+ "type": "bytes32"
1715
+ },
1716
+ {
1717
+ "internalType": "bytes32",
1718
+ "name": "s",
1719
+ "type": "bytes32"
1720
+ }
1721
+ ],
1722
+ "name": "stakeWithPermit",
1723
+ "outputs": [
1724
+ {
1725
+ "internalType": "uint256",
1726
+ "name": "tokenId",
1727
+ "type": "uint256"
1728
+ }
1729
+ ],
1730
+ "stateMutability": "nonpayable",
1731
+ "type": "function"
1732
+ },
1733
+ {
1734
+ "inputs": [
1735
+ {
1736
+ "internalType": "bytes4",
1737
+ "name": "interfaceId",
1738
+ "type": "bytes4"
1739
+ }
1740
+ ],
1741
+ "name": "supportsInterface",
1742
+ "outputs": [
1743
+ {
1744
+ "internalType": "bool",
1745
+ "name": "",
1746
+ "type": "bool"
1747
+ }
1748
+ ],
1749
+ "stateMutability": "view",
1750
+ "type": "function"
1751
+ },
1752
+ {
1753
+ "inputs": [],
1754
+ "name": "symbol",
1755
+ "outputs": [
1756
+ {
1757
+ "internalType": "string",
1758
+ "name": "",
1759
+ "type": "string"
1760
+ }
1761
+ ],
1762
+ "stateMutability": "view",
1763
+ "type": "function"
1764
+ },
1765
+ {
1766
+ "inputs": [
1767
+ {
1768
+ "internalType": "uint256",
1769
+ "name": "tokenId",
1770
+ "type": "uint256"
1771
+ }
1772
+ ],
1773
+ "name": "tokenURI",
1774
+ "outputs": [
1775
+ {
1776
+ "internalType": "string",
1777
+ "name": "",
1778
+ "type": "string"
1779
+ }
1780
+ ],
1781
+ "stateMutability": "view",
1782
+ "type": "function"
1783
+ },
1784
+ {
1785
+ "inputs": [
1786
+ {
1787
+ "internalType": "address",
1788
+ "name": "from",
1789
+ "type": "address"
1790
+ },
1791
+ {
1792
+ "internalType": "address",
1793
+ "name": "to",
1794
+ "type": "address"
1795
+ },
1796
+ {
1797
+ "internalType": "uint256",
1798
+ "name": "tokenId",
1799
+ "type": "uint256"
1800
+ }
1801
+ ],
1802
+ "name": "transferFrom",
1803
+ "outputs": [],
1804
+ "stateMutability": "nonpayable",
1805
+ "type": "function"
1806
+ },
1807
+ {
1808
+ "inputs": [
1809
+ {
1810
+ "internalType": "address",
1811
+ "name": "newImplementation",
1812
+ "type": "address"
1813
+ },
1814
+ {
1815
+ "internalType": "bytes",
1816
+ "name": "data",
1817
+ "type": "bytes"
1818
+ }
1819
+ ],
1820
+ "name": "upgradeToAndCall",
1821
+ "outputs": [],
1822
+ "stateMutability": "payable",
1823
+ "type": "function"
1824
+ },
1825
+ {
1826
+ "inputs": [],
1827
+ "name": "zkcToken",
1828
+ "outputs": [
1829
+ {
1830
+ "internalType": "address",
1831
+ "name": "",
1832
+ "type": "address"
1833
+ }
1834
+ ],
1835
+ "stateMutability": "view",
1836
+ "type": "function"
1837
+ }
1838
+ ] as const satisfies Abi;
1839
+
1840
+ /**
1841
+ * Type-safe ABI for veZKC
1842
+ */
1843
+ export type veZKCAbi = typeof veZKCAbi;
1844
+
1845
+ /**
1846
+ * Contract instance type for veZKC
1847
+ */
1848
+ // Use any for contract type to avoid complex viem type issues
1849
+ // The runtime behavior is type-safe through viem's ABI typing
1850
+ export type veZKCContract = any;
1851
+
1852
+ /**
1853
+ * veZKC Contract Class
1854
+ *
1855
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
1856
+ *
1857
+ * @example
1858
+ * ```typescript
1859
+ * import { createPublicClient, createWalletClient, http } from 'viem';
1860
+ * import { mainnet } from 'viem/chains';
1861
+ * import { veZKC } from 'veZKC';
1862
+ *
1863
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
1864
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
1865
+ *
1866
+ * const contract = new veZKC('0x...', { publicClient, walletClient });
1867
+ *
1868
+ * // Read functions
1869
+ * const result = await contract.balanceOf('0x...');
1870
+ *
1871
+ * // Write functions
1872
+ * const hash = await contract.transfer('0x...', 1000n);
1873
+ *
1874
+ * // Simulate transactions (dry-run)
1875
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
1876
+ * console.log('Gas estimate:', simulation.request.gas);
1877
+ *
1878
+ * // Watch events
1879
+ * const unwatch = contract.watch.Transfer((event) => {
1880
+ * console.log('Transfer event:', event);
1881
+ * });
1882
+ * ```
1883
+ */
1884
+ export class veZKC {
1885
+ private contract: veZKCContract;
1886
+ private contractAddress: Address;
1887
+ private publicClient: PublicClient;
1888
+
1889
+ constructor(
1890
+ address: Address,
1891
+ clients: {
1892
+ publicClient: PublicClient;
1893
+ walletClient?: WalletClient;
1894
+ }
1895
+ ) {
1896
+ this.contractAddress = address;
1897
+ this.publicClient = clients.publicClient;
1898
+ this.contract = getContract({
1899
+ address,
1900
+ abi: veZKCAbi,
1901
+ client: {
1902
+ public: clients.publicClient,
1903
+ wallet: clients.walletClient,
1904
+ },
1905
+ });
1906
+ }
1907
+
1908
+ /**
1909
+ * Get the contract address
1910
+ */
1911
+ get address(): Address {
1912
+ return this.contractAddress;
1913
+ }
1914
+
1915
+ /**
1916
+ * Get the underlying viem contract instance.
1917
+ */
1918
+ getContract(): veZKCContract {
1919
+ return this.contract;
1920
+ }
1921
+
1922
+ /**
1923
+ * ADMIN_ROLE
1924
+ * view
1925
+ */
1926
+ async ADMIN_ROLE(): Promise<`0x${string}`> {
1927
+ return this.contract.read.ADMIN_ROLE() as Promise<`0x${string}`>;
1928
+ }
1929
+
1930
+ /**
1931
+ * CLOCK_MODE
1932
+ * pure
1933
+ */
1934
+ async CLOCK_MODE(): Promise<string> {
1935
+ return this.contract.read.CLOCK_MODE() as Promise<string>;
1936
+ }
1937
+
1938
+ /**
1939
+ * DEFAULT_ADMIN_ROLE
1940
+ * view
1941
+ */
1942
+ async DEFAULT_ADMIN_ROLE(): Promise<`0x${string}`> {
1943
+ return this.contract.read.DEFAULT_ADMIN_ROLE() as Promise<`0x${string}`>;
1944
+ }
1945
+
1946
+ /**
1947
+ * UPGRADE_INTERFACE_VERSION
1948
+ * view
1949
+ */
1950
+ async UPGRADE_INTERFACE_VERSION(): Promise<string> {
1951
+ return this.contract.read.UPGRADE_INTERFACE_VERSION() as Promise<string>;
1952
+ }
1953
+
1954
+ /**
1955
+ * balanceOf
1956
+ * view
1957
+ */
1958
+ async balanceOf(owner: `0x${string}`): Promise<bigint> {
1959
+ return this.contract.read.balanceOf([owner] as const) as Promise<bigint>;
1960
+ }
1961
+
1962
+ /**
1963
+ * clock
1964
+ * view
1965
+ */
1966
+ async clock(): Promise<bigint> {
1967
+ return this.contract.read.clock() as Promise<bigint>;
1968
+ }
1969
+
1970
+ /**
1971
+ * delegates
1972
+ * view
1973
+ */
1974
+ async delegates(account: `0x${string}`): Promise<`0x${string}`> {
1975
+ return this.contract.read.delegates([account] as const) as Promise<`0x${string}`>;
1976
+ }
1977
+
1978
+ /**
1979
+ * eip712Domain
1980
+ * view
1981
+ */
1982
+ async eip712Domain(): Promise<[`0x${string}`, string, string, bigint, `0x${string}`, `0x${string}`, bigint[]]> {
1983
+ return this.contract.read.eip712Domain() as Promise<[`0x${string}`, string, string, bigint, `0x${string}`, `0x${string}`, bigint[]]>;
1984
+ }
1985
+
1986
+ /**
1987
+ * getActiveTokenId
1988
+ * view
1989
+ */
1990
+ async getActiveTokenId(user: `0x${string}`): Promise<bigint> {
1991
+ return this.contract.read.getActiveTokenId([user] as const) as Promise<bigint>;
1992
+ }
1993
+
1994
+ /**
1995
+ * getApproved
1996
+ * view
1997
+ */
1998
+ async getApproved(tokenId: bigint): Promise<`0x${string}`> {
1999
+ return this.contract.read.getApproved([tokenId] as const) as Promise<`0x${string}`>;
2000
+ }
2001
+
2002
+ /**
2003
+ * getPastPoVWRewardCap
2004
+ * view
2005
+ */
2006
+ async getPastPoVWRewardCap(account: `0x${string}`, timepoint: bigint): Promise<bigint> {
2007
+ return this.contract.read.getPastPoVWRewardCap([account, timepoint] as const) as Promise<bigint>;
2008
+ }
2009
+
2010
+ /**
2011
+ * getPastStakingRewards
2012
+ * view
2013
+ */
2014
+ async getPastStakingRewards(account: `0x${string}`, timepoint: bigint): Promise<bigint> {
2015
+ return this.contract.read.getPastStakingRewards([account, timepoint] as const) as Promise<bigint>;
2016
+ }
2017
+
2018
+ /**
2019
+ * getPastTotalStakingRewards
2020
+ * view
2021
+ */
2022
+ async getPastTotalStakingRewards(timepoint: bigint): Promise<bigint> {
2023
+ return this.contract.read.getPastTotalStakingRewards([timepoint] as const) as Promise<bigint>;
2024
+ }
2025
+
2026
+ /**
2027
+ * getPastTotalSupply
2028
+ * view
2029
+ */
2030
+ async getPastTotalSupply(timepoint: bigint): Promise<bigint> {
2031
+ return this.contract.read.getPastTotalSupply([timepoint] as const) as Promise<bigint>;
2032
+ }
2033
+
2034
+ /**
2035
+ * getPastVotes
2036
+ * view
2037
+ */
2038
+ async getPastVotes(account: `0x${string}`, timepoint: bigint): Promise<bigint> {
2039
+ return this.contract.read.getPastVotes([account, timepoint] as const) as Promise<bigint>;
2040
+ }
2041
+
2042
+ /**
2043
+ * getPoVWRewardCap
2044
+ * view
2045
+ */
2046
+ async getPoVWRewardCap(account: `0x${string}`): Promise<bigint> {
2047
+ return this.contract.read.getPoVWRewardCap([account] as const) as Promise<bigint>;
2048
+ }
2049
+
2050
+ /**
2051
+ * getRoleAdmin
2052
+ * view
2053
+ */
2054
+ async getRoleAdmin(role: `0x${string}`): Promise<`0x${string}`> {
2055
+ return this.contract.read.getRoleAdmin([role] as const) as Promise<`0x${string}`>;
2056
+ }
2057
+
2058
+ /**
2059
+ * getStakedAmountAndWithdrawalTime
2060
+ * view
2061
+ */
2062
+ async getStakedAmountAndWithdrawalTime(account: `0x${string}`): Promise<[bigint, bigint]> {
2063
+ return this.contract.read.getStakedAmountAndWithdrawalTime([account] as const) as Promise<[bigint, bigint]>;
2064
+ }
2065
+
2066
+ /**
2067
+ * getStakingRewards
2068
+ * view
2069
+ */
2070
+ async getStakingRewards(account: `0x${string}`): Promise<bigint> {
2071
+ return this.contract.read.getStakingRewards([account] as const) as Promise<bigint>;
2072
+ }
2073
+
2074
+ /**
2075
+ * getTotalStakingRewards
2076
+ * view
2077
+ */
2078
+ async getTotalStakingRewards(): Promise<bigint> {
2079
+ return this.contract.read.getTotalStakingRewards() as Promise<bigint>;
2080
+ }
2081
+
2082
+ /**
2083
+ * getVotes
2084
+ * view
2085
+ */
2086
+ async getVotes(account: `0x${string}`): Promise<bigint> {
2087
+ return this.contract.read.getVotes([account] as const) as Promise<bigint>;
2088
+ }
2089
+
2090
+ /**
2091
+ * hasRole
2092
+ * view
2093
+ */
2094
+ async hasRole(role: `0x${string}`, account: `0x${string}`): Promise<boolean> {
2095
+ return this.contract.read.hasRole([role, account] as const) as Promise<boolean>;
2096
+ }
2097
+
2098
+ /**
2099
+ * isApprovedForAll
2100
+ * view
2101
+ */
2102
+ async isApprovedForAll(owner: `0x${string}`, operator: `0x${string}`): Promise<boolean> {
2103
+ return this.contract.read.isApprovedForAll([owner, operator] as const) as Promise<boolean>;
2104
+ }
2105
+
2106
+ /**
2107
+ * name
2108
+ * view
2109
+ */
2110
+ async name(): Promise<string> {
2111
+ return this.contract.read.name() as Promise<string>;
2112
+ }
2113
+
2114
+ /**
2115
+ * nonces
2116
+ * view
2117
+ */
2118
+ async nonces(owner: `0x${string}`): Promise<bigint> {
2119
+ return this.contract.read.nonces([owner] as const) as Promise<bigint>;
2120
+ }
2121
+
2122
+ /**
2123
+ * ownerOf
2124
+ * view
2125
+ */
2126
+ async ownerOf(tokenId: bigint): Promise<`0x${string}`> {
2127
+ return this.contract.read.ownerOf([tokenId] as const) as Promise<`0x${string}`>;
2128
+ }
2129
+
2130
+ /**
2131
+ * proxiableUUID
2132
+ * view
2133
+ */
2134
+ async proxiableUUID(): Promise<`0x${string}`> {
2135
+ return this.contract.read.proxiableUUID() as Promise<`0x${string}`>;
2136
+ }
2137
+
2138
+ /**
2139
+ * rewardDelegates
2140
+ * view
2141
+ */
2142
+ async rewardDelegates(account: `0x${string}`): Promise<`0x${string}`> {
2143
+ return this.contract.read.rewardDelegates([account] as const) as Promise<`0x${string}`>;
2144
+ }
2145
+
2146
+ /**
2147
+ * supportsInterface
2148
+ * view
2149
+ */
2150
+ async supportsInterface(interfaceId: `0x${string}`): Promise<boolean> {
2151
+ return this.contract.read.supportsInterface([interfaceId] as const) as Promise<boolean>;
2152
+ }
2153
+
2154
+ /**
2155
+ * symbol
2156
+ * view
2157
+ */
2158
+ async symbol(): Promise<string> {
2159
+ return this.contract.read.symbol() as Promise<string>;
2160
+ }
2161
+
2162
+ /**
2163
+ * tokenURI
2164
+ * view
2165
+ */
2166
+ async tokenURI(tokenId: bigint): Promise<string> {
2167
+ return this.contract.read.tokenURI([tokenId] as const) as Promise<string>;
2168
+ }
2169
+
2170
+ /**
2171
+ * zkcToken
2172
+ * view
2173
+ */
2174
+ async zkcToken(): Promise<`0x${string}`> {
2175
+ return this.contract.read.zkcToken() as Promise<`0x${string}`>;
2176
+ }
2177
+
2178
+ /**
2179
+ * addToStake
2180
+ * nonpayable
2181
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2182
+ */
2183
+ async addToStake(amount: bigint, options?: {
2184
+ accessList?: import('viem').AccessList;
2185
+ authorizationList?: import('viem').AuthorizationList;
2186
+ chain?: import('viem').Chain | null;
2187
+ dataSuffix?: `0x${string}`;
2188
+ gas?: bigint;
2189
+ gasPrice?: bigint;
2190
+ maxFeePerGas?: bigint;
2191
+ maxPriorityFeePerGas?: bigint;
2192
+ nonce?: number;
2193
+ value?: bigint;
2194
+ }): Promise<`0x${string}`> {
2195
+ if (!this.contract.write) {
2196
+ throw new Error('Wallet client is required for write operations');
2197
+ }
2198
+ return this.contract.write.addToStake([amount] as const, options) as Promise<`0x${string}`>;
2199
+ }
2200
+
2201
+ /**
2202
+ * addToStakeByTokenId
2203
+ * nonpayable
2204
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2205
+ */
2206
+ async addToStakeByTokenId(tokenId: bigint, amount: bigint, options?: {
2207
+ accessList?: import('viem').AccessList;
2208
+ authorizationList?: import('viem').AuthorizationList;
2209
+ chain?: import('viem').Chain | null;
2210
+ dataSuffix?: `0x${string}`;
2211
+ gas?: bigint;
2212
+ gasPrice?: bigint;
2213
+ maxFeePerGas?: bigint;
2214
+ maxPriorityFeePerGas?: bigint;
2215
+ nonce?: number;
2216
+ value?: bigint;
2217
+ }): Promise<`0x${string}`> {
2218
+ if (!this.contract.write) {
2219
+ throw new Error('Wallet client is required for write operations');
2220
+ }
2221
+ return this.contract.write.addToStakeByTokenId([tokenId, amount] as const, options) as Promise<`0x${string}`>;
2222
+ }
2223
+
2224
+ /**
2225
+ * addToStakeWithPermit
2226
+ * nonpayable
2227
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2228
+ */
2229
+ async addToStakeWithPermit(amount: bigint, permitDeadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
2230
+ accessList?: import('viem').AccessList;
2231
+ authorizationList?: import('viem').AuthorizationList;
2232
+ chain?: import('viem').Chain | null;
2233
+ dataSuffix?: `0x${string}`;
2234
+ gas?: bigint;
2235
+ gasPrice?: bigint;
2236
+ maxFeePerGas?: bigint;
2237
+ maxPriorityFeePerGas?: bigint;
2238
+ nonce?: number;
2239
+ value?: bigint;
2240
+ }): Promise<`0x${string}`> {
2241
+ if (!this.contract.write) {
2242
+ throw new Error('Wallet client is required for write operations');
2243
+ }
2244
+ return this.contract.write.addToStakeWithPermit([amount, permitDeadline, v, r, s] as const, options) as Promise<`0x${string}`>;
2245
+ }
2246
+
2247
+ /**
2248
+ * addToStakeWithPermitByTokenId
2249
+ * nonpayable
2250
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2251
+ */
2252
+ async addToStakeWithPermitByTokenId(tokenId: bigint, amount: bigint, permitDeadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
2253
+ accessList?: import('viem').AccessList;
2254
+ authorizationList?: import('viem').AuthorizationList;
2255
+ chain?: import('viem').Chain | null;
2256
+ dataSuffix?: `0x${string}`;
2257
+ gas?: bigint;
2258
+ gasPrice?: bigint;
2259
+ maxFeePerGas?: bigint;
2260
+ maxPriorityFeePerGas?: bigint;
2261
+ nonce?: number;
2262
+ value?: bigint;
2263
+ }): Promise<`0x${string}`> {
2264
+ if (!this.contract.write) {
2265
+ throw new Error('Wallet client is required for write operations');
2266
+ }
2267
+ return this.contract.write.addToStakeWithPermitByTokenId([tokenId, amount, permitDeadline, v, r, s] as const, options) as Promise<`0x${string}`>;
2268
+ }
2269
+
2270
+ /**
2271
+ * approve
2272
+ * nonpayable
2273
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2274
+ */
2275
+ async approve(to: `0x${string}`, tokenId: bigint, options?: {
2276
+ accessList?: import('viem').AccessList;
2277
+ authorizationList?: import('viem').AuthorizationList;
2278
+ chain?: import('viem').Chain | null;
2279
+ dataSuffix?: `0x${string}`;
2280
+ gas?: bigint;
2281
+ gasPrice?: bigint;
2282
+ maxFeePerGas?: bigint;
2283
+ maxPriorityFeePerGas?: bigint;
2284
+ nonce?: number;
2285
+ value?: bigint;
2286
+ }): Promise<`0x${string}`> {
2287
+ if (!this.contract.write) {
2288
+ throw new Error('Wallet client is required for write operations');
2289
+ }
2290
+ return this.contract.write.approve([to, tokenId] as const, options) as Promise<`0x${string}`>;
2291
+ }
2292
+
2293
+ /**
2294
+ * completeUnstake
2295
+ * nonpayable
2296
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2297
+ */
2298
+ async completeUnstake(options?: {
2299
+ accessList?: import('viem').AccessList;
2300
+ authorizationList?: import('viem').AuthorizationList;
2301
+ chain?: import('viem').Chain | null;
2302
+ dataSuffix?: `0x${string}`;
2303
+ gas?: bigint;
2304
+ gasPrice?: bigint;
2305
+ maxFeePerGas?: bigint;
2306
+ maxPriorityFeePerGas?: bigint;
2307
+ nonce?: number;
2308
+ value?: bigint;
2309
+ }): Promise<`0x${string}`> {
2310
+ if (!this.contract.write) {
2311
+ throw new Error('Wallet client is required for write operations');
2312
+ }
2313
+ return this.contract.write.completeUnstake(options) as Promise<`0x${string}`>;
2314
+ }
2315
+
2316
+ /**
2317
+ * delegate
2318
+ * nonpayable
2319
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2320
+ */
2321
+ async delegate(delegatee: `0x${string}`, options?: {
2322
+ accessList?: import('viem').AccessList;
2323
+ authorizationList?: import('viem').AuthorizationList;
2324
+ chain?: import('viem').Chain | null;
2325
+ dataSuffix?: `0x${string}`;
2326
+ gas?: bigint;
2327
+ gasPrice?: bigint;
2328
+ maxFeePerGas?: bigint;
2329
+ maxPriorityFeePerGas?: bigint;
2330
+ nonce?: number;
2331
+ value?: bigint;
2332
+ }): Promise<`0x${string}`> {
2333
+ if (!this.contract.write) {
2334
+ throw new Error('Wallet client is required for write operations');
2335
+ }
2336
+ return this.contract.write.delegate([delegatee] as const, options) as Promise<`0x${string}`>;
2337
+ }
2338
+
2339
+ /**
2340
+ * delegateBySig
2341
+ * nonpayable
2342
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2343
+ */
2344
+ async delegateBySig(delegatee: `0x${string}`, nonce: bigint, expiry: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
2345
+ accessList?: import('viem').AccessList;
2346
+ authorizationList?: import('viem').AuthorizationList;
2347
+ chain?: import('viem').Chain | null;
2348
+ dataSuffix?: `0x${string}`;
2349
+ gas?: bigint;
2350
+ gasPrice?: bigint;
2351
+ maxFeePerGas?: bigint;
2352
+ maxPriorityFeePerGas?: bigint;
2353
+ nonce?: number;
2354
+ value?: bigint;
2355
+ }): Promise<`0x${string}`> {
2356
+ if (!this.contract.write) {
2357
+ throw new Error('Wallet client is required for write operations');
2358
+ }
2359
+ return this.contract.write.delegateBySig([delegatee, nonce, expiry, v, r, s] as const, options) as Promise<`0x${string}`>;
2360
+ }
2361
+
2362
+ /**
2363
+ * delegateRewards
2364
+ * nonpayable
2365
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2366
+ */
2367
+ async delegateRewards(delegatee: `0x${string}`, options?: {
2368
+ accessList?: import('viem').AccessList;
2369
+ authorizationList?: import('viem').AuthorizationList;
2370
+ chain?: import('viem').Chain | null;
2371
+ dataSuffix?: `0x${string}`;
2372
+ gas?: bigint;
2373
+ gasPrice?: bigint;
2374
+ maxFeePerGas?: bigint;
2375
+ maxPriorityFeePerGas?: bigint;
2376
+ nonce?: number;
2377
+ value?: bigint;
2378
+ }): Promise<`0x${string}`> {
2379
+ if (!this.contract.write) {
2380
+ throw new Error('Wallet client is required for write operations');
2381
+ }
2382
+ return this.contract.write.delegateRewards([delegatee] as const, options) as Promise<`0x${string}`>;
2383
+ }
2384
+
2385
+ /**
2386
+ * delegateRewardsBySig
2387
+ * nonpayable
2388
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2389
+ */
2390
+ async delegateRewardsBySig(delegatee: `0x${string}`, nonce: bigint, expiry: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
2391
+ accessList?: import('viem').AccessList;
2392
+ authorizationList?: import('viem').AuthorizationList;
2393
+ chain?: import('viem').Chain | null;
2394
+ dataSuffix?: `0x${string}`;
2395
+ gas?: bigint;
2396
+ gasPrice?: bigint;
2397
+ maxFeePerGas?: bigint;
2398
+ maxPriorityFeePerGas?: bigint;
2399
+ nonce?: number;
2400
+ value?: bigint;
2401
+ }): Promise<`0x${string}`> {
2402
+ if (!this.contract.write) {
2403
+ throw new Error('Wallet client is required for write operations');
2404
+ }
2405
+ return this.contract.write.delegateRewardsBySig([delegatee, nonce, expiry, v, r, s] as const, options) as Promise<`0x${string}`>;
2406
+ }
2407
+
2408
+ /**
2409
+ * grantRole
2410
+ * nonpayable
2411
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2412
+ */
2413
+ async grantRole(role: `0x${string}`, account: `0x${string}`, options?: {
2414
+ accessList?: import('viem').AccessList;
2415
+ authorizationList?: import('viem').AuthorizationList;
2416
+ chain?: import('viem').Chain | null;
2417
+ dataSuffix?: `0x${string}`;
2418
+ gas?: bigint;
2419
+ gasPrice?: bigint;
2420
+ maxFeePerGas?: bigint;
2421
+ maxPriorityFeePerGas?: bigint;
2422
+ nonce?: number;
2423
+ value?: bigint;
2424
+ }): Promise<`0x${string}`> {
2425
+ if (!this.contract.write) {
2426
+ throw new Error('Wallet client is required for write operations');
2427
+ }
2428
+ return this.contract.write.grantRole([role, account] as const, options) as Promise<`0x${string}`>;
2429
+ }
2430
+
2431
+ /**
2432
+ * initialize
2433
+ * nonpayable
2434
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2435
+ */
2436
+ async initialize(zkcTokenAddress: `0x${string}`, _admin: `0x${string}`, options?: {
2437
+ accessList?: import('viem').AccessList;
2438
+ authorizationList?: import('viem').AuthorizationList;
2439
+ chain?: import('viem').Chain | null;
2440
+ dataSuffix?: `0x${string}`;
2441
+ gas?: bigint;
2442
+ gasPrice?: bigint;
2443
+ maxFeePerGas?: bigint;
2444
+ maxPriorityFeePerGas?: bigint;
2445
+ nonce?: number;
2446
+ value?: bigint;
2447
+ }): Promise<`0x${string}`> {
2448
+ if (!this.contract.write) {
2449
+ throw new Error('Wallet client is required for write operations');
2450
+ }
2451
+ return this.contract.write.initialize([zkcTokenAddress, _admin] as const, options) as Promise<`0x${string}`>;
2452
+ }
2453
+
2454
+ /**
2455
+ * initiateUnstake
2456
+ * nonpayable
2457
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2458
+ */
2459
+ async initiateUnstake(options?: {
2460
+ accessList?: import('viem').AccessList;
2461
+ authorizationList?: import('viem').AuthorizationList;
2462
+ chain?: import('viem').Chain | null;
2463
+ dataSuffix?: `0x${string}`;
2464
+ gas?: bigint;
2465
+ gasPrice?: bigint;
2466
+ maxFeePerGas?: bigint;
2467
+ maxPriorityFeePerGas?: bigint;
2468
+ nonce?: number;
2469
+ value?: bigint;
2470
+ }): Promise<`0x${string}`> {
2471
+ if (!this.contract.write) {
2472
+ throw new Error('Wallet client is required for write operations');
2473
+ }
2474
+ return this.contract.write.initiateUnstake(options) as Promise<`0x${string}`>;
2475
+ }
2476
+
2477
+ /**
2478
+ * renounceRole
2479
+ * nonpayable
2480
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2481
+ */
2482
+ async renounceRole(role: `0x${string}`, callerConfirmation: `0x${string}`, options?: {
2483
+ accessList?: import('viem').AccessList;
2484
+ authorizationList?: import('viem').AuthorizationList;
2485
+ chain?: import('viem').Chain | null;
2486
+ dataSuffix?: `0x${string}`;
2487
+ gas?: bigint;
2488
+ gasPrice?: bigint;
2489
+ maxFeePerGas?: bigint;
2490
+ maxPriorityFeePerGas?: bigint;
2491
+ nonce?: number;
2492
+ value?: bigint;
2493
+ }): Promise<`0x${string}`> {
2494
+ if (!this.contract.write) {
2495
+ throw new Error('Wallet client is required for write operations');
2496
+ }
2497
+ return this.contract.write.renounceRole([role, callerConfirmation] as const, options) as Promise<`0x${string}`>;
2498
+ }
2499
+
2500
+ /**
2501
+ * revokeRole
2502
+ * nonpayable
2503
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2504
+ */
2505
+ async revokeRole(role: `0x${string}`, account: `0x${string}`, options?: {
2506
+ accessList?: import('viem').AccessList;
2507
+ authorizationList?: import('viem').AuthorizationList;
2508
+ chain?: import('viem').Chain | null;
2509
+ dataSuffix?: `0x${string}`;
2510
+ gas?: bigint;
2511
+ gasPrice?: bigint;
2512
+ maxFeePerGas?: bigint;
2513
+ maxPriorityFeePerGas?: bigint;
2514
+ nonce?: number;
2515
+ value?: bigint;
2516
+ }): Promise<`0x${string}`> {
2517
+ if (!this.contract.write) {
2518
+ throw new Error('Wallet client is required for write operations');
2519
+ }
2520
+ return this.contract.write.revokeRole([role, account] as const, options) as Promise<`0x${string}`>;
2521
+ }
2522
+
2523
+ async safeTransferFrom(from: `0x${string}`, to: `0x${string}`, tokenId: bigint, options?: {
2524
+ accessList?: import('viem').AccessList;
2525
+ authorizationList?: import('viem').AuthorizationList;
2526
+ chain?: import('viem').Chain | null;
2527
+ dataSuffix?: `0x${string}`;
2528
+ gas?: bigint;
2529
+ gasPrice?: bigint;
2530
+ maxFeePerGas?: bigint;
2531
+ maxPriorityFeePerGas?: bigint;
2532
+ nonce?: number;
2533
+ value?: bigint;
2534
+ }): Promise<`0x${string}`>;
2535
+ async safeTransferFrom(from: `0x${string}`, to: `0x${string}`, tokenId: bigint, data: `0x${string}`, options?: {
2536
+ accessList?: import('viem').AccessList;
2537
+ authorizationList?: import('viem').AuthorizationList;
2538
+ chain?: import('viem').Chain | null;
2539
+ dataSuffix?: `0x${string}`;
2540
+ gas?: bigint;
2541
+ gasPrice?: bigint;
2542
+ maxFeePerGas?: bigint;
2543
+ maxPriorityFeePerGas?: bigint;
2544
+ nonce?: number;
2545
+ value?: bigint;
2546
+ }): Promise<`0x${string}`>;
2547
+ async safeTransferFrom(...args: any[]): Promise<`0x${string}`> {
2548
+ if (!this.contract.write) {
2549
+ throw new Error('Wallet client is required for write operations');
2550
+ }
2551
+ return this.contract.write.safeTransferFrom(args as any) as Promise<`0x${string}`>;
2552
+ }
2553
+
2554
+ /**
2555
+ * setApprovalForAll
2556
+ * nonpayable
2557
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2558
+ */
2559
+ async setApprovalForAll(operator: `0x${string}`, approved: boolean, options?: {
2560
+ accessList?: import('viem').AccessList;
2561
+ authorizationList?: import('viem').AuthorizationList;
2562
+ chain?: import('viem').Chain | null;
2563
+ dataSuffix?: `0x${string}`;
2564
+ gas?: bigint;
2565
+ gasPrice?: bigint;
2566
+ maxFeePerGas?: bigint;
2567
+ maxPriorityFeePerGas?: bigint;
2568
+ nonce?: number;
2569
+ value?: bigint;
2570
+ }): Promise<`0x${string}`> {
2571
+ if (!this.contract.write) {
2572
+ throw new Error('Wallet client is required for write operations');
2573
+ }
2574
+ return this.contract.write.setApprovalForAll([operator, approved] as const, options) as Promise<`0x${string}`>;
2575
+ }
2576
+
2577
+ /**
2578
+ * stake
2579
+ * nonpayable
2580
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2581
+ */
2582
+ async stake(amount: bigint, options?: {
2583
+ accessList?: import('viem').AccessList;
2584
+ authorizationList?: import('viem').AuthorizationList;
2585
+ chain?: import('viem').Chain | null;
2586
+ dataSuffix?: `0x${string}`;
2587
+ gas?: bigint;
2588
+ gasPrice?: bigint;
2589
+ maxFeePerGas?: bigint;
2590
+ maxPriorityFeePerGas?: bigint;
2591
+ nonce?: number;
2592
+ value?: bigint;
2593
+ }): Promise<`0x${string}`> {
2594
+ if (!this.contract.write) {
2595
+ throw new Error('Wallet client is required for write operations');
2596
+ }
2597
+ return this.contract.write.stake([amount] as const, options) as Promise<`0x${string}`>;
2598
+ }
2599
+
2600
+ /**
2601
+ * stakeWithPermit
2602
+ * nonpayable
2603
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2604
+ */
2605
+ async stakeWithPermit(amount: bigint, permitDeadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
2606
+ accessList?: import('viem').AccessList;
2607
+ authorizationList?: import('viem').AuthorizationList;
2608
+ chain?: import('viem').Chain | null;
2609
+ dataSuffix?: `0x${string}`;
2610
+ gas?: bigint;
2611
+ gasPrice?: bigint;
2612
+ maxFeePerGas?: bigint;
2613
+ maxPriorityFeePerGas?: bigint;
2614
+ nonce?: number;
2615
+ value?: bigint;
2616
+ }): Promise<`0x${string}`> {
2617
+ if (!this.contract.write) {
2618
+ throw new Error('Wallet client is required for write operations');
2619
+ }
2620
+ return this.contract.write.stakeWithPermit([amount, permitDeadline, v, r, s] as const, options) as Promise<`0x${string}`>;
2621
+ }
2622
+
2623
+ /**
2624
+ * transferFrom
2625
+ * nonpayable
2626
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2627
+ */
2628
+ async transferFrom(from: `0x${string}`, to: `0x${string}`, tokenId: bigint, options?: {
2629
+ accessList?: import('viem').AccessList;
2630
+ authorizationList?: import('viem').AuthorizationList;
2631
+ chain?: import('viem').Chain | null;
2632
+ dataSuffix?: `0x${string}`;
2633
+ gas?: bigint;
2634
+ gasPrice?: bigint;
2635
+ maxFeePerGas?: bigint;
2636
+ maxPriorityFeePerGas?: bigint;
2637
+ nonce?: number;
2638
+ value?: bigint;
2639
+ }): Promise<`0x${string}`> {
2640
+ if (!this.contract.write) {
2641
+ throw new Error('Wallet client is required for write operations');
2642
+ }
2643
+ return this.contract.write.transferFrom([from, to, tokenId] as const, options) as Promise<`0x${string}`>;
2644
+ }
2645
+
2646
+ /**
2647
+ * upgradeToAndCall
2648
+ * payable
2649
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2650
+ */
2651
+ async upgradeToAndCall(newImplementation: `0x${string}`, data: `0x${string}`, options?: {
2652
+ accessList?: import('viem').AccessList;
2653
+ authorizationList?: import('viem').AuthorizationList;
2654
+ chain?: import('viem').Chain | null;
2655
+ dataSuffix?: `0x${string}`;
2656
+ gas?: bigint;
2657
+ gasPrice?: bigint;
2658
+ maxFeePerGas?: bigint;
2659
+ maxPriorityFeePerGas?: bigint;
2660
+ nonce?: number;
2661
+ value?: bigint;
2662
+ }): Promise<`0x${string}`> {
2663
+ if (!this.contract.write) {
2664
+ throw new Error('Wallet client is required for write operations');
2665
+ }
2666
+ return this.contract.write.upgradeToAndCall([newImplementation, data] as const, options) as Promise<`0x${string}`>;
2667
+ }
2668
+
2669
+
2670
+
2671
+ /**
2672
+ * Simulate contract write operations (dry-run without sending transaction)
2673
+ *
2674
+ * @example
2675
+ * const result = await contract.simulate.transfer('0x...', 1000n);
2676
+ * console.log('Gas estimate:', result.request.gas);
2677
+ * console.log('Would succeed:', result.result);
2678
+ */
2679
+ get simulate() {
2680
+ const contract = this.contract;
2681
+ if (!contract.simulate) {
2682
+ throw new Error('Public client is required for simulation');
2683
+ }
2684
+ return {
2685
+ /**
2686
+ * Simulate addToStake
2687
+ * Returns gas estimate and result without sending transaction
2688
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2689
+ */
2690
+ async addToStake(amount: bigint, options?: {
2691
+ accessList?: import('viem').AccessList;
2692
+ authorizationList?: import('viem').AuthorizationList;
2693
+ chain?: import('viem').Chain | null;
2694
+ dataSuffix?: `0x${string}`;
2695
+ gas?: bigint;
2696
+ gasPrice?: bigint;
2697
+ maxFeePerGas?: bigint;
2698
+ maxPriorityFeePerGas?: bigint;
2699
+ nonce?: number;
2700
+ value?: bigint;
2701
+ }): Promise<void> {
2702
+ return contract.simulate.addToStake([amount] as const, options) as Promise<void>;
2703
+ },
2704
+ /**
2705
+ * Simulate addToStakeByTokenId
2706
+ * Returns gas estimate and result without sending transaction
2707
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2708
+ */
2709
+ async addToStakeByTokenId(tokenId: bigint, amount: bigint, options?: {
2710
+ accessList?: import('viem').AccessList;
2711
+ authorizationList?: import('viem').AuthorizationList;
2712
+ chain?: import('viem').Chain | null;
2713
+ dataSuffix?: `0x${string}`;
2714
+ gas?: bigint;
2715
+ gasPrice?: bigint;
2716
+ maxFeePerGas?: bigint;
2717
+ maxPriorityFeePerGas?: bigint;
2718
+ nonce?: number;
2719
+ value?: bigint;
2720
+ }): Promise<void> {
2721
+ return contract.simulate.addToStakeByTokenId([tokenId, amount] as const, options) as Promise<void>;
2722
+ },
2723
+ /**
2724
+ * Simulate addToStakeWithPermit
2725
+ * Returns gas estimate and result without sending transaction
2726
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2727
+ */
2728
+ async addToStakeWithPermit(amount: bigint, permitDeadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
2729
+ accessList?: import('viem').AccessList;
2730
+ authorizationList?: import('viem').AuthorizationList;
2731
+ chain?: import('viem').Chain | null;
2732
+ dataSuffix?: `0x${string}`;
2733
+ gas?: bigint;
2734
+ gasPrice?: bigint;
2735
+ maxFeePerGas?: bigint;
2736
+ maxPriorityFeePerGas?: bigint;
2737
+ nonce?: number;
2738
+ value?: bigint;
2739
+ }): Promise<void> {
2740
+ return contract.simulate.addToStakeWithPermit([amount, permitDeadline, v, r, s] as const, options) as Promise<void>;
2741
+ },
2742
+ /**
2743
+ * Simulate addToStakeWithPermitByTokenId
2744
+ * Returns gas estimate and result without sending transaction
2745
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2746
+ */
2747
+ async addToStakeWithPermitByTokenId(tokenId: bigint, amount: bigint, permitDeadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
2748
+ accessList?: import('viem').AccessList;
2749
+ authorizationList?: import('viem').AuthorizationList;
2750
+ chain?: import('viem').Chain | null;
2751
+ dataSuffix?: `0x${string}`;
2752
+ gas?: bigint;
2753
+ gasPrice?: bigint;
2754
+ maxFeePerGas?: bigint;
2755
+ maxPriorityFeePerGas?: bigint;
2756
+ nonce?: number;
2757
+ value?: bigint;
2758
+ }): Promise<void> {
2759
+ return contract.simulate.addToStakeWithPermitByTokenId([tokenId, amount, permitDeadline, v, r, s] as const, options) as Promise<void>;
2760
+ },
2761
+ /**
2762
+ * Simulate approve
2763
+ * Returns gas estimate and result without sending transaction
2764
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2765
+ */
2766
+ async approve(to: `0x${string}`, tokenId: bigint, options?: {
2767
+ accessList?: import('viem').AccessList;
2768
+ authorizationList?: import('viem').AuthorizationList;
2769
+ chain?: import('viem').Chain | null;
2770
+ dataSuffix?: `0x${string}`;
2771
+ gas?: bigint;
2772
+ gasPrice?: bigint;
2773
+ maxFeePerGas?: bigint;
2774
+ maxPriorityFeePerGas?: bigint;
2775
+ nonce?: number;
2776
+ value?: bigint;
2777
+ }): Promise<void> {
2778
+ return contract.simulate.approve([to, tokenId] as const, options) as Promise<void>;
2779
+ },
2780
+ /**
2781
+ * Simulate completeUnstake
2782
+ * Returns gas estimate and result without sending transaction
2783
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2784
+ */
2785
+ async completeUnstake(options?: {
2786
+ accessList?: import('viem').AccessList;
2787
+ authorizationList?: import('viem').AuthorizationList;
2788
+ chain?: import('viem').Chain | null;
2789
+ dataSuffix?: `0x${string}`;
2790
+ gas?: bigint;
2791
+ gasPrice?: bigint;
2792
+ maxFeePerGas?: bigint;
2793
+ maxPriorityFeePerGas?: bigint;
2794
+ nonce?: number;
2795
+ value?: bigint;
2796
+ }): Promise<void> {
2797
+ return contract.simulate.completeUnstake(options) as Promise<void>;
2798
+ },
2799
+ /**
2800
+ * Simulate delegate
2801
+ * Returns gas estimate and result without sending transaction
2802
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2803
+ */
2804
+ async delegate(delegatee: `0x${string}`, options?: {
2805
+ accessList?: import('viem').AccessList;
2806
+ authorizationList?: import('viem').AuthorizationList;
2807
+ chain?: import('viem').Chain | null;
2808
+ dataSuffix?: `0x${string}`;
2809
+ gas?: bigint;
2810
+ gasPrice?: bigint;
2811
+ maxFeePerGas?: bigint;
2812
+ maxPriorityFeePerGas?: bigint;
2813
+ nonce?: number;
2814
+ value?: bigint;
2815
+ }): Promise<void> {
2816
+ return contract.simulate.delegate([delegatee] as const, options) as Promise<void>;
2817
+ },
2818
+ /**
2819
+ * Simulate delegateBySig
2820
+ * Returns gas estimate and result without sending transaction
2821
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2822
+ */
2823
+ async delegateBySig(delegatee: `0x${string}`, nonce: bigint, expiry: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
2824
+ accessList?: import('viem').AccessList;
2825
+ authorizationList?: import('viem').AuthorizationList;
2826
+ chain?: import('viem').Chain | null;
2827
+ dataSuffix?: `0x${string}`;
2828
+ gas?: bigint;
2829
+ gasPrice?: bigint;
2830
+ maxFeePerGas?: bigint;
2831
+ maxPriorityFeePerGas?: bigint;
2832
+ nonce?: number;
2833
+ value?: bigint;
2834
+ }): Promise<void> {
2835
+ return contract.simulate.delegateBySig([delegatee, nonce, expiry, v, r, s] as const, options) as Promise<void>;
2836
+ },
2837
+ /**
2838
+ * Simulate delegateRewards
2839
+ * Returns gas estimate and result without sending transaction
2840
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2841
+ */
2842
+ async delegateRewards(delegatee: `0x${string}`, options?: {
2843
+ accessList?: import('viem').AccessList;
2844
+ authorizationList?: import('viem').AuthorizationList;
2845
+ chain?: import('viem').Chain | null;
2846
+ dataSuffix?: `0x${string}`;
2847
+ gas?: bigint;
2848
+ gasPrice?: bigint;
2849
+ maxFeePerGas?: bigint;
2850
+ maxPriorityFeePerGas?: bigint;
2851
+ nonce?: number;
2852
+ value?: bigint;
2853
+ }): Promise<void> {
2854
+ return contract.simulate.delegateRewards([delegatee] as const, options) as Promise<void>;
2855
+ },
2856
+ /**
2857
+ * Simulate delegateRewardsBySig
2858
+ * Returns gas estimate and result without sending transaction
2859
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2860
+ */
2861
+ async delegateRewardsBySig(delegatee: `0x${string}`, nonce: bigint, expiry: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
2862
+ accessList?: import('viem').AccessList;
2863
+ authorizationList?: import('viem').AuthorizationList;
2864
+ chain?: import('viem').Chain | null;
2865
+ dataSuffix?: `0x${string}`;
2866
+ gas?: bigint;
2867
+ gasPrice?: bigint;
2868
+ maxFeePerGas?: bigint;
2869
+ maxPriorityFeePerGas?: bigint;
2870
+ nonce?: number;
2871
+ value?: bigint;
2872
+ }): Promise<void> {
2873
+ return contract.simulate.delegateRewardsBySig([delegatee, nonce, expiry, v, r, s] as const, options) as Promise<void>;
2874
+ },
2875
+ /**
2876
+ * Simulate grantRole
2877
+ * Returns gas estimate and result without sending transaction
2878
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2879
+ */
2880
+ async grantRole(role: `0x${string}`, account: `0x${string}`, options?: {
2881
+ accessList?: import('viem').AccessList;
2882
+ authorizationList?: import('viem').AuthorizationList;
2883
+ chain?: import('viem').Chain | null;
2884
+ dataSuffix?: `0x${string}`;
2885
+ gas?: bigint;
2886
+ gasPrice?: bigint;
2887
+ maxFeePerGas?: bigint;
2888
+ maxPriorityFeePerGas?: bigint;
2889
+ nonce?: number;
2890
+ value?: bigint;
2891
+ }): Promise<void> {
2892
+ return contract.simulate.grantRole([role, account] as const, options) as Promise<void>;
2893
+ },
2894
+ /**
2895
+ * Simulate initialize
2896
+ * Returns gas estimate and result without sending transaction
2897
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2898
+ */
2899
+ async initialize(zkcTokenAddress: `0x${string}`, _admin: `0x${string}`, options?: {
2900
+ accessList?: import('viem').AccessList;
2901
+ authorizationList?: import('viem').AuthorizationList;
2902
+ chain?: import('viem').Chain | null;
2903
+ dataSuffix?: `0x${string}`;
2904
+ gas?: bigint;
2905
+ gasPrice?: bigint;
2906
+ maxFeePerGas?: bigint;
2907
+ maxPriorityFeePerGas?: bigint;
2908
+ nonce?: number;
2909
+ value?: bigint;
2910
+ }): Promise<void> {
2911
+ return contract.simulate.initialize([zkcTokenAddress, _admin] as const, options) as Promise<void>;
2912
+ },
2913
+ /**
2914
+ * Simulate initiateUnstake
2915
+ * Returns gas estimate and result without sending transaction
2916
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2917
+ */
2918
+ async initiateUnstake(options?: {
2919
+ accessList?: import('viem').AccessList;
2920
+ authorizationList?: import('viem').AuthorizationList;
2921
+ chain?: import('viem').Chain | null;
2922
+ dataSuffix?: `0x${string}`;
2923
+ gas?: bigint;
2924
+ gasPrice?: bigint;
2925
+ maxFeePerGas?: bigint;
2926
+ maxPriorityFeePerGas?: bigint;
2927
+ nonce?: number;
2928
+ value?: bigint;
2929
+ }): Promise<void> {
2930
+ return contract.simulate.initiateUnstake(options) as Promise<void>;
2931
+ },
2932
+ /**
2933
+ * Simulate renounceRole
2934
+ * Returns gas estimate and result without sending transaction
2935
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2936
+ */
2937
+ async renounceRole(role: `0x${string}`, callerConfirmation: `0x${string}`, options?: {
2938
+ accessList?: import('viem').AccessList;
2939
+ authorizationList?: import('viem').AuthorizationList;
2940
+ chain?: import('viem').Chain | null;
2941
+ dataSuffix?: `0x${string}`;
2942
+ gas?: bigint;
2943
+ gasPrice?: bigint;
2944
+ maxFeePerGas?: bigint;
2945
+ maxPriorityFeePerGas?: bigint;
2946
+ nonce?: number;
2947
+ value?: bigint;
2948
+ }): Promise<void> {
2949
+ return contract.simulate.renounceRole([role, callerConfirmation] as const, options) as Promise<void>;
2950
+ },
2951
+ /**
2952
+ * Simulate revokeRole
2953
+ * Returns gas estimate and result without sending transaction
2954
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2955
+ */
2956
+ async revokeRole(role: `0x${string}`, account: `0x${string}`, options?: {
2957
+ accessList?: import('viem').AccessList;
2958
+ authorizationList?: import('viem').AuthorizationList;
2959
+ chain?: import('viem').Chain | null;
2960
+ dataSuffix?: `0x${string}`;
2961
+ gas?: bigint;
2962
+ gasPrice?: bigint;
2963
+ maxFeePerGas?: bigint;
2964
+ maxPriorityFeePerGas?: bigint;
2965
+ nonce?: number;
2966
+ value?: bigint;
2967
+ }): Promise<void> {
2968
+ return contract.simulate.revokeRole([role, account] as const, options) as Promise<void>;
2969
+ },
2970
+ /**
2971
+ * Simulate safeTransferFrom
2972
+ * Returns gas estimate and result without sending transaction
2973
+ * Supports multiple overloads: (address, address, uint256), (address, address, uint256, bytes)
2974
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2975
+ */
2976
+ async safeTransferFrom(...args: any[]): Promise<any> {
2977
+ return contract.simulate.safeTransferFrom(args as any) as Promise<any>;
2978
+ },
2979
+ /**
2980
+ * Simulate setApprovalForAll
2981
+ * Returns gas estimate and result without sending transaction
2982
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2983
+ */
2984
+ async setApprovalForAll(operator: `0x${string}`, approved: boolean, options?: {
2985
+ accessList?: import('viem').AccessList;
2986
+ authorizationList?: import('viem').AuthorizationList;
2987
+ chain?: import('viem').Chain | null;
2988
+ dataSuffix?: `0x${string}`;
2989
+ gas?: bigint;
2990
+ gasPrice?: bigint;
2991
+ maxFeePerGas?: bigint;
2992
+ maxPriorityFeePerGas?: bigint;
2993
+ nonce?: number;
2994
+ value?: bigint;
2995
+ }): Promise<void> {
2996
+ return contract.simulate.setApprovalForAll([operator, approved] as const, options) as Promise<void>;
2997
+ },
2998
+ /**
2999
+ * Simulate stake
3000
+ * Returns gas estimate and result without sending transaction
3001
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3002
+ */
3003
+ async stake(amount: bigint, options?: {
3004
+ accessList?: import('viem').AccessList;
3005
+ authorizationList?: import('viem').AuthorizationList;
3006
+ chain?: import('viem').Chain | null;
3007
+ dataSuffix?: `0x${string}`;
3008
+ gas?: bigint;
3009
+ gasPrice?: bigint;
3010
+ maxFeePerGas?: bigint;
3011
+ maxPriorityFeePerGas?: bigint;
3012
+ nonce?: number;
3013
+ value?: bigint;
3014
+ }): Promise<bigint> {
3015
+ return contract.simulate.stake([amount] as const, options) as Promise<bigint>;
3016
+ },
3017
+ /**
3018
+ * Simulate stakeWithPermit
3019
+ * Returns gas estimate and result without sending transaction
3020
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3021
+ */
3022
+ async stakeWithPermit(amount: bigint, permitDeadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
3023
+ accessList?: import('viem').AccessList;
3024
+ authorizationList?: import('viem').AuthorizationList;
3025
+ chain?: import('viem').Chain | null;
3026
+ dataSuffix?: `0x${string}`;
3027
+ gas?: bigint;
3028
+ gasPrice?: bigint;
3029
+ maxFeePerGas?: bigint;
3030
+ maxPriorityFeePerGas?: bigint;
3031
+ nonce?: number;
3032
+ value?: bigint;
3033
+ }): Promise<bigint> {
3034
+ return contract.simulate.stakeWithPermit([amount, permitDeadline, v, r, s] as const, options) as Promise<bigint>;
3035
+ },
3036
+ /**
3037
+ * Simulate transferFrom
3038
+ * Returns gas estimate and result without sending transaction
3039
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3040
+ */
3041
+ async transferFrom(from: `0x${string}`, to: `0x${string}`, tokenId: bigint, options?: {
3042
+ accessList?: import('viem').AccessList;
3043
+ authorizationList?: import('viem').AuthorizationList;
3044
+ chain?: import('viem').Chain | null;
3045
+ dataSuffix?: `0x${string}`;
3046
+ gas?: bigint;
3047
+ gasPrice?: bigint;
3048
+ maxFeePerGas?: bigint;
3049
+ maxPriorityFeePerGas?: bigint;
3050
+ nonce?: number;
3051
+ value?: bigint;
3052
+ }): Promise<void> {
3053
+ return contract.simulate.transferFrom([from, to, tokenId] as const, options) as Promise<void>;
3054
+ },
3055
+ /**
3056
+ * Simulate upgradeToAndCall
3057
+ * Returns gas estimate and result without sending transaction
3058
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3059
+ */
3060
+ async upgradeToAndCall(newImplementation: `0x${string}`, data: `0x${string}`, options?: {
3061
+ accessList?: import('viem').AccessList;
3062
+ authorizationList?: import('viem').AuthorizationList;
3063
+ chain?: import('viem').Chain | null;
3064
+ dataSuffix?: `0x${string}`;
3065
+ gas?: bigint;
3066
+ gasPrice?: bigint;
3067
+ maxFeePerGas?: bigint;
3068
+ maxPriorityFeePerGas?: bigint;
3069
+ nonce?: number;
3070
+ value?: bigint;
3071
+ }): Promise<void> {
3072
+ return contract.simulate.upgradeToAndCall([newImplementation, data] as const, options) as Promise<void>;
3073
+ }
3074
+ };
3075
+ }
3076
+
3077
+ /**
3078
+ * Watch contract events
3079
+ *
3080
+ * @example
3081
+ * // Watch all Transfer events
3082
+ * const unwatch = contract.watch.Transfer((event) => {
3083
+ * console.log('Transfer:', event);
3084
+ * });
3085
+ *
3086
+ * // Stop watching
3087
+ * unwatch();
3088
+ */
3089
+ get watch() {
3090
+ return {
3091
+ /**
3092
+ * Watch Approval events
3093
+ * @param callback Function to call when event is emitted
3094
+ * @param filter Optional filter for indexed parameters
3095
+ * @returns Unwatch function to stop listening
3096
+ */
3097
+ Approval: (callback: (event: { owner: `0x${string}`; approved: `0x${string}`; tokenId: bigint }) => void, filter?: { owner?: `0x${string}` | `0x${string}`[] | null; approved?: `0x${string}` | `0x${string}`[] | null; tokenId?: bigint | bigint[] | null }) => {
3098
+ return this.publicClient.watchContractEvent({
3099
+ address: this.contractAddress,
3100
+ abi: veZKCAbi,
3101
+ eventName: 'Approval',
3102
+ args: filter as any,
3103
+ onLogs: (logs: any[]) => {
3104
+ logs.forEach((log: any) => {
3105
+ callback(log.args as any);
3106
+ });
3107
+ },
3108
+ }) as () => void;
3109
+ },
3110
+ /**
3111
+ * Watch ApprovalForAll events
3112
+ * @param callback Function to call when event is emitted
3113
+ * @param filter Optional filter for indexed parameters
3114
+ * @returns Unwatch function to stop listening
3115
+ */
3116
+ ApprovalForAll: (callback: (event: { owner: `0x${string}`; operator: `0x${string}`; approved: boolean }) => void, filter?: { owner?: `0x${string}` | `0x${string}`[] | null; operator?: `0x${string}` | `0x${string}`[] | null }) => {
3117
+ return this.publicClient.watchContractEvent({
3118
+ address: this.contractAddress,
3119
+ abi: veZKCAbi,
3120
+ eventName: 'ApprovalForAll',
3121
+ args: filter as any,
3122
+ onLogs: (logs: any[]) => {
3123
+ logs.forEach((log: any) => {
3124
+ callback(log.args as any);
3125
+ });
3126
+ },
3127
+ }) as () => void;
3128
+ },
3129
+ /**
3130
+ * Watch DelegateChanged events
3131
+ * @param callback Function to call when event is emitted
3132
+ * @param filter Optional filter for indexed parameters
3133
+ * @returns Unwatch function to stop listening
3134
+ */
3135
+ DelegateChanged: (callback: (event: { delegator: `0x${string}`; fromDelegate: `0x${string}`; toDelegate: `0x${string}` }) => void, filter?: { delegator?: `0x${string}` | `0x${string}`[] | null; fromDelegate?: `0x${string}` | `0x${string}`[] | null; toDelegate?: `0x${string}` | `0x${string}`[] | null }) => {
3136
+ return this.publicClient.watchContractEvent({
3137
+ address: this.contractAddress,
3138
+ abi: veZKCAbi,
3139
+ eventName: 'DelegateChanged',
3140
+ args: filter as any,
3141
+ onLogs: (logs: any[]) => {
3142
+ logs.forEach((log: any) => {
3143
+ callback(log.args as any);
3144
+ });
3145
+ },
3146
+ }) as () => void;
3147
+ },
3148
+ /**
3149
+ * Watch DelegateRewardsChanged events
3150
+ * @param callback Function to call when event is emitted
3151
+ * @param filter Optional filter for indexed parameters
3152
+ * @returns Unwatch function to stop listening
3153
+ */
3154
+ DelegateRewardsChanged: (callback: (event: { delegate: `0x${string}`; previousRewards: bigint; newRewards: bigint }) => void, filter?: { delegate?: `0x${string}` | `0x${string}`[] | null }) => {
3155
+ return this.publicClient.watchContractEvent({
3156
+ address: this.contractAddress,
3157
+ abi: veZKCAbi,
3158
+ eventName: 'DelegateRewardsChanged',
3159
+ args: filter as any,
3160
+ onLogs: (logs: any[]) => {
3161
+ logs.forEach((log: any) => {
3162
+ callback(log.args as any);
3163
+ });
3164
+ },
3165
+ }) as () => void;
3166
+ },
3167
+ /**
3168
+ * Watch DelegateVotesChanged events
3169
+ * @param callback Function to call when event is emitted
3170
+ * @param filter Optional filter for indexed parameters
3171
+ * @returns Unwatch function to stop listening
3172
+ */
3173
+ DelegateVotesChanged: (callback: (event: { delegate: `0x${string}`; previousVotes: bigint; newVotes: bigint }) => void, filter?: { delegate?: `0x${string}` | `0x${string}`[] | null }) => {
3174
+ return this.publicClient.watchContractEvent({
3175
+ address: this.contractAddress,
3176
+ abi: veZKCAbi,
3177
+ eventName: 'DelegateVotesChanged',
3178
+ args: filter as any,
3179
+ onLogs: (logs: any[]) => {
3180
+ logs.forEach((log: any) => {
3181
+ callback(log.args as any);
3182
+ });
3183
+ },
3184
+ }) as () => void;
3185
+ },
3186
+ /**
3187
+ * Watch EIP712DomainChanged events
3188
+ * @param callback Function to call when event is emitted
3189
+ * @param filter Optional filter for indexed parameters
3190
+ * @returns Unwatch function to stop listening
3191
+ */
3192
+ EIP712DomainChanged: (callback: (event: { }) => void) => {
3193
+ return this.publicClient.watchContractEvent({
3194
+ address: this.contractAddress,
3195
+ abi: veZKCAbi,
3196
+ eventName: 'EIP712DomainChanged',
3197
+
3198
+ onLogs: (logs: any[]) => {
3199
+ logs.forEach((log: any) => {
3200
+ callback(log.args as any);
3201
+ });
3202
+ },
3203
+ }) as () => void;
3204
+ },
3205
+ /**
3206
+ * Watch Initialized events
3207
+ * @param callback Function to call when event is emitted
3208
+ * @param filter Optional filter for indexed parameters
3209
+ * @returns Unwatch function to stop listening
3210
+ */
3211
+ Initialized: (callback: (event: { version: bigint }) => void) => {
3212
+ return this.publicClient.watchContractEvent({
3213
+ address: this.contractAddress,
3214
+ abi: veZKCAbi,
3215
+ eventName: 'Initialized',
3216
+
3217
+ onLogs: (logs: any[]) => {
3218
+ logs.forEach((log: any) => {
3219
+ callback(log.args as any);
3220
+ });
3221
+ },
3222
+ }) as () => void;
3223
+ },
3224
+ /**
3225
+ * Watch RewardDelegateChanged events
3226
+ * @param callback Function to call when event is emitted
3227
+ * @param filter Optional filter for indexed parameters
3228
+ * @returns Unwatch function to stop listening
3229
+ */
3230
+ RewardDelegateChanged: (callback: (event: { delegator: `0x${string}`; fromDelegate: `0x${string}`; toDelegate: `0x${string}` }) => void, filter?: { delegator?: `0x${string}` | `0x${string}`[] | null; fromDelegate?: `0x${string}` | `0x${string}`[] | null; toDelegate?: `0x${string}` | `0x${string}`[] | null }) => {
3231
+ return this.publicClient.watchContractEvent({
3232
+ address: this.contractAddress,
3233
+ abi: veZKCAbi,
3234
+ eventName: 'RewardDelegateChanged',
3235
+ args: filter as any,
3236
+ onLogs: (logs: any[]) => {
3237
+ logs.forEach((log: any) => {
3238
+ callback(log.args as any);
3239
+ });
3240
+ },
3241
+ }) as () => void;
3242
+ },
3243
+ /**
3244
+ * Watch RoleAdminChanged events
3245
+ * @param callback Function to call when event is emitted
3246
+ * @param filter Optional filter for indexed parameters
3247
+ * @returns Unwatch function to stop listening
3248
+ */
3249
+ RoleAdminChanged: (callback: (event: { role: `0x${string}`; previousAdminRole: `0x${string}`; newAdminRole: `0x${string}` }) => void, filter?: { role?: `0x${string}` | `0x${string}`[] | null; previousAdminRole?: `0x${string}` | `0x${string}`[] | null; newAdminRole?: `0x${string}` | `0x${string}`[] | null }) => {
3250
+ return this.publicClient.watchContractEvent({
3251
+ address: this.contractAddress,
3252
+ abi: veZKCAbi,
3253
+ eventName: 'RoleAdminChanged',
3254
+ args: filter as any,
3255
+ onLogs: (logs: any[]) => {
3256
+ logs.forEach((log: any) => {
3257
+ callback(log.args as any);
3258
+ });
3259
+ },
3260
+ }) as () => void;
3261
+ },
3262
+ /**
3263
+ * Watch RoleGranted events
3264
+ * @param callback Function to call when event is emitted
3265
+ * @param filter Optional filter for indexed parameters
3266
+ * @returns Unwatch function to stop listening
3267
+ */
3268
+ RoleGranted: (callback: (event: { role: `0x${string}`; account: `0x${string}`; sender: `0x${string}` }) => void, filter?: { role?: `0x${string}` | `0x${string}`[] | null; account?: `0x${string}` | `0x${string}`[] | null; sender?: `0x${string}` | `0x${string}`[] | null }) => {
3269
+ return this.publicClient.watchContractEvent({
3270
+ address: this.contractAddress,
3271
+ abi: veZKCAbi,
3272
+ eventName: 'RoleGranted',
3273
+ args: filter as any,
3274
+ onLogs: (logs: any[]) => {
3275
+ logs.forEach((log: any) => {
3276
+ callback(log.args as any);
3277
+ });
3278
+ },
3279
+ }) as () => void;
3280
+ },
3281
+ /**
3282
+ * Watch RoleRevoked events
3283
+ * @param callback Function to call when event is emitted
3284
+ * @param filter Optional filter for indexed parameters
3285
+ * @returns Unwatch function to stop listening
3286
+ */
3287
+ RoleRevoked: (callback: (event: { role: `0x${string}`; account: `0x${string}`; sender: `0x${string}` }) => void, filter?: { role?: `0x${string}` | `0x${string}`[] | null; account?: `0x${string}` | `0x${string}`[] | null; sender?: `0x${string}` | `0x${string}`[] | null }) => {
3288
+ return this.publicClient.watchContractEvent({
3289
+ address: this.contractAddress,
3290
+ abi: veZKCAbi,
3291
+ eventName: 'RoleRevoked',
3292
+ args: filter as any,
3293
+ onLogs: (logs: any[]) => {
3294
+ logs.forEach((log: any) => {
3295
+ callback(log.args as any);
3296
+ });
3297
+ },
3298
+ }) as () => void;
3299
+ },
3300
+ /**
3301
+ * Watch StakeAdded events
3302
+ * @param callback Function to call when event is emitted
3303
+ * @param filter Optional filter for indexed parameters
3304
+ * @returns Unwatch function to stop listening
3305
+ */
3306
+ StakeAdded: (callback: (event: { tokenId: bigint; owner: `0x${string}`; addedAmount: bigint; newTotal: bigint }) => void, filter?: { tokenId?: bigint | bigint[] | null; owner?: `0x${string}` | `0x${string}`[] | null }) => {
3307
+ return this.publicClient.watchContractEvent({
3308
+ address: this.contractAddress,
3309
+ abi: veZKCAbi,
3310
+ eventName: 'StakeAdded',
3311
+ args: filter as any,
3312
+ onLogs: (logs: any[]) => {
3313
+ logs.forEach((log: any) => {
3314
+ callback(log.args as any);
3315
+ });
3316
+ },
3317
+ }) as () => void;
3318
+ },
3319
+ /**
3320
+ * Watch StakeBurned events
3321
+ * @param callback Function to call when event is emitted
3322
+ * @param filter Optional filter for indexed parameters
3323
+ * @returns Unwatch function to stop listening
3324
+ */
3325
+ StakeBurned: (callback: (event: { tokenId: bigint }) => void, filter?: { tokenId?: bigint | bigint[] | null }) => {
3326
+ return this.publicClient.watchContractEvent({
3327
+ address: this.contractAddress,
3328
+ abi: veZKCAbi,
3329
+ eventName: 'StakeBurned',
3330
+ args: filter as any,
3331
+ onLogs: (logs: any[]) => {
3332
+ logs.forEach((log: any) => {
3333
+ callback(log.args as any);
3334
+ });
3335
+ },
3336
+ }) as () => void;
3337
+ },
3338
+ /**
3339
+ * Watch StakeCreated events
3340
+ * @param callback Function to call when event is emitted
3341
+ * @param filter Optional filter for indexed parameters
3342
+ * @returns Unwatch function to stop listening
3343
+ */
3344
+ StakeCreated: (callback: (event: { tokenId: bigint; owner: `0x${string}`; amount: bigint }) => void, filter?: { tokenId?: bigint | bigint[] | null; owner?: `0x${string}` | `0x${string}`[] | null }) => {
3345
+ return this.publicClient.watchContractEvent({
3346
+ address: this.contractAddress,
3347
+ abi: veZKCAbi,
3348
+ eventName: 'StakeCreated',
3349
+ args: filter as any,
3350
+ onLogs: (logs: any[]) => {
3351
+ logs.forEach((log: any) => {
3352
+ callback(log.args as any);
3353
+ });
3354
+ },
3355
+ }) as () => void;
3356
+ },
3357
+ /**
3358
+ * Watch Transfer events
3359
+ * @param callback Function to call when event is emitted
3360
+ * @param filter Optional filter for indexed parameters
3361
+ * @returns Unwatch function to stop listening
3362
+ */
3363
+ Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; tokenId: bigint }) => void, filter?: { from?: `0x${string}` | `0x${string}`[] | null; to?: `0x${string}` | `0x${string}`[] | null; tokenId?: bigint | bigint[] | null }) => {
3364
+ return this.publicClient.watchContractEvent({
3365
+ address: this.contractAddress,
3366
+ abi: veZKCAbi,
3367
+ eventName: 'Transfer',
3368
+ args: filter as any,
3369
+ onLogs: (logs: any[]) => {
3370
+ logs.forEach((log: any) => {
3371
+ callback(log.args as any);
3372
+ });
3373
+ },
3374
+ }) as () => void;
3375
+ },
3376
+ /**
3377
+ * Watch UnstakeCompleted events
3378
+ * @param callback Function to call when event is emitted
3379
+ * @param filter Optional filter for indexed parameters
3380
+ * @returns Unwatch function to stop listening
3381
+ */
3382
+ UnstakeCompleted: (callback: (event: { tokenId: bigint; owner: `0x${string}`; amount: bigint }) => void, filter?: { tokenId?: bigint | bigint[] | null; owner?: `0x${string}` | `0x${string}`[] | null }) => {
3383
+ return this.publicClient.watchContractEvent({
3384
+ address: this.contractAddress,
3385
+ abi: veZKCAbi,
3386
+ eventName: 'UnstakeCompleted',
3387
+ args: filter as any,
3388
+ onLogs: (logs: any[]) => {
3389
+ logs.forEach((log: any) => {
3390
+ callback(log.args as any);
3391
+ });
3392
+ },
3393
+ }) as () => void;
3394
+ },
3395
+ /**
3396
+ * Watch UnstakeInitiated events
3397
+ * @param callback Function to call when event is emitted
3398
+ * @param filter Optional filter for indexed parameters
3399
+ * @returns Unwatch function to stop listening
3400
+ */
3401
+ UnstakeInitiated: (callback: (event: { tokenId: bigint; owner: `0x${string}`; withdrawableAt: bigint }) => void, filter?: { tokenId?: bigint | bigint[] | null; owner?: `0x${string}` | `0x${string}`[] | null }) => {
3402
+ return this.publicClient.watchContractEvent({
3403
+ address: this.contractAddress,
3404
+ abi: veZKCAbi,
3405
+ eventName: 'UnstakeInitiated',
3406
+ args: filter as any,
3407
+ onLogs: (logs: any[]) => {
3408
+ logs.forEach((log: any) => {
3409
+ callback(log.args as any);
3410
+ });
3411
+ },
3412
+ }) as () => void;
3413
+ },
3414
+ /**
3415
+ * Watch Upgraded events
3416
+ * @param callback Function to call when event is emitted
3417
+ * @param filter Optional filter for indexed parameters
3418
+ * @returns Unwatch function to stop listening
3419
+ */
3420
+ Upgraded: (callback: (event: { implementation: `0x${string}` }) => void, filter?: { implementation?: `0x${string}` | `0x${string}`[] | null }) => {
3421
+ return this.publicClient.watchContractEvent({
3422
+ address: this.contractAddress,
3423
+ abi: veZKCAbi,
3424
+ eventName: 'Upgraded',
3425
+ args: filter as any,
3426
+ onLogs: (logs: any[]) => {
3427
+ logs.forEach((log: any) => {
3428
+ callback(log.args as any);
3429
+ });
3430
+ },
3431
+ }) as () => void;
3432
+ }
3433
+ };
3434
+ }
3435
+ }