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