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