@gitmyabi/stakingmanager 1.0.4 → 1.0.5

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.
@@ -2,11 +2,11 @@ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType }
2
2
  import { getContract } from 'viem';
3
3
 
4
4
  /**
5
- * stakingManagerV2_json ABI
5
+ * stakingManagerV4_json ABI
6
6
  *
7
7
  * This ABI is typed using viem's type system for full type safety.
8
8
  */
9
- export const stakingManagerV2_jsonAbi = [
9
+ export const stakingManagerV4_jsonAbi = [
10
10
  {
11
11
  "inputs": [],
12
12
  "stateMutability": "nonpayable",
@@ -96,65 +96,69 @@ export const stakingManagerV2_jsonAbi = [
96
96
  "internalType": "uint256",
97
97
  "name": "amount",
98
98
  "type": "uint256"
99
+ },
100
+ {
101
+ "indexed": false,
102
+ "internalType": "uint256",
103
+ "name": "timestamp",
104
+ "type": "uint256"
99
105
  }
100
106
  ],
101
- "name": "Withdraw",
107
+ "name": "RestakePrincipal",
102
108
  "type": "event"
103
109
  },
104
110
  {
111
+ "anonymous": false,
105
112
  "inputs": [
106
113
  {
114
+ "indexed": true,
107
115
  "internalType": "address",
108
- "name": "_rewardTokenAddress",
109
- "type": "address"
110
- },
111
- {
112
- "internalType": "address",
113
- "name": "_presale",
116
+ "name": "user",
114
117
  "type": "address"
115
118
  },
116
119
  {
120
+ "indexed": false,
117
121
  "internalType": "uint256",
118
- "name": "_rewardTokensPerBlock",
119
- "type": "uint256"
120
- },
121
- {
122
- "internalType": "uint256",
123
- "name": "_lockTime",
122
+ "name": "amount",
124
123
  "type": "uint256"
125
124
  },
126
125
  {
126
+ "indexed": false,
127
127
  "internalType": "uint256",
128
- "name": "_endBlock",
128
+ "name": "timestamp",
129
129
  "type": "uint256"
130
130
  }
131
131
  ],
132
- "name": "__stakingManager_init",
133
- "outputs": [],
134
- "stateMutability": "nonpayable",
135
- "type": "function"
132
+ "name": "RestakeRewards",
133
+ "type": "event"
136
134
  },
137
135
  {
136
+ "anonymous": false,
138
137
  "inputs": [
139
138
  {
140
- "internalType": "address[]",
141
- "name": "_usersToBlacklist",
142
- "type": "address[]"
139
+ "indexed": true,
140
+ "internalType": "address",
141
+ "name": "user",
142
+ "type": "address"
143
+ },
144
+ {
145
+ "indexed": false,
146
+ "internalType": "uint256",
147
+ "name": "amount",
148
+ "type": "uint256"
143
149
  }
144
150
  ],
145
- "name": "blacklistUsers",
146
- "outputs": [],
147
- "stateMutability": "nonpayable",
148
- "type": "function"
151
+ "name": "Withdraw",
152
+ "type": "event"
149
153
  },
150
154
  {
151
155
  "inputs": [],
152
- "name": "claimStart",
156
+ "name": "DEV_WALLET",
153
157
  "outputs": [
154
158
  {
155
- "internalType": "uint256",
159
+ "internalType": "address",
156
160
  "name": "",
157
- "type": "uint256"
161
+ "type": "address"
158
162
  }
159
163
  ],
160
164
  "stateMutability": "view",
@@ -163,32 +167,27 @@ export const stakingManagerV2_jsonAbi = [
163
167
  {
164
168
  "inputs": [
165
169
  {
166
- "internalType": "uint256",
167
- "name": "_amount",
168
- "type": "uint256"
170
+ "internalType": "address[]",
171
+ "name": "_usersToBlacklist",
172
+ "type": "address[]"
169
173
  }
170
174
  ],
171
- "name": "deposit",
175
+ "name": "blacklistUsers",
172
176
  "outputs": [],
173
177
  "stateMutability": "nonpayable",
174
178
  "type": "function"
175
179
  },
176
180
  {
177
- "inputs": [
178
- {
179
- "internalType": "address",
180
- "name": "_user",
181
- "type": "address"
182
- },
181
+ "inputs": [],
182
+ "name": "claimStart",
183
+ "outputs": [
183
184
  {
184
185
  "internalType": "uint256",
185
- "name": "_amount",
186
+ "name": "",
186
187
  "type": "uint256"
187
188
  }
188
189
  ],
189
- "name": "depositByPresale",
190
- "outputs": [],
191
- "stateMutability": "nonpayable",
190
+ "stateMutability": "view",
192
191
  "type": "function"
193
192
  },
194
193
  {
@@ -275,6 +274,19 @@ export const stakingManagerV2_jsonAbi = [
275
274
  "stateMutability": "view",
276
275
  "type": "function"
277
276
  },
277
+ {
278
+ "inputs": [],
279
+ "name": "newStaking",
280
+ "outputs": [
281
+ {
282
+ "internalType": "contract INewStaking",
283
+ "name": "",
284
+ "type": "address"
285
+ }
286
+ ],
287
+ "stateMutability": "view",
288
+ "type": "function"
289
+ },
278
290
  {
279
291
  "inputs": [],
280
292
  "name": "owner",
@@ -360,6 +372,13 @@ export const stakingManagerV2_jsonAbi = [
360
372
  "stateMutability": "nonpayable",
361
373
  "type": "function"
362
374
  },
375
+ {
376
+ "inputs": [],
377
+ "name": "restakeNew",
378
+ "outputs": [],
379
+ "stateMutability": "nonpayable",
380
+ "type": "function"
381
+ },
363
382
  {
364
383
  "inputs": [],
365
384
  "name": "rewardTokensPerBlock",
@@ -373,19 +392,6 @@ export const stakingManagerV2_jsonAbi = [
373
392
  "stateMutability": "view",
374
393
  "type": "function"
375
394
  },
376
- {
377
- "inputs": [
378
- {
379
- "internalType": "uint256",
380
- "name": "_claimStart",
381
- "type": "uint256"
382
- }
383
- ],
384
- "name": "setClaimStart",
385
- "outputs": [],
386
- "stateMutability": "nonpayable",
387
- "type": "function"
388
- },
389
395
  {
390
396
  "inputs": [
391
397
  {
@@ -399,41 +405,15 @@ export const stakingManagerV2_jsonAbi = [
399
405
  "stateMutability": "nonpayable",
400
406
  "type": "function"
401
407
  },
402
- {
403
- "inputs": [
404
- {
405
- "internalType": "bool",
406
- "name": "_harvestlock",
407
- "type": "bool"
408
- }
409
- ],
410
- "name": "setHarvestLock",
411
- "outputs": [],
412
- "stateMutability": "nonpayable",
413
- "type": "function"
414
- },
415
- {
416
- "inputs": [
417
- {
418
- "internalType": "uint256",
419
- "name": "_time",
420
- "type": "uint256"
421
- }
422
- ],
423
- "name": "setLockedTime",
424
- "outputs": [],
425
- "stateMutability": "nonpayable",
426
- "type": "function"
427
- },
428
408
  {
429
409
  "inputs": [
430
410
  {
431
411
  "internalType": "address",
432
- "name": "_presale",
412
+ "name": "_stakingContract",
433
413
  "type": "address"
434
414
  }
435
415
  ],
436
- "name": "setPresale",
416
+ "name": "setNewStaking",
437
417
  "outputs": [],
438
418
  "stateMutability": "nonpayable",
439
419
  "type": "function"
@@ -466,14 +446,9 @@ export const stakingManagerV2_jsonAbi = [
466
446
  },
467
447
  {
468
448
  "inputs": [
469
- {
470
- "internalType": "address",
471
- "name": "_token",
472
- "type": "address"
473
- },
474
449
  {
475
450
  "internalType": "uint256",
476
- "name": "_amount",
451
+ "name": "amount",
477
452
  "type": "uint256"
478
453
  }
479
454
  ],
@@ -550,19 +525,19 @@ export const stakingManagerV2_jsonAbi = [
550
525
  ] as const satisfies Abi;
551
526
 
552
527
  /**
553
- * Type-safe ABI for stakingManagerV2_json
528
+ * Type-safe ABI for stakingManagerV4_json
554
529
  */
555
- export type stakingManagerV2_jsonAbi = typeof stakingManagerV2_jsonAbi;
530
+ export type stakingManagerV4_jsonAbi = typeof stakingManagerV4_jsonAbi;
556
531
 
557
532
  /**
558
- * Contract instance type for stakingManagerV2_json
533
+ * Contract instance type for stakingManagerV4_json
559
534
  */
560
535
  // Use any for contract type to avoid complex viem type issues
561
536
  // The runtime behavior is type-safe through viem's ABI typing
562
- export type stakingManagerV2_jsonContract = any;
537
+ export type stakingManagerV4_jsonContract = any;
563
538
 
564
539
  /**
565
- * stakingManagerV2_json Contract Class
540
+ * stakingManagerV4_json Contract Class
566
541
  *
567
542
  * Provides a class-based API similar to TypeChain for interacting with the contract.
568
543
  *
@@ -570,12 +545,12 @@ export type stakingManagerV2_jsonContract = any;
570
545
  * ```typescript
571
546
  * import { createPublicClient, createWalletClient, http } from 'viem';
572
547
  * import { mainnet } from 'viem/chains';
573
- * import { stakingManagerV2_json } from 'stakingManagerV2_json';
548
+ * import { stakingManagerV4_json } from 'stakingManagerV4_json';
574
549
  *
575
550
  * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
576
551
  * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
577
552
  *
578
- * const contract = new stakingManagerV2_json('0x...', { publicClient, walletClient });
553
+ * const contract = new stakingManagerV4_json('0x...', { publicClient, walletClient });
579
554
  *
580
555
  * // Read functions
581
556
  * const result = await contract.balanceOf('0x...');
@@ -593,8 +568,8 @@ export type stakingManagerV2_jsonContract = any;
593
568
  * });
594
569
  * ```
595
570
  */
596
- export class stakingManagerV2_json {
597
- private contract: stakingManagerV2_jsonContract;
571
+ export class stakingManagerV4_json {
572
+ private contract: stakingManagerV4_jsonContract;
598
573
  private contractAddress: Address;
599
574
  private publicClient: PublicClient;
600
575
 
@@ -609,7 +584,7 @@ export class stakingManagerV2_json {
609
584
  this.publicClient = clients.publicClient;
610
585
  this.contract = getContract({
611
586
  address,
612
- abi: stakingManagerV2_jsonAbi,
587
+ abi: stakingManagerV4_jsonAbi,
613
588
  client: {
614
589
  public: clients.publicClient,
615
590
  wallet: clients.walletClient,
@@ -627,10 +602,18 @@ export class stakingManagerV2_json {
627
602
  /**
628
603
  * Get the underlying viem contract instance
629
604
  */
630
- getContract(): stakingManagerV2_jsonContract {
605
+ getContract(): stakingManagerV4_jsonContract {
631
606
  return this.contract;
632
607
  }
633
608
 
609
+ /**
610
+ * DEV_WALLET
611
+ * view
612
+ */
613
+ async DEV_WALLET(): Promise<`0x${string}`> {
614
+ return this.contract.read.DEV_WALLET() as Promise<`0x${string}`>;
615
+ }
616
+
634
617
  /**
635
618
  * claimStart
636
619
  * view
@@ -679,6 +662,14 @@ export class stakingManagerV2_json {
679
662
  return this.contract.read.lockedTime() as Promise<bigint>;
680
663
  }
681
664
 
665
+ /**
666
+ * newStaking
667
+ * view
668
+ */
669
+ async newStaking(): Promise<`0x${string}`> {
670
+ return this.contract.read.newStaking() as Promise<`0x${string}`>;
671
+ }
672
+
682
673
  /**
683
674
  * owner
684
675
  * view
@@ -743,29 +734,6 @@ export class stakingManagerV2_json {
743
734
  return this.contract.read.userLockedRewards([arg0] as const) as Promise<bigint>;
744
735
  }
745
736
 
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
737
  /**
770
738
  * blacklistUsers
771
739
  * nonpayable
@@ -789,52 +757,6 @@ export class stakingManagerV2_json {
789
757
  return this.contract.write.blacklistUsers([_usersToBlacklist] as const, options) as Promise<`0x${string}`>;
790
758
  }
791
759
 
792
- /**
793
- * deposit
794
- * nonpayable
795
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
796
- */
797
- async deposit(_amount: 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.deposit([_amount] as const, options) as Promise<`0x${string}`>;
813
- }
814
-
815
- /**
816
- * depositByPresale
817
- * nonpayable
818
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
819
- */
820
- async depositByPresale(_user: `0x${string}`, _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.depositByPresale([_user, _amount] as const, options) as Promise<`0x${string}`>;
836
- }
837
-
838
760
  /**
839
761
  * harvestRewards
840
762
  * nonpayable
@@ -905,11 +827,11 @@ export class stakingManagerV2_json {
905
827
  }
906
828
 
907
829
  /**
908
- * setClaimStart
830
+ * restakeNew
909
831
  * nonpayable
910
832
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
911
833
  */
912
- async setClaimStart(_claimStart: bigint, options?: {
834
+ async restakeNew(options?: {
913
835
  accessList?: import('viem').AccessList;
914
836
  authorizationList?: import('viem').AuthorizationList;
915
837
  chain?: import('viem').Chain | null;
@@ -924,7 +846,7 @@ export class stakingManagerV2_json {
924
846
  if (!this.contract.write) {
925
847
  throw new Error('Wallet client is required for write operations');
926
848
  }
927
- return this.contract.write.setClaimStart([_claimStart] as const, options) as Promise<`0x${string}`>;
849
+ return this.contract.write.restakeNew(options) as Promise<`0x${string}`>;
928
850
  }
929
851
 
930
852
  /**
@@ -951,57 +873,11 @@ export class stakingManagerV2_json {
951
873
  }
952
874
 
953
875
  /**
954
- * setHarvestLock
955
- * nonpayable
956
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
957
- */
958
- async setHarvestLock(_harvestlock: boolean, 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.setHarvestLock([_harvestlock] as const, options) as Promise<`0x${string}`>;
974
- }
975
-
976
- /**
977
- * setLockedTime
978
- * nonpayable
979
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
980
- */
981
- async setLockedTime(_time: bigint, 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.setLockedTime([_time] as const, options) as Promise<`0x${string}`>;
997
- }
998
-
999
- /**
1000
- * setPresale
876
+ * setNewStaking
1001
877
  * nonpayable
1002
878
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1003
879
  */
1004
- async setPresale(_presale: `0x${string}`, options?: {
880
+ async setNewStaking(_stakingContract: `0x${string}`, options?: {
1005
881
  accessList?: import('viem').AccessList;
1006
882
  authorizationList?: import('viem').AuthorizationList;
1007
883
  chain?: import('viem').Chain | null;
@@ -1016,7 +892,7 @@ export class stakingManagerV2_json {
1016
892
  if (!this.contract.write) {
1017
893
  throw new Error('Wallet client is required for write operations');
1018
894
  }
1019
- return this.contract.write.setPresale([_presale] as const, options) as Promise<`0x${string}`>;
895
+ return this.contract.write.setNewStaking([_stakingContract] as const, options) as Promise<`0x${string}`>;
1020
896
  }
1021
897
 
1022
898
  /**
@@ -1047,7 +923,7 @@ export class stakingManagerV2_json {
1047
923
  * nonpayable
1048
924
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1049
925
  */
1050
- async tokenTransfer(_token: `0x${string}`, _amount: bigint, options?: {
926
+ async tokenTransfer(amount: bigint, options?: {
1051
927
  accessList?: import('viem').AccessList;
1052
928
  authorizationList?: import('viem').AuthorizationList;
1053
929
  chain?: import('viem').Chain | null;
@@ -1062,7 +938,7 @@ export class stakingManagerV2_json {
1062
938
  if (!this.contract.write) {
1063
939
  throw new Error('Wallet client is required for write operations');
1064
940
  }
1065
- return this.contract.write.tokenTransfer([_token, _amount] as const, options) as Promise<`0x${string}`>;
941
+ return this.contract.write.tokenTransfer([amount] as const, options) as Promise<`0x${string}`>;
1066
942
  }
1067
943
 
1068
944
  /**
@@ -1127,25 +1003,6 @@ export class stakingManagerV2_json {
1127
1003
  throw new Error('Public client is required for simulation');
1128
1004
  }
1129
1005
  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
1006
  /**
1150
1007
  * Simulate blacklistUsers
1151
1008
  * Returns gas estimate and result without sending transaction
@@ -1165,44 +1022,6 @@ export class stakingManagerV2_json {
1165
1022
  }): Promise<void> {
1166
1023
  return contract.simulate.blacklistUsers([_usersToBlacklist] as const, options) as Promise<void>;
1167
1024
  },
1168
- /**
1169
- * Simulate deposit
1170
- * Returns gas estimate and result without sending transaction
1171
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1172
- */
1173
- async deposit(_amount: 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.deposit([_amount] as const, options) as Promise<void>;
1186
- },
1187
- /**
1188
- * Simulate depositByPresale
1189
- * Returns gas estimate and result without sending transaction
1190
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1191
- */
1192
- async depositByPresale(_user: `0x${string}`, _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.depositByPresale([_user, _amount] as const, options) as Promise<void>;
1205
- },
1206
1025
  /**
1207
1026
  * Simulate harvestRewards
1208
1027
  * Returns gas estimate and result without sending transaction
@@ -1261,11 +1080,11 @@ export class stakingManagerV2_json {
1261
1080
  return contract.simulate.renounceOwnership(options) as Promise<void>;
1262
1081
  },
1263
1082
  /**
1264
- * Simulate setClaimStart
1083
+ * Simulate restakeNew
1265
1084
  * Returns gas estimate and result without sending transaction
1266
1085
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1267
1086
  */
1268
- async setClaimStart(_claimStart: bigint, options?: {
1087
+ async restakeNew(options?: {
1269
1088
  accessList?: import('viem').AccessList;
1270
1089
  authorizationList?: import('viem').AuthorizationList;
1271
1090
  chain?: import('viem').Chain | null;
@@ -1277,7 +1096,7 @@ export class stakingManagerV2_json {
1277
1096
  nonce?: number;
1278
1097
  value?: bigint;
1279
1098
  }): Promise<void> {
1280
- return contract.simulate.setClaimStart([_claimStart] as const, options) as Promise<void>;
1099
+ return contract.simulate.restakeNew(options) as Promise<void>;
1281
1100
  },
1282
1101
  /**
1283
1102
  * Simulate setEndBlock
@@ -1299,49 +1118,11 @@ export class stakingManagerV2_json {
1299
1118
  return contract.simulate.setEndBlock([_endBlock] as const, options) as Promise<void>;
1300
1119
  },
1301
1120
  /**
1302
- * Simulate setHarvestLock
1303
- * Returns gas estimate and result without sending transaction
1304
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1305
- */
1306
- async setHarvestLock(_harvestlock: boolean, 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.setHarvestLock([_harvestlock] as const, options) as Promise<void>;
1319
- },
1320
- /**
1321
- * Simulate setLockedTime
1322
- * Returns gas estimate and result without sending transaction
1323
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1324
- */
1325
- async setLockedTime(_time: bigint, 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.setLockedTime([_time] as const, options) as Promise<void>;
1338
- },
1339
- /**
1340
- * Simulate setPresale
1121
+ * Simulate setNewStaking
1341
1122
  * Returns gas estimate and result without sending transaction
1342
1123
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1343
1124
  */
1344
- async setPresale(_presale: `0x${string}`, options?: {
1125
+ async setNewStaking(_stakingContract: `0x${string}`, options?: {
1345
1126
  accessList?: import('viem').AccessList;
1346
1127
  authorizationList?: import('viem').AuthorizationList;
1347
1128
  chain?: import('viem').Chain | null;
@@ -1353,7 +1134,7 @@ export class stakingManagerV2_json {
1353
1134
  nonce?: number;
1354
1135
  value?: bigint;
1355
1136
  }): Promise<void> {
1356
- return contract.simulate.setPresale([_presale] as const, options) as Promise<void>;
1137
+ return contract.simulate.setNewStaking([_stakingContract] as const, options) as Promise<void>;
1357
1138
  },
1358
1139
  /**
1359
1140
  * Simulate setStakeToken
@@ -1379,7 +1160,7 @@ export class stakingManagerV2_json {
1379
1160
  * Returns gas estimate and result without sending transaction
1380
1161
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1381
1162
  */
1382
- async tokenTransfer(_token: `0x${string}`, _amount: bigint, options?: {
1163
+ async tokenTransfer(amount: bigint, options?: {
1383
1164
  accessList?: import('viem').AccessList;
1384
1165
  authorizationList?: import('viem').AuthorizationList;
1385
1166
  chain?: import('viem').Chain | null;
@@ -1391,7 +1172,7 @@ export class stakingManagerV2_json {
1391
1172
  nonce?: number;
1392
1173
  value?: bigint;
1393
1174
  }): Promise<void> {
1394
- return contract.simulate.tokenTransfer([_token, _amount] as const, options) as Promise<void>;
1175
+ return contract.simulate.tokenTransfer([amount] as const, options) as Promise<void>;
1395
1176
  },
1396
1177
  /**
1397
1178
  * Simulate transferOwnership
@@ -1457,7 +1238,7 @@ export class stakingManagerV2_json {
1457
1238
  Deposit: (callback: (event: { user: `0x${string}`; amount: bigint }) => void, filter?: { user: `0x${string}` }) => {
1458
1239
  return this.publicClient.watchContractEvent({
1459
1240
  address: this.contractAddress,
1460
- abi: stakingManagerV2_jsonAbi,
1241
+ abi: stakingManagerV4_jsonAbi,
1461
1242
  eventName: 'Deposit',
1462
1243
  args: filter,
1463
1244
  onLogs: (logs: any[]) => {
@@ -1476,7 +1257,7 @@ export class stakingManagerV2_json {
1476
1257
  HarvestRewards: (callback: (event: { user: `0x${string}`; amount: bigint }) => void, filter?: { user: `0x${string}` }) => {
1477
1258
  return this.publicClient.watchContractEvent({
1478
1259
  address: this.contractAddress,
1479
- abi: stakingManagerV2_jsonAbi,
1260
+ abi: stakingManagerV4_jsonAbi,
1480
1261
  eventName: 'HarvestRewards',
1481
1262
  args: filter,
1482
1263
  onLogs: (logs: any[]) => {
@@ -1495,7 +1276,7 @@ export class stakingManagerV2_json {
1495
1276
  Initialized: (callback: (event: { version: bigint }) => void) => {
1496
1277
  return this.publicClient.watchContractEvent({
1497
1278
  address: this.contractAddress,
1498
- abi: stakingManagerV2_jsonAbi,
1279
+ abi: stakingManagerV4_jsonAbi,
1499
1280
  eventName: 'Initialized',
1500
1281
 
1501
1282
  onLogs: (logs: any[]) => {
@@ -1514,7 +1295,7 @@ export class stakingManagerV2_json {
1514
1295
  OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => {
1515
1296
  return this.publicClient.watchContractEvent({
1516
1297
  address: this.contractAddress,
1517
- abi: stakingManagerV2_jsonAbi,
1298
+ abi: stakingManagerV4_jsonAbi,
1518
1299
  eventName: 'OwnershipTransferred',
1519
1300
  args: filter,
1520
1301
  onLogs: (logs: any[]) => {
@@ -1524,6 +1305,44 @@ export class stakingManagerV2_json {
1524
1305
  },
1525
1306
  }) as () => void;
1526
1307
  },
1308
+ /**
1309
+ * Watch RestakePrincipal events
1310
+ * @param callback Function to call when event is emitted
1311
+ * @param filter Optional filter for indexed parameters
1312
+ * @returns Unwatch function to stop listening
1313
+ */
1314
+ RestakePrincipal: (callback: (event: { user: `0x${string}`; amount: bigint; timestamp: bigint }) => void, filter?: { user: `0x${string}` }) => {
1315
+ return this.publicClient.watchContractEvent({
1316
+ address: this.contractAddress,
1317
+ abi: stakingManagerV4_jsonAbi,
1318
+ eventName: 'RestakePrincipal',
1319
+ args: filter,
1320
+ onLogs: (logs: any[]) => {
1321
+ logs.forEach((log: any) => {
1322
+ callback(log.args as any);
1323
+ });
1324
+ },
1325
+ }) as () => void;
1326
+ },
1327
+ /**
1328
+ * Watch RestakeRewards events
1329
+ * @param callback Function to call when event is emitted
1330
+ * @param filter Optional filter for indexed parameters
1331
+ * @returns Unwatch function to stop listening
1332
+ */
1333
+ RestakeRewards: (callback: (event: { user: `0x${string}`; amount: bigint; timestamp: bigint }) => void, filter?: { user: `0x${string}` }) => {
1334
+ return this.publicClient.watchContractEvent({
1335
+ address: this.contractAddress,
1336
+ abi: stakingManagerV4_jsonAbi,
1337
+ eventName: 'RestakeRewards',
1338
+ args: filter,
1339
+ onLogs: (logs: any[]) => {
1340
+ logs.forEach((log: any) => {
1341
+ callback(log.args as any);
1342
+ });
1343
+ },
1344
+ }) as () => void;
1345
+ },
1527
1346
  /**
1528
1347
  * Watch Withdraw events
1529
1348
  * @param callback Function to call when event is emitted
@@ -1533,7 +1352,7 @@ export class stakingManagerV2_json {
1533
1352
  Withdraw: (callback: (event: { user: `0x${string}`; amount: bigint }) => void, filter?: { user: `0x${string}` }) => {
1534
1353
  return this.publicClient.watchContractEvent({
1535
1354
  address: this.contractAddress,
1536
- abi: stakingManagerV2_jsonAbi,
1355
+ abi: stakingManagerV4_jsonAbi,
1537
1356
  eventName: 'Withdraw',
1538
1357
  args: filter,
1539
1358
  onLogs: (logs: any[]) => {