@gitmyabi/cc 1.0.1

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