@gitmyabi/tel 1.0.0 → 1.0.1

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