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