@gitmyabi/stakingmanager 1.0.3 → 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.
- package/README.md +3 -3
- package/contracts/stakingManagerV4_json.d.ts +134 -379
- package/contracts/stakingManagerV4_json.js +171 -352
- package/contracts/stakingManagerV4_json.ts +172 -483
- package/package.json +3 -3
|
@@ -1,17 +1,6 @@
|
|
|
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
|
-
};
|
|
15
4
|
/**
|
|
16
5
|
* stakingManagerV4_json ABI
|
|
17
6
|
*
|
|
@@ -107,45 +96,69 @@ export const stakingManagerV4_jsonAbi = [
|
|
|
107
96
|
"internalType": "uint256",
|
|
108
97
|
"name": "amount",
|
|
109
98
|
"type": "uint256"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"indexed": false,
|
|
102
|
+
"internalType": "uint256",
|
|
103
|
+
"name": "timestamp",
|
|
104
|
+
"type": "uint256"
|
|
110
105
|
}
|
|
111
106
|
],
|
|
112
|
-
"name": "
|
|
107
|
+
"name": "RestakePrincipal",
|
|
113
108
|
"type": "event"
|
|
114
109
|
},
|
|
115
110
|
{
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"outputs": [
|
|
111
|
+
"anonymous": false,
|
|
112
|
+
"inputs": [
|
|
119
113
|
{
|
|
114
|
+
"indexed": true,
|
|
115
|
+
"internalType": "address",
|
|
116
|
+
"name": "user",
|
|
117
|
+
"type": "address"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"indexed": false,
|
|
120
121
|
"internalType": "uint256",
|
|
121
|
-
"name": "",
|
|
122
|
+
"name": "amount",
|
|
123
|
+
"type": "uint256"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"indexed": false,
|
|
127
|
+
"internalType": "uint256",
|
|
128
|
+
"name": "timestamp",
|
|
122
129
|
"type": "uint256"
|
|
123
130
|
}
|
|
124
131
|
],
|
|
125
|
-
"
|
|
126
|
-
"type": "
|
|
132
|
+
"name": "RestakeRewards",
|
|
133
|
+
"type": "event"
|
|
127
134
|
},
|
|
128
135
|
{
|
|
136
|
+
"anonymous": false,
|
|
129
137
|
"inputs": [
|
|
130
138
|
{
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
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"
|
|
134
149
|
}
|
|
135
150
|
],
|
|
136
|
-
"name": "
|
|
137
|
-
"
|
|
138
|
-
"stateMutability": "nonpayable",
|
|
139
|
-
"type": "function"
|
|
151
|
+
"name": "Withdraw",
|
|
152
|
+
"type": "event"
|
|
140
153
|
},
|
|
141
154
|
{
|
|
142
155
|
"inputs": [],
|
|
143
|
-
"name": "
|
|
156
|
+
"name": "DEV_WALLET",
|
|
144
157
|
"outputs": [
|
|
145
158
|
{
|
|
146
|
-
"internalType": "
|
|
159
|
+
"internalType": "address",
|
|
147
160
|
"name": "",
|
|
148
|
-
"type": "
|
|
161
|
+
"type": "address"
|
|
149
162
|
}
|
|
150
163
|
],
|
|
151
164
|
"stateMutability": "view",
|
|
@@ -154,32 +167,27 @@ export const stakingManagerV4_jsonAbi = [
|
|
|
154
167
|
{
|
|
155
168
|
"inputs": [
|
|
156
169
|
{
|
|
157
|
-
"internalType": "
|
|
158
|
-
"name": "
|
|
159
|
-
"type": "
|
|
170
|
+
"internalType": "address[]",
|
|
171
|
+
"name": "_usersToBlacklist",
|
|
172
|
+
"type": "address[]"
|
|
160
173
|
}
|
|
161
174
|
],
|
|
162
|
-
"name": "
|
|
175
|
+
"name": "blacklistUsers",
|
|
163
176
|
"outputs": [],
|
|
164
177
|
"stateMutability": "nonpayable",
|
|
165
178
|
"type": "function"
|
|
166
179
|
},
|
|
167
180
|
{
|
|
168
|
-
"inputs": [
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
"name": "_user",
|
|
172
|
-
"type": "address"
|
|
173
|
-
},
|
|
181
|
+
"inputs": [],
|
|
182
|
+
"name": "claimStart",
|
|
183
|
+
"outputs": [
|
|
174
184
|
{
|
|
175
185
|
"internalType": "uint256",
|
|
176
|
-
"name": "
|
|
186
|
+
"name": "",
|
|
177
187
|
"type": "uint256"
|
|
178
188
|
}
|
|
179
189
|
],
|
|
180
|
-
"
|
|
181
|
-
"outputs": [],
|
|
182
|
-
"stateMutability": "nonpayable",
|
|
190
|
+
"stateMutability": "view",
|
|
183
191
|
"type": "function"
|
|
184
192
|
},
|
|
185
193
|
{
|
|
@@ -266,6 +274,19 @@ export const stakingManagerV4_jsonAbi = [
|
|
|
266
274
|
"stateMutability": "view",
|
|
267
275
|
"type": "function"
|
|
268
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
|
+
},
|
|
269
290
|
{
|
|
270
291
|
"inputs": [],
|
|
271
292
|
"name": "owner",
|
|
@@ -283,43 +304,36 @@ export const stakingManagerV4_jsonAbi = [
|
|
|
283
304
|
"inputs": [
|
|
284
305
|
{
|
|
285
306
|
"internalType": "address",
|
|
286
|
-
"name": "
|
|
307
|
+
"name": "",
|
|
287
308
|
"type": "address"
|
|
288
309
|
}
|
|
289
310
|
],
|
|
290
311
|
"name": "poolStakers",
|
|
291
312
|
"outputs": [
|
|
292
313
|
{
|
|
293
|
-
"
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
"name": "rewardDebt",
|
|
317
|
-
"type": "uint256"
|
|
318
|
-
}
|
|
319
|
-
],
|
|
320
|
-
"internalType": "struct stakingManagerV4.PoolStaker",
|
|
321
|
-
"name": "",
|
|
322
|
-
"type": "tuple"
|
|
314
|
+
"internalType": "uint256",
|
|
315
|
+
"name": "amount",
|
|
316
|
+
"type": "uint256"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"internalType": "uint256",
|
|
320
|
+
"name": "stakedTime",
|
|
321
|
+
"type": "uint256"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"internalType": "uint256",
|
|
325
|
+
"name": "lastUpdatedBlock",
|
|
326
|
+
"type": "uint256"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"internalType": "uint256",
|
|
330
|
+
"name": "Harvestedrewards",
|
|
331
|
+
"type": "uint256"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"internalType": "uint256",
|
|
335
|
+
"name": "rewardDebt",
|
|
336
|
+
"type": "uint256"
|
|
323
337
|
}
|
|
324
338
|
],
|
|
325
339
|
"stateMutability": "view",
|
|
@@ -358,6 +372,13 @@ export const stakingManagerV4_jsonAbi = [
|
|
|
358
372
|
"stateMutability": "nonpayable",
|
|
359
373
|
"type": "function"
|
|
360
374
|
},
|
|
375
|
+
{
|
|
376
|
+
"inputs": [],
|
|
377
|
+
"name": "restakeNew",
|
|
378
|
+
"outputs": [],
|
|
379
|
+
"stateMutability": "nonpayable",
|
|
380
|
+
"type": "function"
|
|
381
|
+
},
|
|
361
382
|
{
|
|
362
383
|
"inputs": [],
|
|
363
384
|
"name": "rewardTokensPerBlock",
|
|
@@ -371,19 +392,6 @@ export const stakingManagerV4_jsonAbi = [
|
|
|
371
392
|
"stateMutability": "view",
|
|
372
393
|
"type": "function"
|
|
373
394
|
},
|
|
374
|
-
{
|
|
375
|
-
"inputs": [
|
|
376
|
-
{
|
|
377
|
-
"internalType": "uint256",
|
|
378
|
-
"name": "_claimStart",
|
|
379
|
-
"type": "uint256"
|
|
380
|
-
}
|
|
381
|
-
],
|
|
382
|
-
"name": "setClaimStart",
|
|
383
|
-
"outputs": [],
|
|
384
|
-
"stateMutability": "nonpayable",
|
|
385
|
-
"type": "function"
|
|
386
|
-
},
|
|
387
395
|
{
|
|
388
396
|
"inputs": [
|
|
389
397
|
{
|
|
@@ -397,41 +405,15 @@ export const stakingManagerV4_jsonAbi = [
|
|
|
397
405
|
"stateMutability": "nonpayable",
|
|
398
406
|
"type": "function"
|
|
399
407
|
},
|
|
400
|
-
{
|
|
401
|
-
"inputs": [
|
|
402
|
-
{
|
|
403
|
-
"internalType": "bool",
|
|
404
|
-
"name": "_harvestlock",
|
|
405
|
-
"type": "bool"
|
|
406
|
-
}
|
|
407
|
-
],
|
|
408
|
-
"name": "setHarvestLock",
|
|
409
|
-
"outputs": [],
|
|
410
|
-
"stateMutability": "nonpayable",
|
|
411
|
-
"type": "function"
|
|
412
|
-
},
|
|
413
|
-
{
|
|
414
|
-
"inputs": [
|
|
415
|
-
{
|
|
416
|
-
"internalType": "uint256",
|
|
417
|
-
"name": "_time",
|
|
418
|
-
"type": "uint256"
|
|
419
|
-
}
|
|
420
|
-
],
|
|
421
|
-
"name": "setLockedTime",
|
|
422
|
-
"outputs": [],
|
|
423
|
-
"stateMutability": "nonpayable",
|
|
424
|
-
"type": "function"
|
|
425
|
-
},
|
|
426
408
|
{
|
|
427
409
|
"inputs": [
|
|
428
410
|
{
|
|
429
411
|
"internalType": "address",
|
|
430
|
-
"name": "
|
|
412
|
+
"name": "_stakingContract",
|
|
431
413
|
"type": "address"
|
|
432
414
|
}
|
|
433
415
|
],
|
|
434
|
-
"name": "
|
|
416
|
+
"name": "setNewStaking",
|
|
435
417
|
"outputs": [],
|
|
436
418
|
"stateMutability": "nonpayable",
|
|
437
419
|
"type": "function"
|
|
@@ -449,32 +431,6 @@ export const stakingManagerV4_jsonAbi = [
|
|
|
449
431
|
"stateMutability": "nonpayable",
|
|
450
432
|
"type": "function"
|
|
451
433
|
},
|
|
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
|
-
},
|
|
478
434
|
{
|
|
479
435
|
"inputs": [],
|
|
480
436
|
"name": "stakeToken",
|
|
@@ -489,21 +445,21 @@ export const stakingManagerV4_jsonAbi = [
|
|
|
489
445
|
"type": "function"
|
|
490
446
|
},
|
|
491
447
|
{
|
|
492
|
-
"inputs": [
|
|
493
|
-
"name": "tokensStaked",
|
|
494
|
-
"outputs": [
|
|
448
|
+
"inputs": [
|
|
495
449
|
{
|
|
496
450
|
"internalType": "uint256",
|
|
497
|
-
"name": "",
|
|
451
|
+
"name": "amount",
|
|
498
452
|
"type": "uint256"
|
|
499
453
|
}
|
|
500
454
|
],
|
|
501
|
-
"
|
|
455
|
+
"name": "tokenTransfer",
|
|
456
|
+
"outputs": [],
|
|
457
|
+
"stateMutability": "nonpayable",
|
|
502
458
|
"type": "function"
|
|
503
459
|
},
|
|
504
460
|
{
|
|
505
461
|
"inputs": [],
|
|
506
|
-
"name": "
|
|
462
|
+
"name": "tokensStaked",
|
|
507
463
|
"outputs": [
|
|
508
464
|
{
|
|
509
465
|
"internalType": "uint256",
|
|
@@ -516,7 +472,7 @@ export const stakingManagerV4_jsonAbi = [
|
|
|
516
472
|
},
|
|
517
473
|
{
|
|
518
474
|
"inputs": [],
|
|
519
|
-
"name": "
|
|
475
|
+
"name": "tokensStakedByPresale",
|
|
520
476
|
"outputs": [
|
|
521
477
|
{
|
|
522
478
|
"internalType": "uint256",
|
|
@@ -559,69 +515,6 @@ export const stakingManagerV4_jsonAbi = [
|
|
|
559
515
|
"stateMutability": "view",
|
|
560
516
|
"type": "function"
|
|
561
517
|
},
|
|
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
|
-
},
|
|
625
518
|
{
|
|
626
519
|
"inputs": [],
|
|
627
520
|
"name": "withdraw",
|
|
@@ -714,11 +607,11 @@ export class stakingManagerV4_json {
|
|
|
714
607
|
}
|
|
715
608
|
|
|
716
609
|
/**
|
|
717
|
-
*
|
|
610
|
+
* DEV_WALLET
|
|
718
611
|
* view
|
|
719
612
|
*/
|
|
720
|
-
async
|
|
721
|
-
return this.contract.read.
|
|
613
|
+
async DEV_WALLET(): Promise<`0x${string}`> {
|
|
614
|
+
return this.contract.read.DEV_WALLET() as Promise<`0x${string}`>;
|
|
722
615
|
}
|
|
723
616
|
|
|
724
617
|
/**
|
|
@@ -769,6 +662,14 @@ export class stakingManagerV4_json {
|
|
|
769
662
|
return this.contract.read.lockedTime() as Promise<bigint>;
|
|
770
663
|
}
|
|
771
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
|
+
|
|
772
673
|
/**
|
|
773
674
|
* owner
|
|
774
675
|
* view
|
|
@@ -781,8 +682,8 @@ export class stakingManagerV4_json {
|
|
|
781
682
|
* poolStakers
|
|
782
683
|
* view
|
|
783
684
|
*/
|
|
784
|
-
async poolStakers(
|
|
785
|
-
return this.contract.read.poolStakers([
|
|
685
|
+
async poolStakers(arg0: `0x${string}`): Promise<[bigint, bigint, bigint, bigint, bigint]> {
|
|
686
|
+
return this.contract.read.poolStakers([arg0] as const) as Promise<[bigint, bigint, bigint, bigint, bigint]>;
|
|
786
687
|
}
|
|
787
688
|
|
|
788
689
|
/**
|
|
@@ -825,14 +726,6 @@ export class stakingManagerV4_json {
|
|
|
825
726
|
return this.contract.read.tokensStakedByPresale() as Promise<bigint>;
|
|
826
727
|
}
|
|
827
728
|
|
|
828
|
-
/**
|
|
829
|
-
* tokensStakedPrev
|
|
830
|
-
* view
|
|
831
|
-
*/
|
|
832
|
-
async tokensStakedPrev(): Promise<bigint> {
|
|
833
|
-
return this.contract.read.tokensStakedPrev() as Promise<bigint>;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
729
|
/**
|
|
837
730
|
* userLockedRewards
|
|
838
731
|
* view
|
|
@@ -841,38 +734,6 @@ export class stakingManagerV4_json {
|
|
|
841
734
|
return this.contract.read.userLockedRewards([arg0] as const) as Promise<bigint>;
|
|
842
735
|
}
|
|
843
736
|
|
|
844
|
-
/**
|
|
845
|
-
* userVestingDetails
|
|
846
|
-
* view
|
|
847
|
-
*/
|
|
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>;
|
|
874
|
-
}
|
|
875
|
-
|
|
876
737
|
/**
|
|
877
738
|
* blacklistUsers
|
|
878
739
|
* nonpayable
|
|
@@ -896,52 +757,6 @@ export class stakingManagerV4_json {
|
|
|
896
757
|
return this.contract.write.blacklistUsers([_usersToBlacklist] as const, options) as Promise<`0x${string}`>;
|
|
897
758
|
}
|
|
898
759
|
|
|
899
|
-
/**
|
|
900
|
-
* deposit
|
|
901
|
-
* nonpayable
|
|
902
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
903
|
-
*/
|
|
904
|
-
async deposit(_amount: bigint, options?: {
|
|
905
|
-
accessList?: import('viem').AccessList;
|
|
906
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
907
|
-
chain?: import('viem').Chain | null;
|
|
908
|
-
dataSuffix?: `0x${string}`;
|
|
909
|
-
gas?: bigint;
|
|
910
|
-
gasPrice?: bigint;
|
|
911
|
-
maxFeePerGas?: bigint;
|
|
912
|
-
maxPriorityFeePerGas?: bigint;
|
|
913
|
-
nonce?: number;
|
|
914
|
-
value?: bigint;
|
|
915
|
-
}): Promise<`0x${string}`> {
|
|
916
|
-
if (!this.contract.write) {
|
|
917
|
-
throw new Error('Wallet client is required for write operations');
|
|
918
|
-
}
|
|
919
|
-
return this.contract.write.deposit([_amount] as const, options) as Promise<`0x${string}`>;
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
/**
|
|
923
|
-
* depositByPresale
|
|
924
|
-
* nonpayable
|
|
925
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
926
|
-
*/
|
|
927
|
-
async depositByPresale(_user: `0x${string}`, _amount: bigint, options?: {
|
|
928
|
-
accessList?: import('viem').AccessList;
|
|
929
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
930
|
-
chain?: import('viem').Chain | null;
|
|
931
|
-
dataSuffix?: `0x${string}`;
|
|
932
|
-
gas?: bigint;
|
|
933
|
-
gasPrice?: bigint;
|
|
934
|
-
maxFeePerGas?: bigint;
|
|
935
|
-
maxPriorityFeePerGas?: bigint;
|
|
936
|
-
nonce?: number;
|
|
937
|
-
value?: bigint;
|
|
938
|
-
}): Promise<`0x${string}`> {
|
|
939
|
-
if (!this.contract.write) {
|
|
940
|
-
throw new Error('Wallet client is required for write operations');
|
|
941
|
-
}
|
|
942
|
-
return this.contract.write.depositByPresale([_user, _amount] as const, options) as Promise<`0x${string}`>;
|
|
943
|
-
}
|
|
944
|
-
|
|
945
760
|
/**
|
|
946
761
|
* harvestRewards
|
|
947
762
|
* nonpayable
|
|
@@ -1012,11 +827,11 @@ export class stakingManagerV4_json {
|
|
|
1012
827
|
}
|
|
1013
828
|
|
|
1014
829
|
/**
|
|
1015
|
-
*
|
|
830
|
+
* restakeNew
|
|
1016
831
|
* nonpayable
|
|
1017
832
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1018
833
|
*/
|
|
1019
|
-
async
|
|
834
|
+
async restakeNew(options?: {
|
|
1020
835
|
accessList?: import('viem').AccessList;
|
|
1021
836
|
authorizationList?: import('viem').AuthorizationList;
|
|
1022
837
|
chain?: import('viem').Chain | null;
|
|
@@ -1031,7 +846,7 @@ export class stakingManagerV4_json {
|
|
|
1031
846
|
if (!this.contract.write) {
|
|
1032
847
|
throw new Error('Wallet client is required for write operations');
|
|
1033
848
|
}
|
|
1034
|
-
return this.contract.write.
|
|
849
|
+
return this.contract.write.restakeNew(options) as Promise<`0x${string}`>;
|
|
1035
850
|
}
|
|
1036
851
|
|
|
1037
852
|
/**
|
|
@@ -1058,57 +873,11 @@ export class stakingManagerV4_json {
|
|
|
1058
873
|
}
|
|
1059
874
|
|
|
1060
875
|
/**
|
|
1061
|
-
*
|
|
1062
|
-
* nonpayable
|
|
1063
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1064
|
-
*/
|
|
1065
|
-
async setHarvestLock(_harvestlock: boolean, options?: {
|
|
1066
|
-
accessList?: import('viem').AccessList;
|
|
1067
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1068
|
-
chain?: import('viem').Chain | null;
|
|
1069
|
-
dataSuffix?: `0x${string}`;
|
|
1070
|
-
gas?: bigint;
|
|
1071
|
-
gasPrice?: bigint;
|
|
1072
|
-
maxFeePerGas?: bigint;
|
|
1073
|
-
maxPriorityFeePerGas?: bigint;
|
|
1074
|
-
nonce?: number;
|
|
1075
|
-
value?: bigint;
|
|
1076
|
-
}): Promise<`0x${string}`> {
|
|
1077
|
-
if (!this.contract.write) {
|
|
1078
|
-
throw new Error('Wallet client is required for write operations');
|
|
1079
|
-
}
|
|
1080
|
-
return this.contract.write.setHarvestLock([_harvestlock] as const, options) as Promise<`0x${string}`>;
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
/**
|
|
1084
|
-
* setLockedTime
|
|
1085
|
-
* nonpayable
|
|
1086
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1087
|
-
*/
|
|
1088
|
-
async setLockedTime(_time: bigint, options?: {
|
|
1089
|
-
accessList?: import('viem').AccessList;
|
|
1090
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1091
|
-
chain?: import('viem').Chain | null;
|
|
1092
|
-
dataSuffix?: `0x${string}`;
|
|
1093
|
-
gas?: bigint;
|
|
1094
|
-
gasPrice?: bigint;
|
|
1095
|
-
maxFeePerGas?: bigint;
|
|
1096
|
-
maxPriorityFeePerGas?: bigint;
|
|
1097
|
-
nonce?: number;
|
|
1098
|
-
value?: bigint;
|
|
1099
|
-
}): Promise<`0x${string}`> {
|
|
1100
|
-
if (!this.contract.write) {
|
|
1101
|
-
throw new Error('Wallet client is required for write operations');
|
|
1102
|
-
}
|
|
1103
|
-
return this.contract.write.setLockedTime([_time] as const, options) as Promise<`0x${string}`>;
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
/**
|
|
1107
|
-
* setPresale
|
|
876
|
+
* setNewStaking
|
|
1108
877
|
* nonpayable
|
|
1109
878
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1110
879
|
*/
|
|
1111
|
-
async
|
|
880
|
+
async setNewStaking(_stakingContract: `0x${string}`, options?: {
|
|
1112
881
|
accessList?: import('viem').AccessList;
|
|
1113
882
|
authorizationList?: import('viem').AuthorizationList;
|
|
1114
883
|
chain?: import('viem').Chain | null;
|
|
@@ -1123,7 +892,7 @@ export class stakingManagerV4_json {
|
|
|
1123
892
|
if (!this.contract.write) {
|
|
1124
893
|
throw new Error('Wallet client is required for write operations');
|
|
1125
894
|
}
|
|
1126
|
-
return this.contract.write.
|
|
895
|
+
return this.contract.write.setNewStaking([_stakingContract] as const, options) as Promise<`0x${string}`>;
|
|
1127
896
|
}
|
|
1128
897
|
|
|
1129
898
|
/**
|
|
@@ -1150,11 +919,11 @@ export class stakingManagerV4_json {
|
|
|
1150
919
|
}
|
|
1151
920
|
|
|
1152
921
|
/**
|
|
1153
|
-
*
|
|
922
|
+
* tokenTransfer
|
|
1154
923
|
* nonpayable
|
|
1155
924
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1156
925
|
*/
|
|
1157
|
-
async
|
|
926
|
+
async tokenTransfer(amount: bigint, options?: {
|
|
1158
927
|
accessList?: import('viem').AccessList;
|
|
1159
928
|
authorizationList?: import('viem').AuthorizationList;
|
|
1160
929
|
chain?: import('viem').Chain | null;
|
|
@@ -1169,30 +938,7 @@ export class stakingManagerV4_json {
|
|
|
1169
938
|
if (!this.contract.write) {
|
|
1170
939
|
throw new Error('Wallet client is required for write operations');
|
|
1171
940
|
}
|
|
1172
|
-
return this.contract.write.
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
|
-
/**
|
|
1176
|
-
* setVestingDetails
|
|
1177
|
-
* nonpayable
|
|
1178
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1179
|
-
*/
|
|
1180
|
-
async setVestingDetails(_vestingEndTime: bigint, options?: {
|
|
1181
|
-
accessList?: import('viem').AccessList;
|
|
1182
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1183
|
-
chain?: import('viem').Chain | null;
|
|
1184
|
-
dataSuffix?: `0x${string}`;
|
|
1185
|
-
gas?: bigint;
|
|
1186
|
-
gasPrice?: bigint;
|
|
1187
|
-
maxFeePerGas?: bigint;
|
|
1188
|
-
maxPriorityFeePerGas?: bigint;
|
|
1189
|
-
nonce?: number;
|
|
1190
|
-
value?: bigint;
|
|
1191
|
-
}): Promise<`0x${string}`> {
|
|
1192
|
-
if (!this.contract.write) {
|
|
1193
|
-
throw new Error('Wallet client is required for write operations');
|
|
1194
|
-
}
|
|
1195
|
-
return this.contract.write.setVestingDetails([_vestingEndTime] as const, options) as Promise<`0x${string}`>;
|
|
941
|
+
return this.contract.write.tokenTransfer([amount] as const, options) as Promise<`0x${string}`>;
|
|
1196
942
|
}
|
|
1197
943
|
|
|
1198
944
|
/**
|
|
@@ -1276,44 +1022,6 @@ export class stakingManagerV4_json {
|
|
|
1276
1022
|
}): Promise<void> {
|
|
1277
1023
|
return contract.simulate.blacklistUsers([_usersToBlacklist] as const, options) as Promise<void>;
|
|
1278
1024
|
},
|
|
1279
|
-
/**
|
|
1280
|
-
* Simulate deposit
|
|
1281
|
-
* Returns gas estimate and result without sending transaction
|
|
1282
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1283
|
-
*/
|
|
1284
|
-
async deposit(_amount: bigint, options?: {
|
|
1285
|
-
accessList?: import('viem').AccessList;
|
|
1286
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1287
|
-
chain?: import('viem').Chain | null;
|
|
1288
|
-
dataSuffix?: `0x${string}`;
|
|
1289
|
-
gas?: bigint;
|
|
1290
|
-
gasPrice?: bigint;
|
|
1291
|
-
maxFeePerGas?: bigint;
|
|
1292
|
-
maxPriorityFeePerGas?: bigint;
|
|
1293
|
-
nonce?: number;
|
|
1294
|
-
value?: bigint;
|
|
1295
|
-
}): Promise<void> {
|
|
1296
|
-
return contract.simulate.deposit([_amount] as const, options) as Promise<void>;
|
|
1297
|
-
},
|
|
1298
|
-
/**
|
|
1299
|
-
* Simulate depositByPresale
|
|
1300
|
-
* Returns gas estimate and result without sending transaction
|
|
1301
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1302
|
-
*/
|
|
1303
|
-
async depositByPresale(_user: `0x${string}`, _amount: bigint, options?: {
|
|
1304
|
-
accessList?: import('viem').AccessList;
|
|
1305
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1306
|
-
chain?: import('viem').Chain | null;
|
|
1307
|
-
dataSuffix?: `0x${string}`;
|
|
1308
|
-
gas?: bigint;
|
|
1309
|
-
gasPrice?: bigint;
|
|
1310
|
-
maxFeePerGas?: bigint;
|
|
1311
|
-
maxPriorityFeePerGas?: bigint;
|
|
1312
|
-
nonce?: number;
|
|
1313
|
-
value?: bigint;
|
|
1314
|
-
}): Promise<void> {
|
|
1315
|
-
return contract.simulate.depositByPresale([_user, _amount] as const, options) as Promise<void>;
|
|
1316
|
-
},
|
|
1317
1025
|
/**
|
|
1318
1026
|
* Simulate harvestRewards
|
|
1319
1027
|
* Returns gas estimate and result without sending transaction
|
|
@@ -1372,11 +1080,11 @@ export class stakingManagerV4_json {
|
|
|
1372
1080
|
return contract.simulate.renounceOwnership(options) as Promise<void>;
|
|
1373
1081
|
},
|
|
1374
1082
|
/**
|
|
1375
|
-
* Simulate
|
|
1083
|
+
* Simulate restakeNew
|
|
1376
1084
|
* Returns gas estimate and result without sending transaction
|
|
1377
1085
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1378
1086
|
*/
|
|
1379
|
-
async
|
|
1087
|
+
async restakeNew(options?: {
|
|
1380
1088
|
accessList?: import('viem').AccessList;
|
|
1381
1089
|
authorizationList?: import('viem').AuthorizationList;
|
|
1382
1090
|
chain?: import('viem').Chain | null;
|
|
@@ -1388,7 +1096,7 @@ export class stakingManagerV4_json {
|
|
|
1388
1096
|
nonce?: number;
|
|
1389
1097
|
value?: bigint;
|
|
1390
1098
|
}): Promise<void> {
|
|
1391
|
-
return contract.simulate.
|
|
1099
|
+
return contract.simulate.restakeNew(options) as Promise<void>;
|
|
1392
1100
|
},
|
|
1393
1101
|
/**
|
|
1394
1102
|
* Simulate setEndBlock
|
|
@@ -1410,49 +1118,11 @@ export class stakingManagerV4_json {
|
|
|
1410
1118
|
return contract.simulate.setEndBlock([_endBlock] as const, options) as Promise<void>;
|
|
1411
1119
|
},
|
|
1412
1120
|
/**
|
|
1413
|
-
* Simulate
|
|
1414
|
-
* Returns gas estimate and result without sending transaction
|
|
1415
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1416
|
-
*/
|
|
1417
|
-
async setHarvestLock(_harvestlock: boolean, options?: {
|
|
1418
|
-
accessList?: import('viem').AccessList;
|
|
1419
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1420
|
-
chain?: import('viem').Chain | null;
|
|
1421
|
-
dataSuffix?: `0x${string}`;
|
|
1422
|
-
gas?: bigint;
|
|
1423
|
-
gasPrice?: bigint;
|
|
1424
|
-
maxFeePerGas?: bigint;
|
|
1425
|
-
maxPriorityFeePerGas?: bigint;
|
|
1426
|
-
nonce?: number;
|
|
1427
|
-
value?: bigint;
|
|
1428
|
-
}): Promise<void> {
|
|
1429
|
-
return contract.simulate.setHarvestLock([_harvestlock] as const, options) as Promise<void>;
|
|
1430
|
-
},
|
|
1431
|
-
/**
|
|
1432
|
-
* Simulate setLockedTime
|
|
1433
|
-
* Returns gas estimate and result without sending transaction
|
|
1434
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1435
|
-
*/
|
|
1436
|
-
async setLockedTime(_time: bigint, options?: {
|
|
1437
|
-
accessList?: import('viem').AccessList;
|
|
1438
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1439
|
-
chain?: import('viem').Chain | null;
|
|
1440
|
-
dataSuffix?: `0x${string}`;
|
|
1441
|
-
gas?: bigint;
|
|
1442
|
-
gasPrice?: bigint;
|
|
1443
|
-
maxFeePerGas?: bigint;
|
|
1444
|
-
maxPriorityFeePerGas?: bigint;
|
|
1445
|
-
nonce?: number;
|
|
1446
|
-
value?: bigint;
|
|
1447
|
-
}): Promise<void> {
|
|
1448
|
-
return contract.simulate.setLockedTime([_time] as const, options) as Promise<void>;
|
|
1449
|
-
},
|
|
1450
|
-
/**
|
|
1451
|
-
* Simulate setPresale
|
|
1121
|
+
* Simulate setNewStaking
|
|
1452
1122
|
* Returns gas estimate and result without sending transaction
|
|
1453
1123
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1454
1124
|
*/
|
|
1455
|
-
async
|
|
1125
|
+
async setNewStaking(_stakingContract: `0x${string}`, options?: {
|
|
1456
1126
|
accessList?: import('viem').AccessList;
|
|
1457
1127
|
authorizationList?: import('viem').AuthorizationList;
|
|
1458
1128
|
chain?: import('viem').Chain | null;
|
|
@@ -1464,7 +1134,7 @@ export class stakingManagerV4_json {
|
|
|
1464
1134
|
nonce?: number;
|
|
1465
1135
|
value?: bigint;
|
|
1466
1136
|
}): Promise<void> {
|
|
1467
|
-
return contract.simulate.
|
|
1137
|
+
return contract.simulate.setNewStaking([_stakingContract] as const, options) as Promise<void>;
|
|
1468
1138
|
},
|
|
1469
1139
|
/**
|
|
1470
1140
|
* Simulate setStakeToken
|
|
@@ -1486,30 +1156,11 @@ export class stakingManagerV4_json {
|
|
|
1486
1156
|
return contract.simulate.setStakeToken([_stakeToken] as const, options) as Promise<void>;
|
|
1487
1157
|
},
|
|
1488
1158
|
/**
|
|
1489
|
-
* Simulate
|
|
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
|
|
1159
|
+
* Simulate tokenTransfer
|
|
1509
1160
|
* Returns gas estimate and result without sending transaction
|
|
1510
1161
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1511
1162
|
*/
|
|
1512
|
-
async
|
|
1163
|
+
async tokenTransfer(amount: bigint, options?: {
|
|
1513
1164
|
accessList?: import('viem').AccessList;
|
|
1514
1165
|
authorizationList?: import('viem').AuthorizationList;
|
|
1515
1166
|
chain?: import('viem').Chain | null;
|
|
@@ -1521,7 +1172,7 @@ export class stakingManagerV4_json {
|
|
|
1521
1172
|
nonce?: number;
|
|
1522
1173
|
value?: bigint;
|
|
1523
1174
|
}): Promise<void> {
|
|
1524
|
-
return contract.simulate.
|
|
1175
|
+
return contract.simulate.tokenTransfer([amount] as const, options) as Promise<void>;
|
|
1525
1176
|
},
|
|
1526
1177
|
/**
|
|
1527
1178
|
* Simulate transferOwnership
|
|
@@ -1654,6 +1305,44 @@ export class stakingManagerV4_json {
|
|
|
1654
1305
|
},
|
|
1655
1306
|
}) as () => void;
|
|
1656
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
|
+
},
|
|
1657
1346
|
/**
|
|
1658
1347
|
* Watch Withdraw events
|
|
1659
1348
|
* @param callback Function to call when event is emitted
|