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