@gitmyabi/usdc 1.0.0 → 1.0.2

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