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