@gitmyabi-stg/g 1.0.0

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