@gitmyabi/stakingmanager 1.0.5 → 1.0.7
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.
- package/README.md +3 -3
- package/contracts/index.d.ts +2 -2
- package/contracts/index.js +4 -4
- package/contracts/index.ts +2 -2
- package/contracts/{stakingManagerV4_json.d.ts → stakingManager_json.d.ts} +231 -127
- package/contracts/{stakingManagerV4_json.js → stakingManager_json.js} +197 -166
- package/contracts/{stakingManagerV4_json.ts → stakingManager_json.ts} +293 -172
- package/package.json +3 -3
|
@@ -2,11 +2,11 @@ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType }
|
|
|
2
2
|
import { getContract } from 'viem';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* stakingManager_json ABI
|
|
6
6
|
*
|
|
7
7
|
* This ABI is typed using viem's type system for full type safety.
|
|
8
8
|
*/
|
|
9
|
-
export const
|
|
9
|
+
export const stakingManager_jsonAbi = [
|
|
10
10
|
{
|
|
11
11
|
"inputs": [],
|
|
12
12
|
"stateMutability": "nonpayable",
|
|
@@ -96,69 +96,65 @@ export const stakingManagerV4_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"
|
|
105
99
|
}
|
|
106
100
|
],
|
|
107
|
-
"name": "
|
|
101
|
+
"name": "Withdraw",
|
|
108
102
|
"type": "event"
|
|
109
103
|
},
|
|
110
104
|
{
|
|
111
|
-
"anonymous": false,
|
|
112
105
|
"inputs": [
|
|
113
106
|
{
|
|
114
|
-
"indexed": true,
|
|
115
107
|
"internalType": "address",
|
|
116
|
-
"name": "
|
|
108
|
+
"name": "_rewardTokenAddress",
|
|
109
|
+
"type": "address"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"internalType": "address",
|
|
113
|
+
"name": "_presale",
|
|
117
114
|
"type": "address"
|
|
118
115
|
},
|
|
119
116
|
{
|
|
120
|
-
"indexed": false,
|
|
121
117
|
"internalType": "uint256",
|
|
122
|
-
"name": "
|
|
118
|
+
"name": "_rewardTokensPerBlock",
|
|
123
119
|
"type": "uint256"
|
|
124
120
|
},
|
|
125
121
|
{
|
|
126
|
-
"indexed": false,
|
|
127
122
|
"internalType": "uint256",
|
|
128
|
-
"name": "
|
|
123
|
+
"name": "_lockTime",
|
|
124
|
+
"type": "uint256"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"internalType": "uint256",
|
|
128
|
+
"name": "_endBlock",
|
|
129
129
|
"type": "uint256"
|
|
130
130
|
}
|
|
131
131
|
],
|
|
132
|
-
"name": "
|
|
133
|
-
"
|
|
132
|
+
"name": "__stakingManager_init",
|
|
133
|
+
"outputs": [],
|
|
134
|
+
"stateMutability": "nonpayable",
|
|
135
|
+
"type": "function"
|
|
134
136
|
},
|
|
135
137
|
{
|
|
136
|
-
"anonymous": false,
|
|
137
138
|
"inputs": [
|
|
138
139
|
{
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"type": "address"
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
"indexed": false,
|
|
146
|
-
"internalType": "uint256",
|
|
147
|
-
"name": "amount",
|
|
148
|
-
"type": "uint256"
|
|
140
|
+
"internalType": "address[]",
|
|
141
|
+
"name": "_usersToBlacklist",
|
|
142
|
+
"type": "address[]"
|
|
149
143
|
}
|
|
150
144
|
],
|
|
151
|
-
"name": "
|
|
152
|
-
"
|
|
145
|
+
"name": "blacklistUsers",
|
|
146
|
+
"outputs": [],
|
|
147
|
+
"stateMutability": "nonpayable",
|
|
148
|
+
"type": "function"
|
|
153
149
|
},
|
|
154
150
|
{
|
|
155
151
|
"inputs": [],
|
|
156
|
-
"name": "
|
|
152
|
+
"name": "claimStart",
|
|
157
153
|
"outputs": [
|
|
158
154
|
{
|
|
159
|
-
"internalType": "
|
|
155
|
+
"internalType": "uint256",
|
|
160
156
|
"name": "",
|
|
161
|
-
"type": "
|
|
157
|
+
"type": "uint256"
|
|
162
158
|
}
|
|
163
159
|
],
|
|
164
160
|
"stateMutability": "view",
|
|
@@ -167,27 +163,32 @@ export const stakingManagerV4_jsonAbi = [
|
|
|
167
163
|
{
|
|
168
164
|
"inputs": [
|
|
169
165
|
{
|
|
170
|
-
"internalType": "
|
|
171
|
-
"name": "
|
|
172
|
-
"type": "
|
|
166
|
+
"internalType": "uint256",
|
|
167
|
+
"name": "_amount",
|
|
168
|
+
"type": "uint256"
|
|
173
169
|
}
|
|
174
170
|
],
|
|
175
|
-
"name": "
|
|
171
|
+
"name": "deposit",
|
|
176
172
|
"outputs": [],
|
|
177
173
|
"stateMutability": "nonpayable",
|
|
178
174
|
"type": "function"
|
|
179
175
|
},
|
|
180
176
|
{
|
|
181
|
-
"inputs": [
|
|
182
|
-
|
|
183
|
-
|
|
177
|
+
"inputs": [
|
|
178
|
+
{
|
|
179
|
+
"internalType": "address",
|
|
180
|
+
"name": "_user",
|
|
181
|
+
"type": "address"
|
|
182
|
+
},
|
|
184
183
|
{
|
|
185
184
|
"internalType": "uint256",
|
|
186
|
-
"name": "",
|
|
185
|
+
"name": "_amount",
|
|
187
186
|
"type": "uint256"
|
|
188
187
|
}
|
|
189
188
|
],
|
|
190
|
-
"
|
|
189
|
+
"name": "depositByPresale",
|
|
190
|
+
"outputs": [],
|
|
191
|
+
"stateMutability": "nonpayable",
|
|
191
192
|
"type": "function"
|
|
192
193
|
},
|
|
193
194
|
{
|
|
@@ -274,19 +275,6 @@ export const stakingManagerV4_jsonAbi = [
|
|
|
274
275
|
"stateMutability": "view",
|
|
275
276
|
"type": "function"
|
|
276
277
|
},
|
|
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
|
-
},
|
|
290
278
|
{
|
|
291
279
|
"inputs": [],
|
|
292
280
|
"name": "owner",
|
|
@@ -372,13 +360,6 @@ export const stakingManagerV4_jsonAbi = [
|
|
|
372
360
|
"stateMutability": "nonpayable",
|
|
373
361
|
"type": "function"
|
|
374
362
|
},
|
|
375
|
-
{
|
|
376
|
-
"inputs": [],
|
|
377
|
-
"name": "restakeNew",
|
|
378
|
-
"outputs": [],
|
|
379
|
-
"stateMutability": "nonpayable",
|
|
380
|
-
"type": "function"
|
|
381
|
-
},
|
|
382
363
|
{
|
|
383
364
|
"inputs": [],
|
|
384
365
|
"name": "rewardTokensPerBlock",
|
|
@@ -392,6 +373,19 @@ export const stakingManagerV4_jsonAbi = [
|
|
|
392
373
|
"stateMutability": "view",
|
|
393
374
|
"type": "function"
|
|
394
375
|
},
|
|
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
|
+
},
|
|
395
389
|
{
|
|
396
390
|
"inputs": [
|
|
397
391
|
{
|
|
@@ -405,15 +399,41 @@ export const stakingManagerV4_jsonAbi = [
|
|
|
405
399
|
"stateMutability": "nonpayable",
|
|
406
400
|
"type": "function"
|
|
407
401
|
},
|
|
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
|
+
},
|
|
408
428
|
{
|
|
409
429
|
"inputs": [
|
|
410
430
|
{
|
|
411
431
|
"internalType": "address",
|
|
412
|
-
"name": "
|
|
432
|
+
"name": "_presale",
|
|
413
433
|
"type": "address"
|
|
414
434
|
}
|
|
415
435
|
],
|
|
416
|
-
"name": "
|
|
436
|
+
"name": "setPresale",
|
|
417
437
|
"outputs": [],
|
|
418
438
|
"stateMutability": "nonpayable",
|
|
419
439
|
"type": "function"
|
|
@@ -444,19 +464,6 @@ export const stakingManagerV4_jsonAbi = [
|
|
|
444
464
|
"stateMutability": "view",
|
|
445
465
|
"type": "function"
|
|
446
466
|
},
|
|
447
|
-
{
|
|
448
|
-
"inputs": [
|
|
449
|
-
{
|
|
450
|
-
"internalType": "uint256",
|
|
451
|
-
"name": "amount",
|
|
452
|
-
"type": "uint256"
|
|
453
|
-
}
|
|
454
|
-
],
|
|
455
|
-
"name": "tokenTransfer",
|
|
456
|
-
"outputs": [],
|
|
457
|
-
"stateMutability": "nonpayable",
|
|
458
|
-
"type": "function"
|
|
459
|
-
},
|
|
460
467
|
{
|
|
461
468
|
"inputs": [],
|
|
462
469
|
"name": "tokensStaked",
|
|
@@ -525,19 +532,19 @@ export const stakingManagerV4_jsonAbi = [
|
|
|
525
532
|
] as const satisfies Abi;
|
|
526
533
|
|
|
527
534
|
/**
|
|
528
|
-
* Type-safe ABI for
|
|
535
|
+
* Type-safe ABI for stakingManager_json
|
|
529
536
|
*/
|
|
530
|
-
export type
|
|
537
|
+
export type stakingManager_jsonAbi = typeof stakingManager_jsonAbi;
|
|
531
538
|
|
|
532
539
|
/**
|
|
533
|
-
* Contract instance type for
|
|
540
|
+
* Contract instance type for stakingManager_json
|
|
534
541
|
*/
|
|
535
542
|
// Use any for contract type to avoid complex viem type issues
|
|
536
543
|
// The runtime behavior is type-safe through viem's ABI typing
|
|
537
|
-
export type
|
|
544
|
+
export type stakingManager_jsonContract = any;
|
|
538
545
|
|
|
539
546
|
/**
|
|
540
|
-
*
|
|
547
|
+
* stakingManager_json Contract Class
|
|
541
548
|
*
|
|
542
549
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
543
550
|
*
|
|
@@ -545,12 +552,12 @@ export type stakingManagerV4_jsonContract = any;
|
|
|
545
552
|
* ```typescript
|
|
546
553
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
547
554
|
* import { mainnet } from 'viem/chains';
|
|
548
|
-
* import {
|
|
555
|
+
* import { stakingManager_json } from 'stakingManager_json';
|
|
549
556
|
*
|
|
550
557
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
551
558
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
552
559
|
*
|
|
553
|
-
* const contract = new
|
|
560
|
+
* const contract = new stakingManager_json('0x...', { publicClient, walletClient });
|
|
554
561
|
*
|
|
555
562
|
* // Read functions
|
|
556
563
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -568,8 +575,8 @@ export type stakingManagerV4_jsonContract = any;
|
|
|
568
575
|
* });
|
|
569
576
|
* ```
|
|
570
577
|
*/
|
|
571
|
-
export class
|
|
572
|
-
private contract:
|
|
578
|
+
export class stakingManager_json {
|
|
579
|
+
private contract: stakingManager_jsonContract;
|
|
573
580
|
private contractAddress: Address;
|
|
574
581
|
private publicClient: PublicClient;
|
|
575
582
|
|
|
@@ -584,7 +591,7 @@ export class stakingManagerV4_json {
|
|
|
584
591
|
this.publicClient = clients.publicClient;
|
|
585
592
|
this.contract = getContract({
|
|
586
593
|
address,
|
|
587
|
-
abi:
|
|
594
|
+
abi: stakingManager_jsonAbi,
|
|
588
595
|
client: {
|
|
589
596
|
public: clients.publicClient,
|
|
590
597
|
wallet: clients.walletClient,
|
|
@@ -602,18 +609,10 @@ export class stakingManagerV4_json {
|
|
|
602
609
|
/**
|
|
603
610
|
* Get the underlying viem contract instance
|
|
604
611
|
*/
|
|
605
|
-
getContract():
|
|
612
|
+
getContract(): stakingManager_jsonContract {
|
|
606
613
|
return this.contract;
|
|
607
614
|
}
|
|
608
615
|
|
|
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
|
-
|
|
617
616
|
/**
|
|
618
617
|
* claimStart
|
|
619
618
|
* view
|
|
@@ -662,14 +661,6 @@ export class stakingManagerV4_json {
|
|
|
662
661
|
return this.contract.read.lockedTime() as Promise<bigint>;
|
|
663
662
|
}
|
|
664
663
|
|
|
665
|
-
/**
|
|
666
|
-
* newStaking
|
|
667
|
-
* view
|
|
668
|
-
*/
|
|
669
|
-
async newStaking(): Promise<`0x${string}`> {
|
|
670
|
-
return this.contract.read.newStaking() as Promise<`0x${string}`>;
|
|
671
|
-
}
|
|
672
|
-
|
|
673
664
|
/**
|
|
674
665
|
* owner
|
|
675
666
|
* view
|
|
@@ -734,6 +725,29 @@ export class stakingManagerV4_json {
|
|
|
734
725
|
return this.contract.read.userLockedRewards([arg0] as const) as Promise<bigint>;
|
|
735
726
|
}
|
|
736
727
|
|
|
728
|
+
/**
|
|
729
|
+
* __stakingManager_init
|
|
730
|
+
* nonpayable
|
|
731
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
732
|
+
*/
|
|
733
|
+
async __stakingManager_init(_rewardTokenAddress: `0x${string}`, _presale: `0x${string}`, _rewardTokensPerBlock: bigint, _lockTime: bigint, _endBlock: bigint, options?: {
|
|
734
|
+
accessList?: import('viem').AccessList;
|
|
735
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
736
|
+
chain?: import('viem').Chain | null;
|
|
737
|
+
dataSuffix?: `0x${string}`;
|
|
738
|
+
gas?: bigint;
|
|
739
|
+
gasPrice?: bigint;
|
|
740
|
+
maxFeePerGas?: bigint;
|
|
741
|
+
maxPriorityFeePerGas?: bigint;
|
|
742
|
+
nonce?: number;
|
|
743
|
+
value?: bigint;
|
|
744
|
+
}): Promise<`0x${string}`> {
|
|
745
|
+
if (!this.contract.write) {
|
|
746
|
+
throw new Error('Wallet client is required for write operations');
|
|
747
|
+
}
|
|
748
|
+
return this.contract.write.__stakingManager_init([_rewardTokenAddress, _presale, _rewardTokensPerBlock, _lockTime, _endBlock] as const, options) as Promise<`0x${string}`>;
|
|
749
|
+
}
|
|
750
|
+
|
|
737
751
|
/**
|
|
738
752
|
* blacklistUsers
|
|
739
753
|
* nonpayable
|
|
@@ -757,6 +771,52 @@ export class stakingManagerV4_json {
|
|
|
757
771
|
return this.contract.write.blacklistUsers([_usersToBlacklist] as const, options) as Promise<`0x${string}`>;
|
|
758
772
|
}
|
|
759
773
|
|
|
774
|
+
/**
|
|
775
|
+
* deposit
|
|
776
|
+
* nonpayable
|
|
777
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
778
|
+
*/
|
|
779
|
+
async deposit(_amount: bigint, options?: {
|
|
780
|
+
accessList?: import('viem').AccessList;
|
|
781
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
782
|
+
chain?: import('viem').Chain | null;
|
|
783
|
+
dataSuffix?: `0x${string}`;
|
|
784
|
+
gas?: bigint;
|
|
785
|
+
gasPrice?: bigint;
|
|
786
|
+
maxFeePerGas?: bigint;
|
|
787
|
+
maxPriorityFeePerGas?: bigint;
|
|
788
|
+
nonce?: number;
|
|
789
|
+
value?: bigint;
|
|
790
|
+
}): Promise<`0x${string}`> {
|
|
791
|
+
if (!this.contract.write) {
|
|
792
|
+
throw new Error('Wallet client is required for write operations');
|
|
793
|
+
}
|
|
794
|
+
return this.contract.write.deposit([_amount] as const, options) as Promise<`0x${string}`>;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
/**
|
|
798
|
+
* depositByPresale
|
|
799
|
+
* nonpayable
|
|
800
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
801
|
+
*/
|
|
802
|
+
async depositByPresale(_user: `0x${string}`, _amount: bigint, options?: {
|
|
803
|
+
accessList?: import('viem').AccessList;
|
|
804
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
805
|
+
chain?: import('viem').Chain | null;
|
|
806
|
+
dataSuffix?: `0x${string}`;
|
|
807
|
+
gas?: bigint;
|
|
808
|
+
gasPrice?: bigint;
|
|
809
|
+
maxFeePerGas?: bigint;
|
|
810
|
+
maxPriorityFeePerGas?: bigint;
|
|
811
|
+
nonce?: number;
|
|
812
|
+
value?: bigint;
|
|
813
|
+
}): Promise<`0x${string}`> {
|
|
814
|
+
if (!this.contract.write) {
|
|
815
|
+
throw new Error('Wallet client is required for write operations');
|
|
816
|
+
}
|
|
817
|
+
return this.contract.write.depositByPresale([_user, _amount] as const, options) as Promise<`0x${string}`>;
|
|
818
|
+
}
|
|
819
|
+
|
|
760
820
|
/**
|
|
761
821
|
* harvestRewards
|
|
762
822
|
* nonpayable
|
|
@@ -827,11 +887,11 @@ export class stakingManagerV4_json {
|
|
|
827
887
|
}
|
|
828
888
|
|
|
829
889
|
/**
|
|
830
|
-
*
|
|
890
|
+
* setClaimStart
|
|
831
891
|
* nonpayable
|
|
832
892
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
833
893
|
*/
|
|
834
|
-
async
|
|
894
|
+
async setClaimStart(_claimStart: bigint, options?: {
|
|
835
895
|
accessList?: import('viem').AccessList;
|
|
836
896
|
authorizationList?: import('viem').AuthorizationList;
|
|
837
897
|
chain?: import('viem').Chain | null;
|
|
@@ -846,7 +906,7 @@ export class stakingManagerV4_json {
|
|
|
846
906
|
if (!this.contract.write) {
|
|
847
907
|
throw new Error('Wallet client is required for write operations');
|
|
848
908
|
}
|
|
849
|
-
return this.contract.write.
|
|
909
|
+
return this.contract.write.setClaimStart([_claimStart] as const, options) as Promise<`0x${string}`>;
|
|
850
910
|
}
|
|
851
911
|
|
|
852
912
|
/**
|
|
@@ -873,11 +933,11 @@ export class stakingManagerV4_json {
|
|
|
873
933
|
}
|
|
874
934
|
|
|
875
935
|
/**
|
|
876
|
-
*
|
|
936
|
+
* setHarvestLock
|
|
877
937
|
* nonpayable
|
|
878
938
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
879
939
|
*/
|
|
880
|
-
async
|
|
940
|
+
async setHarvestLock(_harvestlock: boolean, options?: {
|
|
881
941
|
accessList?: import('viem').AccessList;
|
|
882
942
|
authorizationList?: import('viem').AuthorizationList;
|
|
883
943
|
chain?: import('viem').Chain | null;
|
|
@@ -892,15 +952,15 @@ export class stakingManagerV4_json {
|
|
|
892
952
|
if (!this.contract.write) {
|
|
893
953
|
throw new Error('Wallet client is required for write operations');
|
|
894
954
|
}
|
|
895
|
-
return this.contract.write.
|
|
955
|
+
return this.contract.write.setHarvestLock([_harvestlock] as const, options) as Promise<`0x${string}`>;
|
|
896
956
|
}
|
|
897
957
|
|
|
898
958
|
/**
|
|
899
|
-
*
|
|
959
|
+
* setLockedTime
|
|
900
960
|
* nonpayable
|
|
901
961
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
902
962
|
*/
|
|
903
|
-
async
|
|
963
|
+
async setLockedTime(_time: bigint, options?: {
|
|
904
964
|
accessList?: import('viem').AccessList;
|
|
905
965
|
authorizationList?: import('viem').AuthorizationList;
|
|
906
966
|
chain?: import('viem').Chain | null;
|
|
@@ -915,15 +975,38 @@ export class stakingManagerV4_json {
|
|
|
915
975
|
if (!this.contract.write) {
|
|
916
976
|
throw new Error('Wallet client is required for write operations');
|
|
917
977
|
}
|
|
918
|
-
return this.contract.write.
|
|
978
|
+
return this.contract.write.setLockedTime([_time] as const, options) as Promise<`0x${string}`>;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* setPresale
|
|
983
|
+
* nonpayable
|
|
984
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
985
|
+
*/
|
|
986
|
+
async setPresale(_presale: `0x${string}`, options?: {
|
|
987
|
+
accessList?: import('viem').AccessList;
|
|
988
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
989
|
+
chain?: import('viem').Chain | null;
|
|
990
|
+
dataSuffix?: `0x${string}`;
|
|
991
|
+
gas?: bigint;
|
|
992
|
+
gasPrice?: bigint;
|
|
993
|
+
maxFeePerGas?: bigint;
|
|
994
|
+
maxPriorityFeePerGas?: bigint;
|
|
995
|
+
nonce?: number;
|
|
996
|
+
value?: bigint;
|
|
997
|
+
}): Promise<`0x${string}`> {
|
|
998
|
+
if (!this.contract.write) {
|
|
999
|
+
throw new Error('Wallet client is required for write operations');
|
|
1000
|
+
}
|
|
1001
|
+
return this.contract.write.setPresale([_presale] as const, options) as Promise<`0x${string}`>;
|
|
919
1002
|
}
|
|
920
1003
|
|
|
921
1004
|
/**
|
|
922
|
-
*
|
|
1005
|
+
* setStakeToken
|
|
923
1006
|
* nonpayable
|
|
924
1007
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
925
1008
|
*/
|
|
926
|
-
async
|
|
1009
|
+
async setStakeToken(_stakeToken: `0x${string}`, options?: {
|
|
927
1010
|
accessList?: import('viem').AccessList;
|
|
928
1011
|
authorizationList?: import('viem').AuthorizationList;
|
|
929
1012
|
chain?: import('viem').Chain | null;
|
|
@@ -938,7 +1021,7 @@ export class stakingManagerV4_json {
|
|
|
938
1021
|
if (!this.contract.write) {
|
|
939
1022
|
throw new Error('Wallet client is required for write operations');
|
|
940
1023
|
}
|
|
941
|
-
return this.contract.write.
|
|
1024
|
+
return this.contract.write.setStakeToken([_stakeToken] as const, options) as Promise<`0x${string}`>;
|
|
942
1025
|
}
|
|
943
1026
|
|
|
944
1027
|
/**
|
|
@@ -1003,6 +1086,25 @@ export class stakingManagerV4_json {
|
|
|
1003
1086
|
throw new Error('Public client is required for simulation');
|
|
1004
1087
|
}
|
|
1005
1088
|
return {
|
|
1089
|
+
/**
|
|
1090
|
+
* Simulate __stakingManager_init
|
|
1091
|
+
* Returns gas estimate and result without sending transaction
|
|
1092
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1093
|
+
*/
|
|
1094
|
+
async __stakingManager_init(_rewardTokenAddress: `0x${string}`, _presale: `0x${string}`, _rewardTokensPerBlock: bigint, _lockTime: bigint, _endBlock: bigint, options?: {
|
|
1095
|
+
accessList?: import('viem').AccessList;
|
|
1096
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1097
|
+
chain?: import('viem').Chain | null;
|
|
1098
|
+
dataSuffix?: `0x${string}`;
|
|
1099
|
+
gas?: bigint;
|
|
1100
|
+
gasPrice?: bigint;
|
|
1101
|
+
maxFeePerGas?: bigint;
|
|
1102
|
+
maxPriorityFeePerGas?: bigint;
|
|
1103
|
+
nonce?: number;
|
|
1104
|
+
value?: bigint;
|
|
1105
|
+
}): Promise<void> {
|
|
1106
|
+
return contract.simulate.__stakingManager_init([_rewardTokenAddress, _presale, _rewardTokensPerBlock, _lockTime, _endBlock] as const, options) as Promise<void>;
|
|
1107
|
+
},
|
|
1006
1108
|
/**
|
|
1007
1109
|
* Simulate blacklistUsers
|
|
1008
1110
|
* Returns gas estimate and result without sending transaction
|
|
@@ -1022,6 +1124,44 @@ export class stakingManagerV4_json {
|
|
|
1022
1124
|
}): Promise<void> {
|
|
1023
1125
|
return contract.simulate.blacklistUsers([_usersToBlacklist] as const, options) as Promise<void>;
|
|
1024
1126
|
},
|
|
1127
|
+
/**
|
|
1128
|
+
* Simulate deposit
|
|
1129
|
+
* Returns gas estimate and result without sending transaction
|
|
1130
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1131
|
+
*/
|
|
1132
|
+
async deposit(_amount: bigint, options?: {
|
|
1133
|
+
accessList?: import('viem').AccessList;
|
|
1134
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1135
|
+
chain?: import('viem').Chain | null;
|
|
1136
|
+
dataSuffix?: `0x${string}`;
|
|
1137
|
+
gas?: bigint;
|
|
1138
|
+
gasPrice?: bigint;
|
|
1139
|
+
maxFeePerGas?: bigint;
|
|
1140
|
+
maxPriorityFeePerGas?: bigint;
|
|
1141
|
+
nonce?: number;
|
|
1142
|
+
value?: bigint;
|
|
1143
|
+
}): Promise<void> {
|
|
1144
|
+
return contract.simulate.deposit([_amount] as const, options) as Promise<void>;
|
|
1145
|
+
},
|
|
1146
|
+
/**
|
|
1147
|
+
* Simulate depositByPresale
|
|
1148
|
+
* Returns gas estimate and result without sending transaction
|
|
1149
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1150
|
+
*/
|
|
1151
|
+
async depositByPresale(_user: `0x${string}`, _amount: bigint, options?: {
|
|
1152
|
+
accessList?: import('viem').AccessList;
|
|
1153
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1154
|
+
chain?: import('viem').Chain | null;
|
|
1155
|
+
dataSuffix?: `0x${string}`;
|
|
1156
|
+
gas?: bigint;
|
|
1157
|
+
gasPrice?: bigint;
|
|
1158
|
+
maxFeePerGas?: bigint;
|
|
1159
|
+
maxPriorityFeePerGas?: bigint;
|
|
1160
|
+
nonce?: number;
|
|
1161
|
+
value?: bigint;
|
|
1162
|
+
}): Promise<void> {
|
|
1163
|
+
return contract.simulate.depositByPresale([_user, _amount] as const, options) as Promise<void>;
|
|
1164
|
+
},
|
|
1025
1165
|
/**
|
|
1026
1166
|
* Simulate harvestRewards
|
|
1027
1167
|
* Returns gas estimate and result without sending transaction
|
|
@@ -1080,11 +1220,11 @@ export class stakingManagerV4_json {
|
|
|
1080
1220
|
return contract.simulate.renounceOwnership(options) as Promise<void>;
|
|
1081
1221
|
},
|
|
1082
1222
|
/**
|
|
1083
|
-
* Simulate
|
|
1223
|
+
* Simulate setClaimStart
|
|
1084
1224
|
* Returns gas estimate and result without sending transaction
|
|
1085
1225
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1086
1226
|
*/
|
|
1087
|
-
async
|
|
1227
|
+
async setClaimStart(_claimStart: bigint, options?: {
|
|
1088
1228
|
accessList?: import('viem').AccessList;
|
|
1089
1229
|
authorizationList?: import('viem').AuthorizationList;
|
|
1090
1230
|
chain?: import('viem').Chain | null;
|
|
@@ -1096,7 +1236,7 @@ export class stakingManagerV4_json {
|
|
|
1096
1236
|
nonce?: number;
|
|
1097
1237
|
value?: bigint;
|
|
1098
1238
|
}): Promise<void> {
|
|
1099
|
-
return contract.simulate.
|
|
1239
|
+
return contract.simulate.setClaimStart([_claimStart] as const, options) as Promise<void>;
|
|
1100
1240
|
},
|
|
1101
1241
|
/**
|
|
1102
1242
|
* Simulate setEndBlock
|
|
@@ -1118,11 +1258,11 @@ export class stakingManagerV4_json {
|
|
|
1118
1258
|
return contract.simulate.setEndBlock([_endBlock] as const, options) as Promise<void>;
|
|
1119
1259
|
},
|
|
1120
1260
|
/**
|
|
1121
|
-
* Simulate
|
|
1261
|
+
* Simulate setHarvestLock
|
|
1122
1262
|
* Returns gas estimate and result without sending transaction
|
|
1123
1263
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1124
1264
|
*/
|
|
1125
|
-
async
|
|
1265
|
+
async setHarvestLock(_harvestlock: boolean, options?: {
|
|
1126
1266
|
accessList?: import('viem').AccessList;
|
|
1127
1267
|
authorizationList?: import('viem').AuthorizationList;
|
|
1128
1268
|
chain?: import('viem').Chain | null;
|
|
@@ -1134,14 +1274,14 @@ export class stakingManagerV4_json {
|
|
|
1134
1274
|
nonce?: number;
|
|
1135
1275
|
value?: bigint;
|
|
1136
1276
|
}): Promise<void> {
|
|
1137
|
-
return contract.simulate.
|
|
1277
|
+
return contract.simulate.setHarvestLock([_harvestlock] as const, options) as Promise<void>;
|
|
1138
1278
|
},
|
|
1139
1279
|
/**
|
|
1140
|
-
* Simulate
|
|
1280
|
+
* Simulate setLockedTime
|
|
1141
1281
|
* Returns gas estimate and result without sending transaction
|
|
1142
1282
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1143
1283
|
*/
|
|
1144
|
-
async
|
|
1284
|
+
async setLockedTime(_time: bigint, options?: {
|
|
1145
1285
|
accessList?: import('viem').AccessList;
|
|
1146
1286
|
authorizationList?: import('viem').AuthorizationList;
|
|
1147
1287
|
chain?: import('viem').Chain | null;
|
|
@@ -1153,14 +1293,14 @@ export class stakingManagerV4_json {
|
|
|
1153
1293
|
nonce?: number;
|
|
1154
1294
|
value?: bigint;
|
|
1155
1295
|
}): Promise<void> {
|
|
1156
|
-
return contract.simulate.
|
|
1296
|
+
return contract.simulate.setLockedTime([_time] as const, options) as Promise<void>;
|
|
1157
1297
|
},
|
|
1158
1298
|
/**
|
|
1159
|
-
* Simulate
|
|
1299
|
+
* Simulate setPresale
|
|
1160
1300
|
* Returns gas estimate and result without sending transaction
|
|
1161
1301
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1162
1302
|
*/
|
|
1163
|
-
async
|
|
1303
|
+
async setPresale(_presale: `0x${string}`, options?: {
|
|
1164
1304
|
accessList?: import('viem').AccessList;
|
|
1165
1305
|
authorizationList?: import('viem').AuthorizationList;
|
|
1166
1306
|
chain?: import('viem').Chain | null;
|
|
@@ -1172,7 +1312,26 @@ export class stakingManagerV4_json {
|
|
|
1172
1312
|
nonce?: number;
|
|
1173
1313
|
value?: bigint;
|
|
1174
1314
|
}): Promise<void> {
|
|
1175
|
-
return contract.simulate.
|
|
1315
|
+
return contract.simulate.setPresale([_presale] as const, options) as Promise<void>;
|
|
1316
|
+
},
|
|
1317
|
+
/**
|
|
1318
|
+
* Simulate setStakeToken
|
|
1319
|
+
* Returns gas estimate and result without sending transaction
|
|
1320
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1321
|
+
*/
|
|
1322
|
+
async setStakeToken(_stakeToken: `0x${string}`, options?: {
|
|
1323
|
+
accessList?: import('viem').AccessList;
|
|
1324
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1325
|
+
chain?: import('viem').Chain | null;
|
|
1326
|
+
dataSuffix?: `0x${string}`;
|
|
1327
|
+
gas?: bigint;
|
|
1328
|
+
gasPrice?: bigint;
|
|
1329
|
+
maxFeePerGas?: bigint;
|
|
1330
|
+
maxPriorityFeePerGas?: bigint;
|
|
1331
|
+
nonce?: number;
|
|
1332
|
+
value?: bigint;
|
|
1333
|
+
}): Promise<void> {
|
|
1334
|
+
return contract.simulate.setStakeToken([_stakeToken] as const, options) as Promise<void>;
|
|
1176
1335
|
},
|
|
1177
1336
|
/**
|
|
1178
1337
|
* Simulate transferOwnership
|
|
@@ -1238,7 +1397,7 @@ export class stakingManagerV4_json {
|
|
|
1238
1397
|
Deposit: (callback: (event: { user: `0x${string}`; amount: bigint }) => void, filter?: { user: `0x${string}` }) => {
|
|
1239
1398
|
return this.publicClient.watchContractEvent({
|
|
1240
1399
|
address: this.contractAddress,
|
|
1241
|
-
abi:
|
|
1400
|
+
abi: stakingManager_jsonAbi,
|
|
1242
1401
|
eventName: 'Deposit',
|
|
1243
1402
|
args: filter,
|
|
1244
1403
|
onLogs: (logs: any[]) => {
|
|
@@ -1257,7 +1416,7 @@ export class stakingManagerV4_json {
|
|
|
1257
1416
|
HarvestRewards: (callback: (event: { user: `0x${string}`; amount: bigint }) => void, filter?: { user: `0x${string}` }) => {
|
|
1258
1417
|
return this.publicClient.watchContractEvent({
|
|
1259
1418
|
address: this.contractAddress,
|
|
1260
|
-
abi:
|
|
1419
|
+
abi: stakingManager_jsonAbi,
|
|
1261
1420
|
eventName: 'HarvestRewards',
|
|
1262
1421
|
args: filter,
|
|
1263
1422
|
onLogs: (logs: any[]) => {
|
|
@@ -1276,7 +1435,7 @@ export class stakingManagerV4_json {
|
|
|
1276
1435
|
Initialized: (callback: (event: { version: bigint }) => void) => {
|
|
1277
1436
|
return this.publicClient.watchContractEvent({
|
|
1278
1437
|
address: this.contractAddress,
|
|
1279
|
-
abi:
|
|
1438
|
+
abi: stakingManager_jsonAbi,
|
|
1280
1439
|
eventName: 'Initialized',
|
|
1281
1440
|
|
|
1282
1441
|
onLogs: (logs: any[]) => {
|
|
@@ -1295,7 +1454,7 @@ export class stakingManagerV4_json {
|
|
|
1295
1454
|
OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => {
|
|
1296
1455
|
return this.publicClient.watchContractEvent({
|
|
1297
1456
|
address: this.contractAddress,
|
|
1298
|
-
abi:
|
|
1457
|
+
abi: stakingManager_jsonAbi,
|
|
1299
1458
|
eventName: 'OwnershipTransferred',
|
|
1300
1459
|
args: filter,
|
|
1301
1460
|
onLogs: (logs: any[]) => {
|
|
@@ -1305,44 +1464,6 @@ export class stakingManagerV4_json {
|
|
|
1305
1464
|
},
|
|
1306
1465
|
}) as () => void;
|
|
1307
1466
|
},
|
|
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
|
-
},
|
|
1346
1467
|
/**
|
|
1347
1468
|
* Watch Withdraw events
|
|
1348
1469
|
* @param callback Function to call when event is emitted
|
|
@@ -1352,7 +1473,7 @@ export class stakingManagerV4_json {
|
|
|
1352
1473
|
Withdraw: (callback: (event: { user: `0x${string}`; amount: bigint }) => void, filter?: { user: `0x${string}` }) => {
|
|
1353
1474
|
return this.publicClient.watchContractEvent({
|
|
1354
1475
|
address: this.contractAddress,
|
|
1355
|
-
abi:
|
|
1476
|
+
abi: stakingManager_jsonAbi,
|
|
1356
1477
|
eventName: 'Withdraw',
|
|
1357
1478
|
args: filter,
|
|
1358
1479
|
onLogs: (logs: any[]) => {
|