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