@gitmyabi/ars 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,1206 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+ /**
5
+ * AurusToken_json ABI
6
+ *
7
+ * This ABI is typed using viem's type system for full type safety.
8
+ */
9
+ export const AurusToken_jsonAbi = [
10
+ {
11
+ "constant": true,
12
+ "inputs": [],
13
+ "name": "mintingFinished",
14
+ "outputs": [
15
+ {
16
+ "name": "",
17
+ "type": "bool"
18
+ }
19
+ ],
20
+ "payable": false,
21
+ "stateMutability": "view",
22
+ "type": "function"
23
+ },
24
+ {
25
+ "constant": true,
26
+ "inputs": [],
27
+ "name": "name",
28
+ "outputs": [
29
+ {
30
+ "name": "",
31
+ "type": "string"
32
+ }
33
+ ],
34
+ "payable": false,
35
+ "stateMutability": "view",
36
+ "type": "function"
37
+ },
38
+ {
39
+ "constant": false,
40
+ "inputs": [
41
+ {
42
+ "name": "_spender",
43
+ "type": "address"
44
+ },
45
+ {
46
+ "name": "_value",
47
+ "type": "uint256"
48
+ }
49
+ ],
50
+ "name": "approve",
51
+ "outputs": [
52
+ {
53
+ "name": "",
54
+ "type": "bool"
55
+ }
56
+ ],
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
+ "name": "INITIAL_SUPPLY",
106
+ "outputs": [
107
+ {
108
+ "name": "",
109
+ "type": "uint256"
110
+ }
111
+ ],
112
+ "payable": false,
113
+ "stateMutability": "view",
114
+ "type": "function"
115
+ },
116
+ {
117
+ "constant": true,
118
+ "inputs": [],
119
+ "name": "decimals",
120
+ "outputs": [
121
+ {
122
+ "name": "",
123
+ "type": "uint32"
124
+ }
125
+ ],
126
+ "payable": false,
127
+ "stateMutability": "view",
128
+ "type": "function"
129
+ },
130
+ {
131
+ "constant": false,
132
+ "inputs": [
133
+ {
134
+ "name": "_to",
135
+ "type": "address"
136
+ },
137
+ {
138
+ "name": "_amount",
139
+ "type": "uint256"
140
+ }
141
+ ],
142
+ "name": "mint",
143
+ "outputs": [
144
+ {
145
+ "name": "",
146
+ "type": "bool"
147
+ }
148
+ ],
149
+ "payable": false,
150
+ "stateMutability": "nonpayable",
151
+ "type": "function"
152
+ },
153
+ {
154
+ "constant": false,
155
+ "inputs": [
156
+ {
157
+ "name": "_value",
158
+ "type": "uint256"
159
+ }
160
+ ],
161
+ "name": "burn",
162
+ "outputs": [],
163
+ "payable": false,
164
+ "stateMutability": "nonpayable",
165
+ "type": "function"
166
+ },
167
+ {
168
+ "constant": false,
169
+ "inputs": [
170
+ {
171
+ "name": "_spender",
172
+ "type": "address"
173
+ },
174
+ {
175
+ "name": "_subtractedValue",
176
+ "type": "uint256"
177
+ }
178
+ ],
179
+ "name": "decreaseApproval",
180
+ "outputs": [
181
+ {
182
+ "name": "",
183
+ "type": "bool"
184
+ }
185
+ ],
186
+ "payable": false,
187
+ "stateMutability": "nonpayable",
188
+ "type": "function"
189
+ },
190
+ {
191
+ "constant": true,
192
+ "inputs": [
193
+ {
194
+ "name": "_owner",
195
+ "type": "address"
196
+ }
197
+ ],
198
+ "name": "balanceOf",
199
+ "outputs": [
200
+ {
201
+ "name": "",
202
+ "type": "uint256"
203
+ }
204
+ ],
205
+ "payable": false,
206
+ "stateMutability": "view",
207
+ "type": "function"
208
+ },
209
+ {
210
+ "constant": false,
211
+ "inputs": [],
212
+ "name": "renounceOwnership",
213
+ "outputs": [],
214
+ "payable": false,
215
+ "stateMutability": "nonpayable",
216
+ "type": "function"
217
+ },
218
+ {
219
+ "constant": false,
220
+ "inputs": [],
221
+ "name": "finishMinting",
222
+ "outputs": [
223
+ {
224
+ "name": "",
225
+ "type": "bool"
226
+ }
227
+ ],
228
+ "payable": false,
229
+ "stateMutability": "nonpayable",
230
+ "type": "function"
231
+ },
232
+ {
233
+ "constant": true,
234
+ "inputs": [],
235
+ "name": "owner",
236
+ "outputs": [
237
+ {
238
+ "name": "",
239
+ "type": "address"
240
+ }
241
+ ],
242
+ "payable": false,
243
+ "stateMutability": "view",
244
+ "type": "function"
245
+ },
246
+ {
247
+ "constant": true,
248
+ "inputs": [],
249
+ "name": "symbol",
250
+ "outputs": [
251
+ {
252
+ "name": "",
253
+ "type": "string"
254
+ }
255
+ ],
256
+ "payable": false,
257
+ "stateMutability": "view",
258
+ "type": "function"
259
+ },
260
+ {
261
+ "constant": false,
262
+ "inputs": [
263
+ {
264
+ "name": "_to",
265
+ "type": "address"
266
+ },
267
+ {
268
+ "name": "_value",
269
+ "type": "uint256"
270
+ }
271
+ ],
272
+ "name": "transfer",
273
+ "outputs": [
274
+ {
275
+ "name": "",
276
+ "type": "bool"
277
+ }
278
+ ],
279
+ "payable": false,
280
+ "stateMutability": "nonpayable",
281
+ "type": "function"
282
+ },
283
+ {
284
+ "constant": false,
285
+ "inputs": [
286
+ {
287
+ "name": "_spender",
288
+ "type": "address"
289
+ },
290
+ {
291
+ "name": "_addedValue",
292
+ "type": "uint256"
293
+ }
294
+ ],
295
+ "name": "increaseApproval",
296
+ "outputs": [
297
+ {
298
+ "name": "",
299
+ "type": "bool"
300
+ }
301
+ ],
302
+ "payable": false,
303
+ "stateMutability": "nonpayable",
304
+ "type": "function"
305
+ },
306
+ {
307
+ "constant": true,
308
+ "inputs": [
309
+ {
310
+ "name": "_owner",
311
+ "type": "address"
312
+ },
313
+ {
314
+ "name": "_spender",
315
+ "type": "address"
316
+ }
317
+ ],
318
+ "name": "allowance",
319
+ "outputs": [
320
+ {
321
+ "name": "",
322
+ "type": "uint256"
323
+ }
324
+ ],
325
+ "payable": false,
326
+ "stateMutability": "view",
327
+ "type": "function"
328
+ },
329
+ {
330
+ "constant": false,
331
+ "inputs": [
332
+ {
333
+ "name": "_newOwner",
334
+ "type": "address"
335
+ }
336
+ ],
337
+ "name": "transferOwnership",
338
+ "outputs": [],
339
+ "payable": false,
340
+ "stateMutability": "nonpayable",
341
+ "type": "function"
342
+ },
343
+ {
344
+ "inputs": [],
345
+ "payable": false,
346
+ "stateMutability": "nonpayable",
347
+ "type": "constructor"
348
+ },
349
+ {
350
+ "anonymous": false,
351
+ "inputs": [
352
+ {
353
+ "indexed": true,
354
+ "name": "burner",
355
+ "type": "address"
356
+ },
357
+ {
358
+ "indexed": false,
359
+ "name": "value",
360
+ "type": "uint256"
361
+ }
362
+ ],
363
+ "name": "Burn",
364
+ "type": "event"
365
+ },
366
+ {
367
+ "anonymous": false,
368
+ "inputs": [
369
+ {
370
+ "indexed": true,
371
+ "name": "to",
372
+ "type": "address"
373
+ },
374
+ {
375
+ "indexed": false,
376
+ "name": "amount",
377
+ "type": "uint256"
378
+ }
379
+ ],
380
+ "name": "Mint",
381
+ "type": "event"
382
+ },
383
+ {
384
+ "anonymous": false,
385
+ "inputs": [],
386
+ "name": "MintFinished",
387
+ "type": "event"
388
+ },
389
+ {
390
+ "anonymous": false,
391
+ "inputs": [
392
+ {
393
+ "indexed": true,
394
+ "name": "previousOwner",
395
+ "type": "address"
396
+ }
397
+ ],
398
+ "name": "OwnershipRenounced",
399
+ "type": "event"
400
+ },
401
+ {
402
+ "anonymous": false,
403
+ "inputs": [
404
+ {
405
+ "indexed": true,
406
+ "name": "previousOwner",
407
+ "type": "address"
408
+ },
409
+ {
410
+ "indexed": true,
411
+ "name": "newOwner",
412
+ "type": "address"
413
+ }
414
+ ],
415
+ "name": "OwnershipTransferred",
416
+ "type": "event"
417
+ },
418
+ {
419
+ "anonymous": false,
420
+ "inputs": [
421
+ {
422
+ "indexed": true,
423
+ "name": "owner",
424
+ "type": "address"
425
+ },
426
+ {
427
+ "indexed": true,
428
+ "name": "spender",
429
+ "type": "address"
430
+ },
431
+ {
432
+ "indexed": false,
433
+ "name": "value",
434
+ "type": "uint256"
435
+ }
436
+ ],
437
+ "name": "Approval",
438
+ "type": "event"
439
+ },
440
+ {
441
+ "anonymous": false,
442
+ "inputs": [
443
+ {
444
+ "indexed": true,
445
+ "name": "from",
446
+ "type": "address"
447
+ },
448
+ {
449
+ "indexed": true,
450
+ "name": "to",
451
+ "type": "address"
452
+ },
453
+ {
454
+ "indexed": false,
455
+ "name": "value",
456
+ "type": "uint256"
457
+ }
458
+ ],
459
+ "name": "Transfer",
460
+ "type": "event"
461
+ }
462
+ ] as const satisfies Abi;
463
+
464
+ /**
465
+ * Type-safe ABI for AurusToken_json
466
+ */
467
+ export type AurusToken_jsonAbi = typeof AurusToken_jsonAbi;
468
+
469
+ /**
470
+ * Contract instance type for AurusToken_json
471
+ */
472
+ // Use any for contract type to avoid complex viem type issues
473
+ // The runtime behavior is type-safe through viem's ABI typing
474
+ export type AurusToken_jsonContract = any;
475
+
476
+ /**
477
+ * AurusToken_json Contract Class
478
+ *
479
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
480
+ *
481
+ * @example
482
+ * ```typescript
483
+ * import { createPublicClient, createWalletClient, http } from 'viem';
484
+ * import { mainnet } from 'viem/chains';
485
+ * import { AurusToken_json } from 'AurusToken_json';
486
+ *
487
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
488
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
489
+ *
490
+ * const contract = new AurusToken_json('0x...', { publicClient, walletClient });
491
+ *
492
+ * // Read functions
493
+ * const result = await contract.balanceOf('0x...');
494
+ *
495
+ * // Write functions
496
+ * const hash = await contract.transfer('0x...', 1000n);
497
+ *
498
+ * // Simulate transactions (dry-run)
499
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
500
+ * console.log('Gas estimate:', simulation.request.gas);
501
+ *
502
+ * // Watch events
503
+ * const unwatch = contract.watch.Transfer((event) => {
504
+ * console.log('Transfer event:', event);
505
+ * });
506
+ * ```
507
+ */
508
+ export class AurusToken_json {
509
+ private contract: AurusToken_jsonContract;
510
+ private contractAddress: Address;
511
+ private publicClient: PublicClient;
512
+
513
+ constructor(
514
+ address: Address,
515
+ clients: {
516
+ publicClient: PublicClient;
517
+ walletClient?: WalletClient;
518
+ }
519
+ ) {
520
+ this.contractAddress = address;
521
+ this.publicClient = clients.publicClient;
522
+ this.contract = getContract({
523
+ address,
524
+ abi: AurusToken_jsonAbi,
525
+ client: {
526
+ public: clients.publicClient,
527
+ wallet: clients.walletClient,
528
+ },
529
+ });
530
+ }
531
+
532
+ /**
533
+ * Get the contract address
534
+ */
535
+ get address(): Address {
536
+ return this.contractAddress;
537
+ }
538
+
539
+ /**
540
+ * Get the underlying viem contract instance
541
+ */
542
+ getContract(): AurusToken_jsonContract {
543
+ return this.contract;
544
+ }
545
+
546
+ /**
547
+ * mintingFinished
548
+ * view
549
+ */
550
+ async mintingFinished(): Promise<boolean> {
551
+ return this.contract.read.mintingFinished() as Promise<boolean>;
552
+ }
553
+
554
+ /**
555
+ * name
556
+ * view
557
+ */
558
+ async name(): Promise<string> {
559
+ return this.contract.read.name() as Promise<string>;
560
+ }
561
+
562
+ /**
563
+ * totalSupply
564
+ * view
565
+ */
566
+ async totalSupply(): Promise<bigint> {
567
+ return this.contract.read.totalSupply() as Promise<bigint>;
568
+ }
569
+
570
+ /**
571
+ * INITIAL_SUPPLY
572
+ * view
573
+ */
574
+ async INITIAL_SUPPLY(): Promise<bigint> {
575
+ return this.contract.read.INITIAL_SUPPLY() as Promise<bigint>;
576
+ }
577
+
578
+ /**
579
+ * decimals
580
+ * view
581
+ */
582
+ async decimals(): Promise<bigint> {
583
+ return this.contract.read.decimals() as Promise<bigint>;
584
+ }
585
+
586
+ /**
587
+ * balanceOf
588
+ * view
589
+ */
590
+ async balanceOf(_owner: `0x${string}`): Promise<bigint> {
591
+ return this.contract.read.balanceOf([_owner] as const) as Promise<bigint>;
592
+ }
593
+
594
+ /**
595
+ * owner
596
+ * view
597
+ */
598
+ async owner(): Promise<`0x${string}`> {
599
+ return this.contract.read.owner() as Promise<`0x${string}`>;
600
+ }
601
+
602
+ /**
603
+ * symbol
604
+ * view
605
+ */
606
+ async symbol(): Promise<string> {
607
+ return this.contract.read.symbol() as Promise<string>;
608
+ }
609
+
610
+ /**
611
+ * allowance
612
+ * view
613
+ */
614
+ async allowance(_owner: `0x${string}`, _spender: `0x${string}`): Promise<bigint> {
615
+ return this.contract.read.allowance([_owner, _spender] as const) as Promise<bigint>;
616
+ }
617
+
618
+ /**
619
+ * approve
620
+ * nonpayable
621
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
622
+ */
623
+ async approve(_spender: `0x${string}`, _value: bigint, options?: {
624
+ accessList?: import('viem').AccessList;
625
+ authorizationList?: import('viem').AuthorizationList;
626
+ chain?: import('viem').Chain | null;
627
+ dataSuffix?: `0x${string}`;
628
+ gas?: bigint;
629
+ gasPrice?: bigint;
630
+ maxFeePerGas?: bigint;
631
+ maxPriorityFeePerGas?: bigint;
632
+ nonce?: number;
633
+ value?: bigint;
634
+ }): Promise<`0x${string}`> {
635
+ if (!this.contract.write) {
636
+ throw new Error('Wallet client is required for write operations');
637
+ }
638
+ return this.contract.write.approve([_spender, _value] as const, options) as Promise<`0x${string}`>;
639
+ }
640
+
641
+ /**
642
+ * transferFrom
643
+ * nonpayable
644
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
645
+ */
646
+ async transferFrom(_from: `0x${string}`, _to: `0x${string}`, _value: bigint, options?: {
647
+ accessList?: import('viem').AccessList;
648
+ authorizationList?: import('viem').AuthorizationList;
649
+ chain?: import('viem').Chain | null;
650
+ dataSuffix?: `0x${string}`;
651
+ gas?: bigint;
652
+ gasPrice?: bigint;
653
+ maxFeePerGas?: bigint;
654
+ maxPriorityFeePerGas?: bigint;
655
+ nonce?: number;
656
+ value?: bigint;
657
+ }): Promise<`0x${string}`> {
658
+ if (!this.contract.write) {
659
+ throw new Error('Wallet client is required for write operations');
660
+ }
661
+ return this.contract.write.transferFrom([_from, _to, _value] as const, options) as Promise<`0x${string}`>;
662
+ }
663
+
664
+ /**
665
+ * mint
666
+ * nonpayable
667
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
668
+ */
669
+ async mint(_to: `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.mint([_to, _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(_value: 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([_value] as const, options) as Promise<`0x${string}`>;
708
+ }
709
+
710
+ /**
711
+ * decreaseApproval
712
+ * nonpayable
713
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
714
+ */
715
+ async decreaseApproval(_spender: `0x${string}`, _subtractedValue: 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.decreaseApproval([_spender, _subtractedValue] as const, options) as Promise<`0x${string}`>;
731
+ }
732
+
733
+ /**
734
+ * renounceOwnership
735
+ * nonpayable
736
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
737
+ */
738
+ async renounceOwnership(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.renounceOwnership(options) as Promise<`0x${string}`>;
754
+ }
755
+
756
+ /**
757
+ * finishMinting
758
+ * nonpayable
759
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
760
+ */
761
+ async finishMinting(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.finishMinting(options) as Promise<`0x${string}`>;
777
+ }
778
+
779
+ /**
780
+ * transfer
781
+ * nonpayable
782
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
783
+ */
784
+ async transfer(_to: `0x${string}`, _value: 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.transfer([_to, _value] as const, options) as Promise<`0x${string}`>;
800
+ }
801
+
802
+ /**
803
+ * increaseApproval
804
+ * nonpayable
805
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
806
+ */
807
+ async increaseApproval(_spender: `0x${string}`, _addedValue: 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.increaseApproval([_spender, _addedValue] as const, options) as Promise<`0x${string}`>;
823
+ }
824
+
825
+ /**
826
+ * transferOwnership
827
+ * nonpayable
828
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
829
+ */
830
+ async transferOwnership(_newOwner: `0x${string}`, 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.transferOwnership([_newOwner] as const, options) as Promise<`0x${string}`>;
846
+ }
847
+
848
+
849
+
850
+ /**
851
+ * Simulate contract write operations (dry-run without sending transaction)
852
+ *
853
+ * @example
854
+ * const result = await contract.simulate.transfer('0x...', 1000n);
855
+ * console.log('Gas estimate:', result.request.gas);
856
+ * console.log('Would succeed:', result.result);
857
+ */
858
+ get simulate() {
859
+ const contract = this.contract;
860
+ if (!contract.simulate) {
861
+ throw new Error('Public client is required for simulation');
862
+ }
863
+ return {
864
+ /**
865
+ * Simulate approve
866
+ * Returns gas estimate and result without sending transaction
867
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
868
+ */
869
+ async approve(_spender: `0x${string}`, _value: bigint, options?: {
870
+ accessList?: import('viem').AccessList;
871
+ authorizationList?: import('viem').AuthorizationList;
872
+ chain?: import('viem').Chain | null;
873
+ dataSuffix?: `0x${string}`;
874
+ gas?: bigint;
875
+ gasPrice?: bigint;
876
+ maxFeePerGas?: bigint;
877
+ maxPriorityFeePerGas?: bigint;
878
+ nonce?: number;
879
+ value?: bigint;
880
+ }): Promise<boolean> {
881
+ return contract.simulate.approve([_spender, _value] as const, options) as Promise<boolean>;
882
+ },
883
+ /**
884
+ * Simulate transferFrom
885
+ * Returns gas estimate and result without sending transaction
886
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
887
+ */
888
+ async transferFrom(_from: `0x${string}`, _to: `0x${string}`, _value: bigint, options?: {
889
+ accessList?: import('viem').AccessList;
890
+ authorizationList?: import('viem').AuthorizationList;
891
+ chain?: import('viem').Chain | null;
892
+ dataSuffix?: `0x${string}`;
893
+ gas?: bigint;
894
+ gasPrice?: bigint;
895
+ maxFeePerGas?: bigint;
896
+ maxPriorityFeePerGas?: bigint;
897
+ nonce?: number;
898
+ value?: bigint;
899
+ }): Promise<boolean> {
900
+ return contract.simulate.transferFrom([_from, _to, _value] as const, options) as Promise<boolean>;
901
+ },
902
+ /**
903
+ * Simulate mint
904
+ * Returns gas estimate and result without sending transaction
905
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
906
+ */
907
+ async mint(_to: `0x${string}`, _amount: bigint, options?: {
908
+ accessList?: import('viem').AccessList;
909
+ authorizationList?: import('viem').AuthorizationList;
910
+ chain?: import('viem').Chain | null;
911
+ dataSuffix?: `0x${string}`;
912
+ gas?: bigint;
913
+ gasPrice?: bigint;
914
+ maxFeePerGas?: bigint;
915
+ maxPriorityFeePerGas?: bigint;
916
+ nonce?: number;
917
+ value?: bigint;
918
+ }): Promise<boolean> {
919
+ return contract.simulate.mint([_to, _amount] as const, options) as Promise<boolean>;
920
+ },
921
+ /**
922
+ * Simulate burn
923
+ * Returns gas estimate and result without sending transaction
924
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
925
+ */
926
+ async burn(_value: bigint, options?: {
927
+ accessList?: import('viem').AccessList;
928
+ authorizationList?: import('viem').AuthorizationList;
929
+ chain?: import('viem').Chain | null;
930
+ dataSuffix?: `0x${string}`;
931
+ gas?: bigint;
932
+ gasPrice?: bigint;
933
+ maxFeePerGas?: bigint;
934
+ maxPriorityFeePerGas?: bigint;
935
+ nonce?: number;
936
+ value?: bigint;
937
+ }): Promise<void> {
938
+ return contract.simulate.burn([_value] as const, options) as Promise<void>;
939
+ },
940
+ /**
941
+ * Simulate decreaseApproval
942
+ * Returns gas estimate and result without sending transaction
943
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
944
+ */
945
+ async decreaseApproval(_spender: `0x${string}`, _subtractedValue: bigint, 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<boolean> {
957
+ return contract.simulate.decreaseApproval([_spender, _subtractedValue] as const, options) as Promise<boolean>;
958
+ },
959
+ /**
960
+ * Simulate renounceOwnership
961
+ * Returns gas estimate and result without sending transaction
962
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
963
+ */
964
+ async renounceOwnership(options?: {
965
+ accessList?: import('viem').AccessList;
966
+ authorizationList?: import('viem').AuthorizationList;
967
+ chain?: import('viem').Chain | null;
968
+ dataSuffix?: `0x${string}`;
969
+ gas?: bigint;
970
+ gasPrice?: bigint;
971
+ maxFeePerGas?: bigint;
972
+ maxPriorityFeePerGas?: bigint;
973
+ nonce?: number;
974
+ value?: bigint;
975
+ }): Promise<void> {
976
+ return contract.simulate.renounceOwnership(options) as Promise<void>;
977
+ },
978
+ /**
979
+ * Simulate finishMinting
980
+ * Returns gas estimate and result without sending transaction
981
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
982
+ */
983
+ async finishMinting(options?: {
984
+ accessList?: import('viem').AccessList;
985
+ authorizationList?: import('viem').AuthorizationList;
986
+ chain?: import('viem').Chain | null;
987
+ dataSuffix?: `0x${string}`;
988
+ gas?: bigint;
989
+ gasPrice?: bigint;
990
+ maxFeePerGas?: bigint;
991
+ maxPriorityFeePerGas?: bigint;
992
+ nonce?: number;
993
+ value?: bigint;
994
+ }): Promise<boolean> {
995
+ return contract.simulate.finishMinting(options) as Promise<boolean>;
996
+ },
997
+ /**
998
+ * Simulate transfer
999
+ * Returns gas estimate and result without sending transaction
1000
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1001
+ */
1002
+ async transfer(_to: `0x${string}`, _value: bigint, options?: {
1003
+ accessList?: import('viem').AccessList;
1004
+ authorizationList?: import('viem').AuthorizationList;
1005
+ chain?: import('viem').Chain | null;
1006
+ dataSuffix?: `0x${string}`;
1007
+ gas?: bigint;
1008
+ gasPrice?: bigint;
1009
+ maxFeePerGas?: bigint;
1010
+ maxPriorityFeePerGas?: bigint;
1011
+ nonce?: number;
1012
+ value?: bigint;
1013
+ }): Promise<boolean> {
1014
+ return contract.simulate.transfer([_to, _value] as const, options) as Promise<boolean>;
1015
+ },
1016
+ /**
1017
+ * Simulate increaseApproval
1018
+ * Returns gas estimate and result without sending transaction
1019
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1020
+ */
1021
+ async increaseApproval(_spender: `0x${string}`, _addedValue: bigint, options?: {
1022
+ accessList?: import('viem').AccessList;
1023
+ authorizationList?: import('viem').AuthorizationList;
1024
+ chain?: import('viem').Chain | null;
1025
+ dataSuffix?: `0x${string}`;
1026
+ gas?: bigint;
1027
+ gasPrice?: bigint;
1028
+ maxFeePerGas?: bigint;
1029
+ maxPriorityFeePerGas?: bigint;
1030
+ nonce?: number;
1031
+ value?: bigint;
1032
+ }): Promise<boolean> {
1033
+ return contract.simulate.increaseApproval([_spender, _addedValue] as const, options) as Promise<boolean>;
1034
+ },
1035
+ /**
1036
+ * Simulate transferOwnership
1037
+ * Returns gas estimate and result without sending transaction
1038
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1039
+ */
1040
+ async transferOwnership(_newOwner: `0x${string}`, options?: {
1041
+ accessList?: import('viem').AccessList;
1042
+ authorizationList?: import('viem').AuthorizationList;
1043
+ chain?: import('viem').Chain | null;
1044
+ dataSuffix?: `0x${string}`;
1045
+ gas?: bigint;
1046
+ gasPrice?: bigint;
1047
+ maxFeePerGas?: bigint;
1048
+ maxPriorityFeePerGas?: bigint;
1049
+ nonce?: number;
1050
+ value?: bigint;
1051
+ }): Promise<void> {
1052
+ return contract.simulate.transferOwnership([_newOwner] as const, options) as Promise<void>;
1053
+ }
1054
+ };
1055
+ }
1056
+
1057
+ /**
1058
+ * Watch contract events
1059
+ *
1060
+ * @example
1061
+ * // Watch all Transfer events
1062
+ * const unwatch = contract.watch.Transfer((event) => {
1063
+ * console.log('Transfer:', event);
1064
+ * });
1065
+ *
1066
+ * // Stop watching
1067
+ * unwatch();
1068
+ */
1069
+ get watch() {
1070
+ return {
1071
+ /**
1072
+ * Watch Burn events
1073
+ * @param callback Function to call when event is emitted
1074
+ * @param filter Optional filter for indexed parameters
1075
+ * @returns Unwatch function to stop listening
1076
+ */
1077
+ Burn: (callback: (event: { burner: `0x${string}`; value: bigint }) => void, filter?: { burner: `0x${string}` }) => {
1078
+ return this.publicClient.watchContractEvent({
1079
+ address: this.contractAddress,
1080
+ abi: AurusToken_jsonAbi,
1081
+ eventName: 'Burn',
1082
+ args: filter,
1083
+ onLogs: (logs: any[]) => {
1084
+ logs.forEach((log: any) => {
1085
+ callback(log.args as any);
1086
+ });
1087
+ },
1088
+ }) as () => void;
1089
+ },
1090
+ /**
1091
+ * Watch Mint events
1092
+ * @param callback Function to call when event is emitted
1093
+ * @param filter Optional filter for indexed parameters
1094
+ * @returns Unwatch function to stop listening
1095
+ */
1096
+ Mint: (callback: (event: { to: `0x${string}`; amount: bigint }) => void, filter?: { to: `0x${string}` }) => {
1097
+ return this.publicClient.watchContractEvent({
1098
+ address: this.contractAddress,
1099
+ abi: AurusToken_jsonAbi,
1100
+ eventName: 'Mint',
1101
+ args: filter,
1102
+ onLogs: (logs: any[]) => {
1103
+ logs.forEach((log: any) => {
1104
+ callback(log.args as any);
1105
+ });
1106
+ },
1107
+ }) as () => void;
1108
+ },
1109
+ /**
1110
+ * Watch MintFinished events
1111
+ * @param callback Function to call when event is emitted
1112
+ * @param filter Optional filter for indexed parameters
1113
+ * @returns Unwatch function to stop listening
1114
+ */
1115
+ MintFinished: (callback: (event: { }) => void) => {
1116
+ return this.publicClient.watchContractEvent({
1117
+ address: this.contractAddress,
1118
+ abi: AurusToken_jsonAbi,
1119
+ eventName: 'MintFinished',
1120
+
1121
+ onLogs: (logs: any[]) => {
1122
+ logs.forEach((log: any) => {
1123
+ callback(log.args as any);
1124
+ });
1125
+ },
1126
+ }) as () => void;
1127
+ },
1128
+ /**
1129
+ * Watch OwnershipRenounced events
1130
+ * @param callback Function to call when event is emitted
1131
+ * @param filter Optional filter for indexed parameters
1132
+ * @returns Unwatch function to stop listening
1133
+ */
1134
+ OwnershipRenounced: (callback: (event: { previousOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}` }) => {
1135
+ return this.publicClient.watchContractEvent({
1136
+ address: this.contractAddress,
1137
+ abi: AurusToken_jsonAbi,
1138
+ eventName: 'OwnershipRenounced',
1139
+ args: filter,
1140
+ onLogs: (logs: any[]) => {
1141
+ logs.forEach((log: any) => {
1142
+ callback(log.args as any);
1143
+ });
1144
+ },
1145
+ }) as () => void;
1146
+ },
1147
+ /**
1148
+ * Watch OwnershipTransferred events
1149
+ * @param callback Function to call when event is emitted
1150
+ * @param filter Optional filter for indexed parameters
1151
+ * @returns Unwatch function to stop listening
1152
+ */
1153
+ OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => {
1154
+ return this.publicClient.watchContractEvent({
1155
+ address: this.contractAddress,
1156
+ abi: AurusToken_jsonAbi,
1157
+ eventName: 'OwnershipTransferred',
1158
+ args: filter,
1159
+ onLogs: (logs: any[]) => {
1160
+ logs.forEach((log: any) => {
1161
+ callback(log.args as any);
1162
+ });
1163
+ },
1164
+ }) as () => void;
1165
+ },
1166
+ /**
1167
+ * Watch Approval events
1168
+ * @param callback Function to call when event is emitted
1169
+ * @param filter Optional filter for indexed parameters
1170
+ * @returns Unwatch function to stop listening
1171
+ */
1172
+ Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner: `0x${string}`; spender: `0x${string}` }) => {
1173
+ return this.publicClient.watchContractEvent({
1174
+ address: this.contractAddress,
1175
+ abi: AurusToken_jsonAbi,
1176
+ eventName: 'Approval',
1177
+ args: filter,
1178
+ onLogs: (logs: any[]) => {
1179
+ logs.forEach((log: any) => {
1180
+ callback(log.args as any);
1181
+ });
1182
+ },
1183
+ }) as () => void;
1184
+ },
1185
+ /**
1186
+ * Watch Transfer events
1187
+ * @param callback Function to call when event is emitted
1188
+ * @param filter Optional filter for indexed parameters
1189
+ * @returns Unwatch function to stop listening
1190
+ */
1191
+ Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
1192
+ return this.publicClient.watchContractEvent({
1193
+ address: this.contractAddress,
1194
+ abi: AurusToken_jsonAbi,
1195
+ eventName: 'Transfer',
1196
+ args: filter,
1197
+ onLogs: (logs: any[]) => {
1198
+ logs.forEach((log: any) => {
1199
+ callback(log.args as any);
1200
+ });
1201
+ },
1202
+ }) as () => void;
1203
+ }
1204
+ };
1205
+ }
1206
+ }