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