@gitmyabi/aix 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,1033 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AIX = exports.AIXAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * AIX ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.AIXAbi = [
11
+ {
12
+ "constant": true,
13
+ "inputs": [],
14
+ "name": "name",
15
+ "outputs": [
16
+ {
17
+ "name": "",
18
+ "type": "string"
19
+ }
20
+ ],
21
+ "payable": false,
22
+ "stateMutability": "view",
23
+ "type": "function"
24
+ },
25
+ {
26
+ "constant": false,
27
+ "inputs": [
28
+ {
29
+ "name": "_spender",
30
+ "type": "address"
31
+ },
32
+ {
33
+ "name": "_amount",
34
+ "type": "uint256"
35
+ }
36
+ ],
37
+ "name": "approve",
38
+ "outputs": [
39
+ {
40
+ "name": "success",
41
+ "type": "bool"
42
+ }
43
+ ],
44
+ "payable": false,
45
+ "stateMutability": "nonpayable",
46
+ "type": "function"
47
+ },
48
+ {
49
+ "constant": true,
50
+ "inputs": [],
51
+ "name": "creationBlock",
52
+ "outputs": [
53
+ {
54
+ "name": "",
55
+ "type": "uint256"
56
+ }
57
+ ],
58
+ "payable": false,
59
+ "stateMutability": "view",
60
+ "type": "function"
61
+ },
62
+ {
63
+ "constant": true,
64
+ "inputs": [],
65
+ "name": "totalSupply",
66
+ "outputs": [
67
+ {
68
+ "name": "",
69
+ "type": "uint256"
70
+ }
71
+ ],
72
+ "payable": false,
73
+ "stateMutability": "view",
74
+ "type": "function"
75
+ },
76
+ {
77
+ "constant": false,
78
+ "inputs": [
79
+ {
80
+ "name": "_from",
81
+ "type": "address"
82
+ },
83
+ {
84
+ "name": "_to",
85
+ "type": "address"
86
+ },
87
+ {
88
+ "name": "_amount",
89
+ "type": "uint256"
90
+ }
91
+ ],
92
+ "name": "transferFrom",
93
+ "outputs": [
94
+ {
95
+ "name": "success",
96
+ "type": "bool"
97
+ }
98
+ ],
99
+ "payable": false,
100
+ "stateMutability": "nonpayable",
101
+ "type": "function"
102
+ },
103
+ {
104
+ "constant": true,
105
+ "inputs": [],
106
+ "name": "decimals",
107
+ "outputs": [
108
+ {
109
+ "name": "",
110
+ "type": "uint8"
111
+ }
112
+ ],
113
+ "payable": false,
114
+ "stateMutability": "view",
115
+ "type": "function"
116
+ },
117
+ {
118
+ "constant": false,
119
+ "inputs": [
120
+ {
121
+ "name": "_newController",
122
+ "type": "address"
123
+ }
124
+ ],
125
+ "name": "changeController",
126
+ "outputs": [],
127
+ "payable": false,
128
+ "stateMutability": "nonpayable",
129
+ "type": "function"
130
+ },
131
+ {
132
+ "constant": true,
133
+ "inputs": [
134
+ {
135
+ "name": "_owner",
136
+ "type": "address"
137
+ },
138
+ {
139
+ "name": "_blockNumber",
140
+ "type": "uint256"
141
+ }
142
+ ],
143
+ "name": "balanceOfAt",
144
+ "outputs": [
145
+ {
146
+ "name": "",
147
+ "type": "uint256"
148
+ }
149
+ ],
150
+ "payable": false,
151
+ "stateMutability": "view",
152
+ "type": "function"
153
+ },
154
+ {
155
+ "constant": true,
156
+ "inputs": [],
157
+ "name": "version",
158
+ "outputs": [
159
+ {
160
+ "name": "",
161
+ "type": "string"
162
+ }
163
+ ],
164
+ "payable": false,
165
+ "stateMutability": "view",
166
+ "type": "function"
167
+ },
168
+ {
169
+ "constant": false,
170
+ "inputs": [
171
+ {
172
+ "name": "_cloneTokenName",
173
+ "type": "string"
174
+ },
175
+ {
176
+ "name": "_cloneDecimalUnits",
177
+ "type": "uint8"
178
+ },
179
+ {
180
+ "name": "_cloneTokenSymbol",
181
+ "type": "string"
182
+ },
183
+ {
184
+ "name": "_snapshotBlock",
185
+ "type": "uint256"
186
+ },
187
+ {
188
+ "name": "_transfersEnabled",
189
+ "type": "bool"
190
+ }
191
+ ],
192
+ "name": "createCloneToken",
193
+ "outputs": [
194
+ {
195
+ "name": "",
196
+ "type": "address"
197
+ }
198
+ ],
199
+ "payable": false,
200
+ "stateMutability": "nonpayable",
201
+ "type": "function"
202
+ },
203
+ {
204
+ "constant": true,
205
+ "inputs": [
206
+ {
207
+ "name": "_owner",
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": true,
224
+ "inputs": [],
225
+ "name": "parentToken",
226
+ "outputs": [
227
+ {
228
+ "name": "",
229
+ "type": "address"
230
+ }
231
+ ],
232
+ "payable": false,
233
+ "stateMutability": "view",
234
+ "type": "function"
235
+ },
236
+ {
237
+ "constant": false,
238
+ "inputs": [
239
+ {
240
+ "name": "_owner",
241
+ "type": "address"
242
+ },
243
+ {
244
+ "name": "_amount",
245
+ "type": "uint256"
246
+ }
247
+ ],
248
+ "name": "generateTokens",
249
+ "outputs": [
250
+ {
251
+ "name": "",
252
+ "type": "bool"
253
+ }
254
+ ],
255
+ "payable": false,
256
+ "stateMutability": "nonpayable",
257
+ "type": "function"
258
+ },
259
+ {
260
+ "constant": true,
261
+ "inputs": [],
262
+ "name": "symbol",
263
+ "outputs": [
264
+ {
265
+ "name": "",
266
+ "type": "string"
267
+ }
268
+ ],
269
+ "payable": false,
270
+ "stateMutability": "view",
271
+ "type": "function"
272
+ },
273
+ {
274
+ "constant": true,
275
+ "inputs": [
276
+ {
277
+ "name": "_blockNumber",
278
+ "type": "uint256"
279
+ }
280
+ ],
281
+ "name": "totalSupplyAt",
282
+ "outputs": [
283
+ {
284
+ "name": "",
285
+ "type": "uint256"
286
+ }
287
+ ],
288
+ "payable": false,
289
+ "stateMutability": "view",
290
+ "type": "function"
291
+ },
292
+ {
293
+ "constant": false,
294
+ "inputs": [
295
+ {
296
+ "name": "_to",
297
+ "type": "address"
298
+ },
299
+ {
300
+ "name": "_amount",
301
+ "type": "uint256"
302
+ }
303
+ ],
304
+ "name": "transfer",
305
+ "outputs": [
306
+ {
307
+ "name": "success",
308
+ "type": "bool"
309
+ }
310
+ ],
311
+ "payable": false,
312
+ "stateMutability": "nonpayable",
313
+ "type": "function"
314
+ },
315
+ {
316
+ "constant": true,
317
+ "inputs": [],
318
+ "name": "transfersEnabled",
319
+ "outputs": [
320
+ {
321
+ "name": "",
322
+ "type": "bool"
323
+ }
324
+ ],
325
+ "payable": false,
326
+ "stateMutability": "view",
327
+ "type": "function"
328
+ },
329
+ {
330
+ "constant": true,
331
+ "inputs": [],
332
+ "name": "parentSnapShotBlock",
333
+ "outputs": [
334
+ {
335
+ "name": "",
336
+ "type": "uint256"
337
+ }
338
+ ],
339
+ "payable": false,
340
+ "stateMutability": "view",
341
+ "type": "function"
342
+ },
343
+ {
344
+ "constant": false,
345
+ "inputs": [
346
+ {
347
+ "name": "_spender",
348
+ "type": "address"
349
+ },
350
+ {
351
+ "name": "_amount",
352
+ "type": "uint256"
353
+ },
354
+ {
355
+ "name": "_extraData",
356
+ "type": "bytes"
357
+ }
358
+ ],
359
+ "name": "approveAndCall",
360
+ "outputs": [
361
+ {
362
+ "name": "success",
363
+ "type": "bool"
364
+ }
365
+ ],
366
+ "payable": false,
367
+ "stateMutability": "nonpayable",
368
+ "type": "function"
369
+ },
370
+ {
371
+ "constant": false,
372
+ "inputs": [
373
+ {
374
+ "name": "_owner",
375
+ "type": "address"
376
+ },
377
+ {
378
+ "name": "_amount",
379
+ "type": "uint256"
380
+ }
381
+ ],
382
+ "name": "destroyTokens",
383
+ "outputs": [
384
+ {
385
+ "name": "",
386
+ "type": "bool"
387
+ }
388
+ ],
389
+ "payable": false,
390
+ "stateMutability": "nonpayable",
391
+ "type": "function"
392
+ },
393
+ {
394
+ "constant": true,
395
+ "inputs": [
396
+ {
397
+ "name": "_owner",
398
+ "type": "address"
399
+ },
400
+ {
401
+ "name": "_spender",
402
+ "type": "address"
403
+ }
404
+ ],
405
+ "name": "allowance",
406
+ "outputs": [
407
+ {
408
+ "name": "remaining",
409
+ "type": "uint256"
410
+ }
411
+ ],
412
+ "payable": false,
413
+ "stateMutability": "view",
414
+ "type": "function"
415
+ },
416
+ {
417
+ "constant": false,
418
+ "inputs": [
419
+ {
420
+ "name": "_token",
421
+ "type": "address"
422
+ }
423
+ ],
424
+ "name": "claimTokens",
425
+ "outputs": [],
426
+ "payable": false,
427
+ "stateMutability": "nonpayable",
428
+ "type": "function"
429
+ },
430
+ {
431
+ "constant": true,
432
+ "inputs": [],
433
+ "name": "tokenFactory",
434
+ "outputs": [
435
+ {
436
+ "name": "",
437
+ "type": "address"
438
+ }
439
+ ],
440
+ "payable": false,
441
+ "stateMutability": "view",
442
+ "type": "function"
443
+ },
444
+ {
445
+ "constant": false,
446
+ "inputs": [
447
+ {
448
+ "name": "_transfersEnabled",
449
+ "type": "bool"
450
+ }
451
+ ],
452
+ "name": "enableTransfers",
453
+ "outputs": [],
454
+ "payable": false,
455
+ "stateMutability": "nonpayable",
456
+ "type": "function"
457
+ },
458
+ {
459
+ "constant": true,
460
+ "inputs": [],
461
+ "name": "controller",
462
+ "outputs": [
463
+ {
464
+ "name": "",
465
+ "type": "address"
466
+ }
467
+ ],
468
+ "payable": false,
469
+ "stateMutability": "view",
470
+ "type": "function"
471
+ },
472
+ {
473
+ "inputs": [
474
+ {
475
+ "name": "_tokenFactory",
476
+ "type": "address"
477
+ }
478
+ ],
479
+ "payable": false,
480
+ "stateMutability": "nonpayable",
481
+ "type": "constructor"
482
+ },
483
+ {
484
+ "payable": true,
485
+ "stateMutability": "payable",
486
+ "type": "fallback"
487
+ },
488
+ {
489
+ "anonymous": false,
490
+ "inputs": [
491
+ {
492
+ "indexed": true,
493
+ "name": "_token",
494
+ "type": "address"
495
+ },
496
+ {
497
+ "indexed": true,
498
+ "name": "_controller",
499
+ "type": "address"
500
+ },
501
+ {
502
+ "indexed": false,
503
+ "name": "_amount",
504
+ "type": "uint256"
505
+ }
506
+ ],
507
+ "name": "ClaimedTokens",
508
+ "type": "event"
509
+ },
510
+ {
511
+ "anonymous": false,
512
+ "inputs": [
513
+ {
514
+ "indexed": true,
515
+ "name": "_from",
516
+ "type": "address"
517
+ },
518
+ {
519
+ "indexed": true,
520
+ "name": "_to",
521
+ "type": "address"
522
+ },
523
+ {
524
+ "indexed": false,
525
+ "name": "_amount",
526
+ "type": "uint256"
527
+ }
528
+ ],
529
+ "name": "Transfer",
530
+ "type": "event"
531
+ },
532
+ {
533
+ "anonymous": false,
534
+ "inputs": [
535
+ {
536
+ "indexed": true,
537
+ "name": "_cloneToken",
538
+ "type": "address"
539
+ },
540
+ {
541
+ "indexed": false,
542
+ "name": "_snapshotBlock",
543
+ "type": "uint256"
544
+ }
545
+ ],
546
+ "name": "NewCloneToken",
547
+ "type": "event"
548
+ },
549
+ {
550
+ "anonymous": false,
551
+ "inputs": [
552
+ {
553
+ "indexed": true,
554
+ "name": "_owner",
555
+ "type": "address"
556
+ },
557
+ {
558
+ "indexed": true,
559
+ "name": "_spender",
560
+ "type": "address"
561
+ },
562
+ {
563
+ "indexed": false,
564
+ "name": "_amount",
565
+ "type": "uint256"
566
+ }
567
+ ],
568
+ "name": "Approval",
569
+ "type": "event"
570
+ }
571
+ ];
572
+ /**
573
+ * AIX Contract Class
574
+ *
575
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
576
+ *
577
+ * @example
578
+ * ```typescript
579
+ * import { createPublicClient, createWalletClient, http } from 'viem';
580
+ * import { mainnet } from 'viem/chains';
581
+ * import { AIX } from 'AIX';
582
+ *
583
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
584
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
585
+ *
586
+ * const contract = new AIX('0x...', { publicClient, walletClient });
587
+ *
588
+ * // Read functions
589
+ * const result = await contract.balanceOf('0x...');
590
+ *
591
+ * // Write functions
592
+ * const hash = await contract.transfer('0x...', 1000n);
593
+ *
594
+ * // Simulate transactions (dry-run)
595
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
596
+ * console.log('Gas estimate:', simulation.request.gas);
597
+ *
598
+ * // Watch events
599
+ * const unwatch = contract.watch.Transfer((event) => {
600
+ * console.log('Transfer event:', event);
601
+ * });
602
+ * ```
603
+ */
604
+ class AIX {
605
+ constructor(address, clients) {
606
+ this.contractAddress = address;
607
+ this.publicClient = clients.publicClient;
608
+ this.contract = (0, viem_1.getContract)({
609
+ address,
610
+ abi: exports.AIXAbi,
611
+ client: {
612
+ public: clients.publicClient,
613
+ wallet: clients.walletClient,
614
+ },
615
+ });
616
+ }
617
+ /**
618
+ * Get the contract address
619
+ */
620
+ get address() {
621
+ return this.contractAddress;
622
+ }
623
+ /**
624
+ * Get the underlying viem contract instance.
625
+ */
626
+ getContract() {
627
+ return this.contract;
628
+ }
629
+ /**
630
+ * name
631
+ * view
632
+ */
633
+ async name() {
634
+ return this.contract.read.name();
635
+ }
636
+ /**
637
+ * creationBlock
638
+ * view
639
+ */
640
+ async creationBlock() {
641
+ return this.contract.read.creationBlock();
642
+ }
643
+ /**
644
+ * totalSupply
645
+ * view
646
+ */
647
+ async totalSupply() {
648
+ return this.contract.read.totalSupply();
649
+ }
650
+ /**
651
+ * decimals
652
+ * view
653
+ */
654
+ async decimals() {
655
+ return this.contract.read.decimals();
656
+ }
657
+ /**
658
+ * balanceOfAt
659
+ * view
660
+ */
661
+ async balanceOfAt(_owner, _blockNumber) {
662
+ return this.contract.read.balanceOfAt([_owner, _blockNumber]);
663
+ }
664
+ /**
665
+ * version
666
+ * view
667
+ */
668
+ async version() {
669
+ return this.contract.read.version();
670
+ }
671
+ /**
672
+ * balanceOf
673
+ * view
674
+ */
675
+ async balanceOf(_owner) {
676
+ return this.contract.read.balanceOf([_owner]);
677
+ }
678
+ /**
679
+ * parentToken
680
+ * view
681
+ */
682
+ async parentToken() {
683
+ return this.contract.read.parentToken();
684
+ }
685
+ /**
686
+ * symbol
687
+ * view
688
+ */
689
+ async symbol() {
690
+ return this.contract.read.symbol();
691
+ }
692
+ /**
693
+ * totalSupplyAt
694
+ * view
695
+ */
696
+ async totalSupplyAt(_blockNumber) {
697
+ return this.contract.read.totalSupplyAt([_blockNumber]);
698
+ }
699
+ /**
700
+ * transfersEnabled
701
+ * view
702
+ */
703
+ async transfersEnabled() {
704
+ return this.contract.read.transfersEnabled();
705
+ }
706
+ /**
707
+ * parentSnapShotBlock
708
+ * view
709
+ */
710
+ async parentSnapShotBlock() {
711
+ return this.contract.read.parentSnapShotBlock();
712
+ }
713
+ /**
714
+ * allowance
715
+ * view
716
+ */
717
+ async allowance(_owner, _spender) {
718
+ return this.contract.read.allowance([_owner, _spender]);
719
+ }
720
+ /**
721
+ * tokenFactory
722
+ * view
723
+ */
724
+ async tokenFactory() {
725
+ return this.contract.read.tokenFactory();
726
+ }
727
+ /**
728
+ * controller
729
+ * view
730
+ */
731
+ async controller() {
732
+ return this.contract.read.controller();
733
+ }
734
+ /**
735
+ * approve
736
+ * nonpayable
737
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
738
+ */
739
+ async approve(_spender, _amount, options) {
740
+ if (!this.contract.write) {
741
+ throw new Error('Wallet client is required for write operations');
742
+ }
743
+ return this.contract.write.approve([_spender, _amount], options);
744
+ }
745
+ /**
746
+ * transferFrom
747
+ * nonpayable
748
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
749
+ */
750
+ async transferFrom(_from, _to, _amount, options) {
751
+ if (!this.contract.write) {
752
+ throw new Error('Wallet client is required for write operations');
753
+ }
754
+ return this.contract.write.transferFrom([_from, _to, _amount], options);
755
+ }
756
+ /**
757
+ * changeController
758
+ * nonpayable
759
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
760
+ */
761
+ async changeController(_newController, options) {
762
+ if (!this.contract.write) {
763
+ throw new Error('Wallet client is required for write operations');
764
+ }
765
+ return this.contract.write.changeController([_newController], options);
766
+ }
767
+ /**
768
+ * createCloneToken
769
+ * nonpayable
770
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
771
+ */
772
+ async createCloneToken(_cloneTokenName, _cloneDecimalUnits, _cloneTokenSymbol, _snapshotBlock, _transfersEnabled, options) {
773
+ if (!this.contract.write) {
774
+ throw new Error('Wallet client is required for write operations');
775
+ }
776
+ return this.contract.write.createCloneToken([_cloneTokenName, _cloneDecimalUnits, _cloneTokenSymbol, _snapshotBlock, _transfersEnabled], options);
777
+ }
778
+ /**
779
+ * generateTokens
780
+ * nonpayable
781
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
782
+ */
783
+ async generateTokens(_owner, _amount, options) {
784
+ if (!this.contract.write) {
785
+ throw new Error('Wallet client is required for write operations');
786
+ }
787
+ return this.contract.write.generateTokens([_owner, _amount], options);
788
+ }
789
+ /**
790
+ * transfer
791
+ * nonpayable
792
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
793
+ */
794
+ async transfer(_to, _amount, options) {
795
+ if (!this.contract.write) {
796
+ throw new Error('Wallet client is required for write operations');
797
+ }
798
+ return this.contract.write.transfer([_to, _amount], options);
799
+ }
800
+ /**
801
+ * approveAndCall
802
+ * nonpayable
803
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
804
+ */
805
+ async approveAndCall(_spender, _amount, _extraData, options) {
806
+ if (!this.contract.write) {
807
+ throw new Error('Wallet client is required for write operations');
808
+ }
809
+ return this.contract.write.approveAndCall([_spender, _amount, _extraData], options);
810
+ }
811
+ /**
812
+ * destroyTokens
813
+ * nonpayable
814
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
815
+ */
816
+ async destroyTokens(_owner, _amount, options) {
817
+ if (!this.contract.write) {
818
+ throw new Error('Wallet client is required for write operations');
819
+ }
820
+ return this.contract.write.destroyTokens([_owner, _amount], options);
821
+ }
822
+ /**
823
+ * claimTokens
824
+ * nonpayable
825
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
826
+ */
827
+ async claimTokens(_token, options) {
828
+ if (!this.contract.write) {
829
+ throw new Error('Wallet client is required for write operations');
830
+ }
831
+ return this.contract.write.claimTokens([_token], options);
832
+ }
833
+ /**
834
+ * enableTransfers
835
+ * nonpayable
836
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
837
+ */
838
+ async enableTransfers(_transfersEnabled, options) {
839
+ if (!this.contract.write) {
840
+ throw new Error('Wallet client is required for write operations');
841
+ }
842
+ return this.contract.write.enableTransfers([_transfersEnabled], options);
843
+ }
844
+ /**
845
+ * Simulate contract write operations (dry-run without sending transaction)
846
+ *
847
+ * @example
848
+ * const result = await contract.simulate.transfer('0x...', 1000n);
849
+ * console.log('Gas estimate:', result.request.gas);
850
+ * console.log('Would succeed:', result.result);
851
+ */
852
+ get simulate() {
853
+ const contract = this.contract;
854
+ if (!contract.simulate) {
855
+ throw new Error('Public client is required for simulation');
856
+ }
857
+ return {
858
+ /**
859
+ * Simulate approve
860
+ * Returns gas estimate and result without sending transaction
861
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
862
+ */
863
+ async approve(_spender, _amount, options) {
864
+ return contract.simulate.approve([_spender, _amount], options);
865
+ },
866
+ /**
867
+ * Simulate transferFrom
868
+ * Returns gas estimate and result without sending transaction
869
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
870
+ */
871
+ async transferFrom(_from, _to, _amount, options) {
872
+ return contract.simulate.transferFrom([_from, _to, _amount], options);
873
+ },
874
+ /**
875
+ * Simulate changeController
876
+ * Returns gas estimate and result without sending transaction
877
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
878
+ */
879
+ async changeController(_newController, options) {
880
+ return contract.simulate.changeController([_newController], options);
881
+ },
882
+ /**
883
+ * Simulate createCloneToken
884
+ * Returns gas estimate and result without sending transaction
885
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
886
+ */
887
+ async createCloneToken(_cloneTokenName, _cloneDecimalUnits, _cloneTokenSymbol, _snapshotBlock, _transfersEnabled, options) {
888
+ return contract.simulate.createCloneToken([_cloneTokenName, _cloneDecimalUnits, _cloneTokenSymbol, _snapshotBlock, _transfersEnabled], options);
889
+ },
890
+ /**
891
+ * Simulate generateTokens
892
+ * Returns gas estimate and result without sending transaction
893
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
894
+ */
895
+ async generateTokens(_owner, _amount, options) {
896
+ return contract.simulate.generateTokens([_owner, _amount], options);
897
+ },
898
+ /**
899
+ * Simulate transfer
900
+ * Returns gas estimate and result without sending transaction
901
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
902
+ */
903
+ async transfer(_to, _amount, options) {
904
+ return contract.simulate.transfer([_to, _amount], options);
905
+ },
906
+ /**
907
+ * Simulate approveAndCall
908
+ * Returns gas estimate and result without sending transaction
909
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
910
+ */
911
+ async approveAndCall(_spender, _amount, _extraData, options) {
912
+ return contract.simulate.approveAndCall([_spender, _amount, _extraData], options);
913
+ },
914
+ /**
915
+ * Simulate destroyTokens
916
+ * Returns gas estimate and result without sending transaction
917
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
918
+ */
919
+ async destroyTokens(_owner, _amount, options) {
920
+ return contract.simulate.destroyTokens([_owner, _amount], options);
921
+ },
922
+ /**
923
+ * Simulate claimTokens
924
+ * Returns gas estimate and result without sending transaction
925
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
926
+ */
927
+ async claimTokens(_token, options) {
928
+ return contract.simulate.claimTokens([_token], options);
929
+ },
930
+ /**
931
+ * Simulate enableTransfers
932
+ * Returns gas estimate and result without sending transaction
933
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
934
+ */
935
+ async enableTransfers(_transfersEnabled, options) {
936
+ return contract.simulate.enableTransfers([_transfersEnabled], options);
937
+ }
938
+ };
939
+ }
940
+ /**
941
+ * Watch contract events
942
+ *
943
+ * @example
944
+ * // Watch all Transfer events
945
+ * const unwatch = contract.watch.Transfer((event) => {
946
+ * console.log('Transfer:', event);
947
+ * });
948
+ *
949
+ * // Stop watching
950
+ * unwatch();
951
+ */
952
+ get watch() {
953
+ return {
954
+ /**
955
+ * Watch ClaimedTokens events
956
+ * @param callback Function to call when event is emitted
957
+ * @param filter Optional filter for indexed parameters
958
+ * @returns Unwatch function to stop listening
959
+ */
960
+ ClaimedTokens: (callback, filter) => {
961
+ return this.publicClient.watchContractEvent({
962
+ address: this.contractAddress,
963
+ abi: exports.AIXAbi,
964
+ eventName: 'ClaimedTokens',
965
+ args: filter,
966
+ onLogs: (logs) => {
967
+ logs.forEach((log) => {
968
+ callback(log.args);
969
+ });
970
+ },
971
+ });
972
+ },
973
+ /**
974
+ * Watch Transfer events
975
+ * @param callback Function to call when event is emitted
976
+ * @param filter Optional filter for indexed parameters
977
+ * @returns Unwatch function to stop listening
978
+ */
979
+ Transfer: (callback, filter) => {
980
+ return this.publicClient.watchContractEvent({
981
+ address: this.contractAddress,
982
+ abi: exports.AIXAbi,
983
+ eventName: 'Transfer',
984
+ args: filter,
985
+ onLogs: (logs) => {
986
+ logs.forEach((log) => {
987
+ callback(log.args);
988
+ });
989
+ },
990
+ });
991
+ },
992
+ /**
993
+ * Watch NewCloneToken events
994
+ * @param callback Function to call when event is emitted
995
+ * @param filter Optional filter for indexed parameters
996
+ * @returns Unwatch function to stop listening
997
+ */
998
+ NewCloneToken: (callback, filter) => {
999
+ return this.publicClient.watchContractEvent({
1000
+ address: this.contractAddress,
1001
+ abi: exports.AIXAbi,
1002
+ eventName: 'NewCloneToken',
1003
+ args: filter,
1004
+ onLogs: (logs) => {
1005
+ logs.forEach((log) => {
1006
+ callback(log.args);
1007
+ });
1008
+ },
1009
+ });
1010
+ },
1011
+ /**
1012
+ * Watch Approval events
1013
+ * @param callback Function to call when event is emitted
1014
+ * @param filter Optional filter for indexed parameters
1015
+ * @returns Unwatch function to stop listening
1016
+ */
1017
+ Approval: (callback, filter) => {
1018
+ return this.publicClient.watchContractEvent({
1019
+ address: this.contractAddress,
1020
+ abi: exports.AIXAbi,
1021
+ eventName: 'Approval',
1022
+ args: filter,
1023
+ onLogs: (logs) => {
1024
+ logs.forEach((log) => {
1025
+ callback(log.args);
1026
+ });
1027
+ },
1028
+ });
1029
+ }
1030
+ };
1031
+ }
1032
+ }
1033
+ exports.AIX = AIX;