@gitmyabi/usdt 1.0.23 → 1.0.27

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