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