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