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