@gitmyabi/stakingmanager 1.0.1 → 1.0.3
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/{stakingManagerV2_json.d.ts → stakingManagerV4_json.d.ts} +193 -100
- package/contracts/{stakingManagerV2_json.js → stakingManagerV4_json.js} +212 -99
- package/contracts/{stakingManagerV2_json.ts → stakingManagerV4_json.ts} +255 -125
- package/package.json +3 -3
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
|
|
2
2
|
import { getContract } from 'viem';
|
|
3
3
|
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* stakingManagerV4.PoolStaker struct type
|
|
7
|
+
*/
|
|
8
|
+
export type stakingManagerV4_PoolStaker = {
|
|
9
|
+
amount: bigint;
|
|
10
|
+
stakedTime: bigint;
|
|
11
|
+
lastUpdatedBlock: bigint;
|
|
12
|
+
Harvestedrewards: bigint;
|
|
13
|
+
rewardDebt: bigint;
|
|
14
|
+
};
|
|
4
15
|
/**
|
|
5
|
-
*
|
|
16
|
+
* stakingManagerV4_json ABI
|
|
6
17
|
*
|
|
7
18
|
* This ABI is typed using viem's type system for full type safety.
|
|
8
19
|
*/
|
|
9
|
-
export const
|
|
20
|
+
export const stakingManagerV4_jsonAbi = [
|
|
10
21
|
{
|
|
11
22
|
"inputs": [],
|
|
12
23
|
"stateMutability": "nonpayable",
|
|
@@ -102,36 +113,16 @@ export const stakingManagerV2_jsonAbi = [
|
|
|
102
113
|
"type": "event"
|
|
103
114
|
},
|
|
104
115
|
{
|
|
105
|
-
"inputs": [
|
|
106
|
-
|
|
107
|
-
|
|
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
|
-
},
|
|
116
|
+
"inputs": [],
|
|
117
|
+
"name": "accShareOld",
|
|
118
|
+
"outputs": [
|
|
126
119
|
{
|
|
127
120
|
"internalType": "uint256",
|
|
128
|
-
"name": "
|
|
121
|
+
"name": "",
|
|
129
122
|
"type": "uint256"
|
|
130
123
|
}
|
|
131
124
|
],
|
|
132
|
-
"
|
|
133
|
-
"outputs": [],
|
|
134
|
-
"stateMutability": "nonpayable",
|
|
125
|
+
"stateMutability": "view",
|
|
135
126
|
"type": "function"
|
|
136
127
|
},
|
|
137
128
|
{
|
|
@@ -292,36 +283,43 @@ export const stakingManagerV2_jsonAbi = [
|
|
|
292
283
|
"inputs": [
|
|
293
284
|
{
|
|
294
285
|
"internalType": "address",
|
|
295
|
-
"name": "",
|
|
286
|
+
"name": "_user",
|
|
296
287
|
"type": "address"
|
|
297
288
|
}
|
|
298
289
|
],
|
|
299
290
|
"name": "poolStakers",
|
|
300
291
|
"outputs": [
|
|
301
292
|
{
|
|
302
|
-
"
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
293
|
+
"components": [
|
|
294
|
+
{
|
|
295
|
+
"internalType": "uint256",
|
|
296
|
+
"name": "amount",
|
|
297
|
+
"type": "uint256"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"internalType": "uint256",
|
|
301
|
+
"name": "stakedTime",
|
|
302
|
+
"type": "uint256"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"internalType": "uint256",
|
|
306
|
+
"name": "lastUpdatedBlock",
|
|
307
|
+
"type": "uint256"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"internalType": "uint256",
|
|
311
|
+
"name": "Harvestedrewards",
|
|
312
|
+
"type": "uint256"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"internalType": "uint256",
|
|
316
|
+
"name": "rewardDebt",
|
|
317
|
+
"type": "uint256"
|
|
318
|
+
}
|
|
319
|
+
],
|
|
320
|
+
"internalType": "struct stakingManagerV4.PoolStaker",
|
|
321
|
+
"name": "",
|
|
322
|
+
"type": "tuple"
|
|
325
323
|
}
|
|
326
324
|
],
|
|
327
325
|
"stateMutability": "view",
|
|
@@ -451,6 +449,32 @@ export const stakingManagerV2_jsonAbi = [
|
|
|
451
449
|
"stateMutability": "nonpayable",
|
|
452
450
|
"type": "function"
|
|
453
451
|
},
|
|
452
|
+
{
|
|
453
|
+
"inputs": [
|
|
454
|
+
{
|
|
455
|
+
"internalType": "bool",
|
|
456
|
+
"name": "_vestLock",
|
|
457
|
+
"type": "bool"
|
|
458
|
+
}
|
|
459
|
+
],
|
|
460
|
+
"name": "setVestLock",
|
|
461
|
+
"outputs": [],
|
|
462
|
+
"stateMutability": "nonpayable",
|
|
463
|
+
"type": "function"
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"inputs": [
|
|
467
|
+
{
|
|
468
|
+
"internalType": "uint256",
|
|
469
|
+
"name": "_vestingEndTime",
|
|
470
|
+
"type": "uint256"
|
|
471
|
+
}
|
|
472
|
+
],
|
|
473
|
+
"name": "setVestingDetails",
|
|
474
|
+
"outputs": [],
|
|
475
|
+
"stateMutability": "nonpayable",
|
|
476
|
+
"type": "function"
|
|
477
|
+
},
|
|
454
478
|
{
|
|
455
479
|
"inputs": [],
|
|
456
480
|
"name": "stakeToken",
|
|
@@ -465,26 +489,21 @@ export const stakingManagerV2_jsonAbi = [
|
|
|
465
489
|
"type": "function"
|
|
466
490
|
},
|
|
467
491
|
{
|
|
468
|
-
"inputs": [
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
"name": "_token",
|
|
472
|
-
"type": "address"
|
|
473
|
-
},
|
|
492
|
+
"inputs": [],
|
|
493
|
+
"name": "tokensStaked",
|
|
494
|
+
"outputs": [
|
|
474
495
|
{
|
|
475
496
|
"internalType": "uint256",
|
|
476
|
-
"name": "
|
|
497
|
+
"name": "",
|
|
477
498
|
"type": "uint256"
|
|
478
499
|
}
|
|
479
500
|
],
|
|
480
|
-
"
|
|
481
|
-
"outputs": [],
|
|
482
|
-
"stateMutability": "nonpayable",
|
|
501
|
+
"stateMutability": "view",
|
|
483
502
|
"type": "function"
|
|
484
503
|
},
|
|
485
504
|
{
|
|
486
505
|
"inputs": [],
|
|
487
|
-
"name": "
|
|
506
|
+
"name": "tokensStakedByPresale",
|
|
488
507
|
"outputs": [
|
|
489
508
|
{
|
|
490
509
|
"internalType": "uint256",
|
|
@@ -497,7 +516,7 @@ export const stakingManagerV2_jsonAbi = [
|
|
|
497
516
|
},
|
|
498
517
|
{
|
|
499
518
|
"inputs": [],
|
|
500
|
-
"name": "
|
|
519
|
+
"name": "tokensStakedPrev",
|
|
501
520
|
"outputs": [
|
|
502
521
|
{
|
|
503
522
|
"internalType": "uint256",
|
|
@@ -540,6 +559,69 @@ export const stakingManagerV2_jsonAbi = [
|
|
|
540
559
|
"stateMutability": "view",
|
|
541
560
|
"type": "function"
|
|
542
561
|
},
|
|
562
|
+
{
|
|
563
|
+
"inputs": [
|
|
564
|
+
{
|
|
565
|
+
"internalType": "address",
|
|
566
|
+
"name": "",
|
|
567
|
+
"type": "address"
|
|
568
|
+
}
|
|
569
|
+
],
|
|
570
|
+
"name": "userVestingDetails",
|
|
571
|
+
"outputs": [
|
|
572
|
+
{
|
|
573
|
+
"internalType": "uint256",
|
|
574
|
+
"name": "totalVestedAmount",
|
|
575
|
+
"type": "uint256"
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
"internalType": "uint256",
|
|
579
|
+
"name": "totalAmountGivenOut",
|
|
580
|
+
"type": "uint256"
|
|
581
|
+
}
|
|
582
|
+
],
|
|
583
|
+
"stateMutability": "view",
|
|
584
|
+
"type": "function"
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"inputs": [],
|
|
588
|
+
"name": "vestLock",
|
|
589
|
+
"outputs": [
|
|
590
|
+
{
|
|
591
|
+
"internalType": "bool",
|
|
592
|
+
"name": "",
|
|
593
|
+
"type": "bool"
|
|
594
|
+
}
|
|
595
|
+
],
|
|
596
|
+
"stateMutability": "view",
|
|
597
|
+
"type": "function"
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"inputs": [],
|
|
601
|
+
"name": "vestingEndTime",
|
|
602
|
+
"outputs": [
|
|
603
|
+
{
|
|
604
|
+
"internalType": "uint256",
|
|
605
|
+
"name": "",
|
|
606
|
+
"type": "uint256"
|
|
607
|
+
}
|
|
608
|
+
],
|
|
609
|
+
"stateMutability": "view",
|
|
610
|
+
"type": "function"
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"inputs": [],
|
|
614
|
+
"name": "vestingStartBlock",
|
|
615
|
+
"outputs": [
|
|
616
|
+
{
|
|
617
|
+
"internalType": "uint256",
|
|
618
|
+
"name": "",
|
|
619
|
+
"type": "uint256"
|
|
620
|
+
}
|
|
621
|
+
],
|
|
622
|
+
"stateMutability": "view",
|
|
623
|
+
"type": "function"
|
|
624
|
+
},
|
|
543
625
|
{
|
|
544
626
|
"inputs": [],
|
|
545
627
|
"name": "withdraw",
|
|
@@ -550,19 +632,19 @@ export const stakingManagerV2_jsonAbi = [
|
|
|
550
632
|
] as const satisfies Abi;
|
|
551
633
|
|
|
552
634
|
/**
|
|
553
|
-
* Type-safe ABI for
|
|
635
|
+
* Type-safe ABI for stakingManagerV4_json
|
|
554
636
|
*/
|
|
555
|
-
export type
|
|
637
|
+
export type stakingManagerV4_jsonAbi = typeof stakingManagerV4_jsonAbi;
|
|
556
638
|
|
|
557
639
|
/**
|
|
558
|
-
* Contract instance type for
|
|
640
|
+
* Contract instance type for stakingManagerV4_json
|
|
559
641
|
*/
|
|
560
642
|
// Use any for contract type to avoid complex viem type issues
|
|
561
643
|
// The runtime behavior is type-safe through viem's ABI typing
|
|
562
|
-
export type
|
|
644
|
+
export type stakingManagerV4_jsonContract = any;
|
|
563
645
|
|
|
564
646
|
/**
|
|
565
|
-
*
|
|
647
|
+
* stakingManagerV4_json Contract Class
|
|
566
648
|
*
|
|
567
649
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
568
650
|
*
|
|
@@ -570,12 +652,12 @@ export type stakingManagerV2_jsonContract = any;
|
|
|
570
652
|
* ```typescript
|
|
571
653
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
572
654
|
* import { mainnet } from 'viem/chains';
|
|
573
|
-
* import {
|
|
655
|
+
* import { stakingManagerV4_json } from 'stakingManagerV4_json';
|
|
574
656
|
*
|
|
575
657
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
576
658
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
577
659
|
*
|
|
578
|
-
* const contract = new
|
|
660
|
+
* const contract = new stakingManagerV4_json('0x...', { publicClient, walletClient });
|
|
579
661
|
*
|
|
580
662
|
* // Read functions
|
|
581
663
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -593,8 +675,8 @@ export type stakingManagerV2_jsonContract = any;
|
|
|
593
675
|
* });
|
|
594
676
|
* ```
|
|
595
677
|
*/
|
|
596
|
-
export class
|
|
597
|
-
private contract:
|
|
678
|
+
export class stakingManagerV4_json {
|
|
679
|
+
private contract: stakingManagerV4_jsonContract;
|
|
598
680
|
private contractAddress: Address;
|
|
599
681
|
private publicClient: PublicClient;
|
|
600
682
|
|
|
@@ -609,7 +691,7 @@ export class stakingManagerV2_json {
|
|
|
609
691
|
this.publicClient = clients.publicClient;
|
|
610
692
|
this.contract = getContract({
|
|
611
693
|
address,
|
|
612
|
-
abi:
|
|
694
|
+
abi: stakingManagerV4_jsonAbi,
|
|
613
695
|
client: {
|
|
614
696
|
public: clients.publicClient,
|
|
615
697
|
wallet: clients.walletClient,
|
|
@@ -627,10 +709,18 @@ export class stakingManagerV2_json {
|
|
|
627
709
|
/**
|
|
628
710
|
* Get the underlying viem contract instance
|
|
629
711
|
*/
|
|
630
|
-
getContract():
|
|
712
|
+
getContract(): stakingManagerV4_jsonContract {
|
|
631
713
|
return this.contract;
|
|
632
714
|
}
|
|
633
715
|
|
|
716
|
+
/**
|
|
717
|
+
* accShareOld
|
|
718
|
+
* view
|
|
719
|
+
*/
|
|
720
|
+
async accShareOld(): Promise<bigint> {
|
|
721
|
+
return this.contract.read.accShareOld() as Promise<bigint>;
|
|
722
|
+
}
|
|
723
|
+
|
|
634
724
|
/**
|
|
635
725
|
* claimStart
|
|
636
726
|
* view
|
|
@@ -691,8 +781,8 @@ export class stakingManagerV2_json {
|
|
|
691
781
|
* poolStakers
|
|
692
782
|
* view
|
|
693
783
|
*/
|
|
694
|
-
async poolStakers(
|
|
695
|
-
return this.contract.read.poolStakers([
|
|
784
|
+
async poolStakers(_user: `0x${string}`): Promise<stakingManagerV4_PoolStaker> {
|
|
785
|
+
return this.contract.read.poolStakers([_user] as const) as Promise<stakingManagerV4_PoolStaker>;
|
|
696
786
|
}
|
|
697
787
|
|
|
698
788
|
/**
|
|
@@ -735,6 +825,14 @@ export class stakingManagerV2_json {
|
|
|
735
825
|
return this.contract.read.tokensStakedByPresale() as Promise<bigint>;
|
|
736
826
|
}
|
|
737
827
|
|
|
828
|
+
/**
|
|
829
|
+
* tokensStakedPrev
|
|
830
|
+
* view
|
|
831
|
+
*/
|
|
832
|
+
async tokensStakedPrev(): Promise<bigint> {
|
|
833
|
+
return this.contract.read.tokensStakedPrev() as Promise<bigint>;
|
|
834
|
+
}
|
|
835
|
+
|
|
738
836
|
/**
|
|
739
837
|
* userLockedRewards
|
|
740
838
|
* view
|
|
@@ -744,26 +842,35 @@ export class stakingManagerV2_json {
|
|
|
744
842
|
}
|
|
745
843
|
|
|
746
844
|
/**
|
|
747
|
-
*
|
|
748
|
-
*
|
|
749
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
845
|
+
* userVestingDetails
|
|
846
|
+
* view
|
|
750
847
|
*/
|
|
751
|
-
async
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
848
|
+
async userVestingDetails(arg0: `0x${string}`): Promise<[bigint, bigint]> {
|
|
849
|
+
return this.contract.read.userVestingDetails([arg0] as const) as Promise<[bigint, bigint]>;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* vestLock
|
|
854
|
+
* view
|
|
855
|
+
*/
|
|
856
|
+
async vestLock(): Promise<boolean> {
|
|
857
|
+
return this.contract.read.vestLock() as Promise<boolean>;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* vestingEndTime
|
|
862
|
+
* view
|
|
863
|
+
*/
|
|
864
|
+
async vestingEndTime(): Promise<bigint> {
|
|
865
|
+
return this.contract.read.vestingEndTime() as Promise<bigint>;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* vestingStartBlock
|
|
870
|
+
* view
|
|
871
|
+
*/
|
|
872
|
+
async vestingStartBlock(): Promise<bigint> {
|
|
873
|
+
return this.contract.read.vestingStartBlock() as Promise<bigint>;
|
|
767
874
|
}
|
|
768
875
|
|
|
769
876
|
/**
|
|
@@ -1043,11 +1150,34 @@ export class stakingManagerV2_json {
|
|
|
1043
1150
|
}
|
|
1044
1151
|
|
|
1045
1152
|
/**
|
|
1046
|
-
*
|
|
1153
|
+
* setVestLock
|
|
1154
|
+
* nonpayable
|
|
1155
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1156
|
+
*/
|
|
1157
|
+
async setVestLock(_vestLock: boolean, options?: {
|
|
1158
|
+
accessList?: import('viem').AccessList;
|
|
1159
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1160
|
+
chain?: import('viem').Chain | null;
|
|
1161
|
+
dataSuffix?: `0x${string}`;
|
|
1162
|
+
gas?: bigint;
|
|
1163
|
+
gasPrice?: bigint;
|
|
1164
|
+
maxFeePerGas?: bigint;
|
|
1165
|
+
maxPriorityFeePerGas?: bigint;
|
|
1166
|
+
nonce?: number;
|
|
1167
|
+
value?: bigint;
|
|
1168
|
+
}): Promise<`0x${string}`> {
|
|
1169
|
+
if (!this.contract.write) {
|
|
1170
|
+
throw new Error('Wallet client is required for write operations');
|
|
1171
|
+
}
|
|
1172
|
+
return this.contract.write.setVestLock([_vestLock] as const, options) as Promise<`0x${string}`>;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
/**
|
|
1176
|
+
* setVestingDetails
|
|
1047
1177
|
* nonpayable
|
|
1048
1178
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1049
1179
|
*/
|
|
1050
|
-
async
|
|
1180
|
+
async setVestingDetails(_vestingEndTime: bigint, options?: {
|
|
1051
1181
|
accessList?: import('viem').AccessList;
|
|
1052
1182
|
authorizationList?: import('viem').AuthorizationList;
|
|
1053
1183
|
chain?: import('viem').Chain | null;
|
|
@@ -1062,7 +1192,7 @@ export class stakingManagerV2_json {
|
|
|
1062
1192
|
if (!this.contract.write) {
|
|
1063
1193
|
throw new Error('Wallet client is required for write operations');
|
|
1064
1194
|
}
|
|
1065
|
-
return this.contract.write.
|
|
1195
|
+
return this.contract.write.setVestingDetails([_vestingEndTime] as const, options) as Promise<`0x${string}`>;
|
|
1066
1196
|
}
|
|
1067
1197
|
|
|
1068
1198
|
/**
|
|
@@ -1127,25 +1257,6 @@ export class stakingManagerV2_json {
|
|
|
1127
1257
|
throw new Error('Public client is required for simulation');
|
|
1128
1258
|
}
|
|
1129
1259
|
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
1260
|
/**
|
|
1150
1261
|
* Simulate blacklistUsers
|
|
1151
1262
|
* Returns gas estimate and result without sending transaction
|
|
@@ -1375,11 +1486,30 @@ export class stakingManagerV2_json {
|
|
|
1375
1486
|
return contract.simulate.setStakeToken([_stakeToken] as const, options) as Promise<void>;
|
|
1376
1487
|
},
|
|
1377
1488
|
/**
|
|
1378
|
-
* Simulate
|
|
1489
|
+
* Simulate setVestLock
|
|
1490
|
+
* Returns gas estimate and result without sending transaction
|
|
1491
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1492
|
+
*/
|
|
1493
|
+
async setVestLock(_vestLock: boolean, options?: {
|
|
1494
|
+
accessList?: import('viem').AccessList;
|
|
1495
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1496
|
+
chain?: import('viem').Chain | null;
|
|
1497
|
+
dataSuffix?: `0x${string}`;
|
|
1498
|
+
gas?: bigint;
|
|
1499
|
+
gasPrice?: bigint;
|
|
1500
|
+
maxFeePerGas?: bigint;
|
|
1501
|
+
maxPriorityFeePerGas?: bigint;
|
|
1502
|
+
nonce?: number;
|
|
1503
|
+
value?: bigint;
|
|
1504
|
+
}): Promise<void> {
|
|
1505
|
+
return contract.simulate.setVestLock([_vestLock] as const, options) as Promise<void>;
|
|
1506
|
+
},
|
|
1507
|
+
/**
|
|
1508
|
+
* Simulate setVestingDetails
|
|
1379
1509
|
* Returns gas estimate and result without sending transaction
|
|
1380
1510
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1381
1511
|
*/
|
|
1382
|
-
async
|
|
1512
|
+
async setVestingDetails(_vestingEndTime: bigint, options?: {
|
|
1383
1513
|
accessList?: import('viem').AccessList;
|
|
1384
1514
|
authorizationList?: import('viem').AuthorizationList;
|
|
1385
1515
|
chain?: import('viem').Chain | null;
|
|
@@ -1391,7 +1521,7 @@ export class stakingManagerV2_json {
|
|
|
1391
1521
|
nonce?: number;
|
|
1392
1522
|
value?: bigint;
|
|
1393
1523
|
}): Promise<void> {
|
|
1394
|
-
return contract.simulate.
|
|
1524
|
+
return contract.simulate.setVestingDetails([_vestingEndTime] as const, options) as Promise<void>;
|
|
1395
1525
|
},
|
|
1396
1526
|
/**
|
|
1397
1527
|
* Simulate transferOwnership
|
|
@@ -1457,7 +1587,7 @@ export class stakingManagerV2_json {
|
|
|
1457
1587
|
Deposit: (callback: (event: { user: `0x${string}`; amount: bigint }) => void, filter?: { user: `0x${string}` }) => {
|
|
1458
1588
|
return this.publicClient.watchContractEvent({
|
|
1459
1589
|
address: this.contractAddress,
|
|
1460
|
-
abi:
|
|
1590
|
+
abi: stakingManagerV4_jsonAbi,
|
|
1461
1591
|
eventName: 'Deposit',
|
|
1462
1592
|
args: filter,
|
|
1463
1593
|
onLogs: (logs: any[]) => {
|
|
@@ -1476,7 +1606,7 @@ export class stakingManagerV2_json {
|
|
|
1476
1606
|
HarvestRewards: (callback: (event: { user: `0x${string}`; amount: bigint }) => void, filter?: { user: `0x${string}` }) => {
|
|
1477
1607
|
return this.publicClient.watchContractEvent({
|
|
1478
1608
|
address: this.contractAddress,
|
|
1479
|
-
abi:
|
|
1609
|
+
abi: stakingManagerV4_jsonAbi,
|
|
1480
1610
|
eventName: 'HarvestRewards',
|
|
1481
1611
|
args: filter,
|
|
1482
1612
|
onLogs: (logs: any[]) => {
|
|
@@ -1495,7 +1625,7 @@ export class stakingManagerV2_json {
|
|
|
1495
1625
|
Initialized: (callback: (event: { version: bigint }) => void) => {
|
|
1496
1626
|
return this.publicClient.watchContractEvent({
|
|
1497
1627
|
address: this.contractAddress,
|
|
1498
|
-
abi:
|
|
1628
|
+
abi: stakingManagerV4_jsonAbi,
|
|
1499
1629
|
eventName: 'Initialized',
|
|
1500
1630
|
|
|
1501
1631
|
onLogs: (logs: any[]) => {
|
|
@@ -1514,7 +1644,7 @@ export class stakingManagerV2_json {
|
|
|
1514
1644
|
OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => {
|
|
1515
1645
|
return this.publicClient.watchContractEvent({
|
|
1516
1646
|
address: this.contractAddress,
|
|
1517
|
-
abi:
|
|
1647
|
+
abi: stakingManagerV4_jsonAbi,
|
|
1518
1648
|
eventName: 'OwnershipTransferred',
|
|
1519
1649
|
args: filter,
|
|
1520
1650
|
onLogs: (logs: any[]) => {
|
|
@@ -1533,7 +1663,7 @@ export class stakingManagerV2_json {
|
|
|
1533
1663
|
Withdraw: (callback: (event: { user: `0x${string}`; amount: bigint }) => void, filter?: { user: `0x${string}` }) => {
|
|
1534
1664
|
return this.publicClient.watchContractEvent({
|
|
1535
1665
|
address: this.contractAddress,
|
|
1536
|
-
abi:
|
|
1666
|
+
abi: stakingManagerV4_jsonAbi,
|
|
1537
1667
|
eventName: 'Withdraw',
|
|
1538
1668
|
args: filter,
|
|
1539
1669
|
onLogs: (logs: any[]) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitmyabi/stakingmanager",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Auto-generated TypeScript type bindings for stakingManager (build etherscan-stakingmanager-
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "Auto-generated TypeScript type bindings for stakingManager (build etherscan-stakingmanager-b8bc5c11-1787551874450, commit e558ab8, branch etherscan)",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"url": "https://github.com/etherscan/stakingmanager"
|
|
40
40
|
},
|
|
41
41
|
"branch": "etherscan",
|
|
42
|
-
"shortHash": "
|
|
42
|
+
"shortHash": "e558ab8"
|
|
43
43
|
}
|