@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
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.stakingManager_json = exports.stakingManager_jsonAbi = void 0;
|
|
4
4
|
const viem_1 = require("viem");
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* stakingManager_json ABI
|
|
7
7
|
*
|
|
8
8
|
* This ABI is typed using viem's type system for full type safety.
|
|
9
9
|
*/
|
|
10
|
-
exports.
|
|
10
|
+
exports.stakingManager_jsonAbi = [
|
|
11
11
|
{
|
|
12
12
|
"inputs": [],
|
|
13
13
|
"stateMutability": "nonpayable",
|
|
@@ -97,69 +97,65 @@ exports.stakingManagerV4_jsonAbi = [
|
|
|
97
97
|
"internalType": "uint256",
|
|
98
98
|
"name": "amount",
|
|
99
99
|
"type": "uint256"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"indexed": false,
|
|
103
|
-
"internalType": "uint256",
|
|
104
|
-
"name": "timestamp",
|
|
105
|
-
"type": "uint256"
|
|
106
100
|
}
|
|
107
101
|
],
|
|
108
|
-
"name": "
|
|
102
|
+
"name": "Withdraw",
|
|
109
103
|
"type": "event"
|
|
110
104
|
},
|
|
111
105
|
{
|
|
112
|
-
"anonymous": false,
|
|
113
106
|
"inputs": [
|
|
114
107
|
{
|
|
115
|
-
"indexed": true,
|
|
116
108
|
"internalType": "address",
|
|
117
|
-
"name": "
|
|
109
|
+
"name": "_rewardTokenAddress",
|
|
110
|
+
"type": "address"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"internalType": "address",
|
|
114
|
+
"name": "_presale",
|
|
118
115
|
"type": "address"
|
|
119
116
|
},
|
|
120
117
|
{
|
|
121
|
-
"indexed": false,
|
|
122
118
|
"internalType": "uint256",
|
|
123
|
-
"name": "
|
|
119
|
+
"name": "_rewardTokensPerBlock",
|
|
120
|
+
"type": "uint256"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"internalType": "uint256",
|
|
124
|
+
"name": "_lockTime",
|
|
124
125
|
"type": "uint256"
|
|
125
126
|
},
|
|
126
127
|
{
|
|
127
|
-
"indexed": false,
|
|
128
128
|
"internalType": "uint256",
|
|
129
|
-
"name": "
|
|
129
|
+
"name": "_endBlock",
|
|
130
130
|
"type": "uint256"
|
|
131
131
|
}
|
|
132
132
|
],
|
|
133
|
-
"name": "
|
|
134
|
-
"
|
|
133
|
+
"name": "__stakingManager_init",
|
|
134
|
+
"outputs": [],
|
|
135
|
+
"stateMutability": "nonpayable",
|
|
136
|
+
"type": "function"
|
|
135
137
|
},
|
|
136
138
|
{
|
|
137
|
-
"anonymous": false,
|
|
138
139
|
"inputs": [
|
|
139
140
|
{
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"type": "address"
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"indexed": false,
|
|
147
|
-
"internalType": "uint256",
|
|
148
|
-
"name": "amount",
|
|
149
|
-
"type": "uint256"
|
|
141
|
+
"internalType": "address[]",
|
|
142
|
+
"name": "_usersToBlacklist",
|
|
143
|
+
"type": "address[]"
|
|
150
144
|
}
|
|
151
145
|
],
|
|
152
|
-
"name": "
|
|
153
|
-
"
|
|
146
|
+
"name": "blacklistUsers",
|
|
147
|
+
"outputs": [],
|
|
148
|
+
"stateMutability": "nonpayable",
|
|
149
|
+
"type": "function"
|
|
154
150
|
},
|
|
155
151
|
{
|
|
156
152
|
"inputs": [],
|
|
157
|
-
"name": "
|
|
153
|
+
"name": "claimStart",
|
|
158
154
|
"outputs": [
|
|
159
155
|
{
|
|
160
|
-
"internalType": "
|
|
156
|
+
"internalType": "uint256",
|
|
161
157
|
"name": "",
|
|
162
|
-
"type": "
|
|
158
|
+
"type": "uint256"
|
|
163
159
|
}
|
|
164
160
|
],
|
|
165
161
|
"stateMutability": "view",
|
|
@@ -168,27 +164,32 @@ exports.stakingManagerV4_jsonAbi = [
|
|
|
168
164
|
{
|
|
169
165
|
"inputs": [
|
|
170
166
|
{
|
|
171
|
-
"internalType": "
|
|
172
|
-
"name": "
|
|
173
|
-
"type": "
|
|
167
|
+
"internalType": "uint256",
|
|
168
|
+
"name": "_amount",
|
|
169
|
+
"type": "uint256"
|
|
174
170
|
}
|
|
175
171
|
],
|
|
176
|
-
"name": "
|
|
172
|
+
"name": "deposit",
|
|
177
173
|
"outputs": [],
|
|
178
174
|
"stateMutability": "nonpayable",
|
|
179
175
|
"type": "function"
|
|
180
176
|
},
|
|
181
177
|
{
|
|
182
|
-
"inputs": [
|
|
183
|
-
|
|
184
|
-
|
|
178
|
+
"inputs": [
|
|
179
|
+
{
|
|
180
|
+
"internalType": "address",
|
|
181
|
+
"name": "_user",
|
|
182
|
+
"type": "address"
|
|
183
|
+
},
|
|
185
184
|
{
|
|
186
185
|
"internalType": "uint256",
|
|
187
|
-
"name": "",
|
|
186
|
+
"name": "_amount",
|
|
188
187
|
"type": "uint256"
|
|
189
188
|
}
|
|
190
189
|
],
|
|
191
|
-
"
|
|
190
|
+
"name": "depositByPresale",
|
|
191
|
+
"outputs": [],
|
|
192
|
+
"stateMutability": "nonpayable",
|
|
192
193
|
"type": "function"
|
|
193
194
|
},
|
|
194
195
|
{
|
|
@@ -275,19 +276,6 @@ exports.stakingManagerV4_jsonAbi = [
|
|
|
275
276
|
"stateMutability": "view",
|
|
276
277
|
"type": "function"
|
|
277
278
|
},
|
|
278
|
-
{
|
|
279
|
-
"inputs": [],
|
|
280
|
-
"name": "newStaking",
|
|
281
|
-
"outputs": [
|
|
282
|
-
{
|
|
283
|
-
"internalType": "contract INewStaking",
|
|
284
|
-
"name": "",
|
|
285
|
-
"type": "address"
|
|
286
|
-
}
|
|
287
|
-
],
|
|
288
|
-
"stateMutability": "view",
|
|
289
|
-
"type": "function"
|
|
290
|
-
},
|
|
291
279
|
{
|
|
292
280
|
"inputs": [],
|
|
293
281
|
"name": "owner",
|
|
@@ -373,13 +361,6 @@ exports.stakingManagerV4_jsonAbi = [
|
|
|
373
361
|
"stateMutability": "nonpayable",
|
|
374
362
|
"type": "function"
|
|
375
363
|
},
|
|
376
|
-
{
|
|
377
|
-
"inputs": [],
|
|
378
|
-
"name": "restakeNew",
|
|
379
|
-
"outputs": [],
|
|
380
|
-
"stateMutability": "nonpayable",
|
|
381
|
-
"type": "function"
|
|
382
|
-
},
|
|
383
364
|
{
|
|
384
365
|
"inputs": [],
|
|
385
366
|
"name": "rewardTokensPerBlock",
|
|
@@ -393,6 +374,19 @@ exports.stakingManagerV4_jsonAbi = [
|
|
|
393
374
|
"stateMutability": "view",
|
|
394
375
|
"type": "function"
|
|
395
376
|
},
|
|
377
|
+
{
|
|
378
|
+
"inputs": [
|
|
379
|
+
{
|
|
380
|
+
"internalType": "uint256",
|
|
381
|
+
"name": "_claimStart",
|
|
382
|
+
"type": "uint256"
|
|
383
|
+
}
|
|
384
|
+
],
|
|
385
|
+
"name": "setClaimStart",
|
|
386
|
+
"outputs": [],
|
|
387
|
+
"stateMutability": "nonpayable",
|
|
388
|
+
"type": "function"
|
|
389
|
+
},
|
|
396
390
|
{
|
|
397
391
|
"inputs": [
|
|
398
392
|
{
|
|
@@ -406,15 +400,41 @@ exports.stakingManagerV4_jsonAbi = [
|
|
|
406
400
|
"stateMutability": "nonpayable",
|
|
407
401
|
"type": "function"
|
|
408
402
|
},
|
|
403
|
+
{
|
|
404
|
+
"inputs": [
|
|
405
|
+
{
|
|
406
|
+
"internalType": "bool",
|
|
407
|
+
"name": "_harvestlock",
|
|
408
|
+
"type": "bool"
|
|
409
|
+
}
|
|
410
|
+
],
|
|
411
|
+
"name": "setHarvestLock",
|
|
412
|
+
"outputs": [],
|
|
413
|
+
"stateMutability": "nonpayable",
|
|
414
|
+
"type": "function"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"inputs": [
|
|
418
|
+
{
|
|
419
|
+
"internalType": "uint256",
|
|
420
|
+
"name": "_time",
|
|
421
|
+
"type": "uint256"
|
|
422
|
+
}
|
|
423
|
+
],
|
|
424
|
+
"name": "setLockedTime",
|
|
425
|
+
"outputs": [],
|
|
426
|
+
"stateMutability": "nonpayable",
|
|
427
|
+
"type": "function"
|
|
428
|
+
},
|
|
409
429
|
{
|
|
410
430
|
"inputs": [
|
|
411
431
|
{
|
|
412
432
|
"internalType": "address",
|
|
413
|
-
"name": "
|
|
433
|
+
"name": "_presale",
|
|
414
434
|
"type": "address"
|
|
415
435
|
}
|
|
416
436
|
],
|
|
417
|
-
"name": "
|
|
437
|
+
"name": "setPresale",
|
|
418
438
|
"outputs": [],
|
|
419
439
|
"stateMutability": "nonpayable",
|
|
420
440
|
"type": "function"
|
|
@@ -445,19 +465,6 @@ exports.stakingManagerV4_jsonAbi = [
|
|
|
445
465
|
"stateMutability": "view",
|
|
446
466
|
"type": "function"
|
|
447
467
|
},
|
|
448
|
-
{
|
|
449
|
-
"inputs": [
|
|
450
|
-
{
|
|
451
|
-
"internalType": "uint256",
|
|
452
|
-
"name": "amount",
|
|
453
|
-
"type": "uint256"
|
|
454
|
-
}
|
|
455
|
-
],
|
|
456
|
-
"name": "tokenTransfer",
|
|
457
|
-
"outputs": [],
|
|
458
|
-
"stateMutability": "nonpayable",
|
|
459
|
-
"type": "function"
|
|
460
|
-
},
|
|
461
468
|
{
|
|
462
469
|
"inputs": [],
|
|
463
470
|
"name": "tokensStaked",
|
|
@@ -525,7 +532,7 @@ exports.stakingManagerV4_jsonAbi = [
|
|
|
525
532
|
}
|
|
526
533
|
];
|
|
527
534
|
/**
|
|
528
|
-
*
|
|
535
|
+
* stakingManager_json Contract Class
|
|
529
536
|
*
|
|
530
537
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
531
538
|
*
|
|
@@ -533,12 +540,12 @@ exports.stakingManagerV4_jsonAbi = [
|
|
|
533
540
|
* ```typescript
|
|
534
541
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
535
542
|
* import { mainnet } from 'viem/chains';
|
|
536
|
-
* import {
|
|
543
|
+
* import { stakingManager_json } from 'stakingManager_json';
|
|
537
544
|
*
|
|
538
545
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
539
546
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
540
547
|
*
|
|
541
|
-
* const contract = new
|
|
548
|
+
* const contract = new stakingManager_json('0x...', { publicClient, walletClient });
|
|
542
549
|
*
|
|
543
550
|
* // Read functions
|
|
544
551
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -556,13 +563,13 @@ exports.stakingManagerV4_jsonAbi = [
|
|
|
556
563
|
* });
|
|
557
564
|
* ```
|
|
558
565
|
*/
|
|
559
|
-
class
|
|
566
|
+
class stakingManager_json {
|
|
560
567
|
constructor(address, clients) {
|
|
561
568
|
this.contractAddress = address;
|
|
562
569
|
this.publicClient = clients.publicClient;
|
|
563
570
|
this.contract = (0, viem_1.getContract)({
|
|
564
571
|
address,
|
|
565
|
-
abi: exports.
|
|
572
|
+
abi: exports.stakingManager_jsonAbi,
|
|
566
573
|
client: {
|
|
567
574
|
public: clients.publicClient,
|
|
568
575
|
wallet: clients.walletClient,
|
|
@@ -581,13 +588,6 @@ class stakingManagerV4_json {
|
|
|
581
588
|
getContract() {
|
|
582
589
|
return this.contract;
|
|
583
590
|
}
|
|
584
|
-
/**
|
|
585
|
-
* DEV_WALLET
|
|
586
|
-
* view
|
|
587
|
-
*/
|
|
588
|
-
async DEV_WALLET() {
|
|
589
|
-
return this.contract.read.DEV_WALLET();
|
|
590
|
-
}
|
|
591
591
|
/**
|
|
592
592
|
* claimStart
|
|
593
593
|
* view
|
|
@@ -630,13 +630,6 @@ class stakingManagerV4_json {
|
|
|
630
630
|
async lockedTime() {
|
|
631
631
|
return this.contract.read.lockedTime();
|
|
632
632
|
}
|
|
633
|
-
/**
|
|
634
|
-
* newStaking
|
|
635
|
-
* view
|
|
636
|
-
*/
|
|
637
|
-
async newStaking() {
|
|
638
|
-
return this.contract.read.newStaking();
|
|
639
|
-
}
|
|
640
633
|
/**
|
|
641
634
|
* owner
|
|
642
635
|
* view
|
|
@@ -693,6 +686,17 @@ class stakingManagerV4_json {
|
|
|
693
686
|
async userLockedRewards(arg0) {
|
|
694
687
|
return this.contract.read.userLockedRewards([arg0]);
|
|
695
688
|
}
|
|
689
|
+
/**
|
|
690
|
+
* __stakingManager_init
|
|
691
|
+
* nonpayable
|
|
692
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
693
|
+
*/
|
|
694
|
+
async __stakingManager_init(_rewardTokenAddress, _presale, _rewardTokensPerBlock, _lockTime, _endBlock, options) {
|
|
695
|
+
if (!this.contract.write) {
|
|
696
|
+
throw new Error('Wallet client is required for write operations');
|
|
697
|
+
}
|
|
698
|
+
return this.contract.write.__stakingManager_init([_rewardTokenAddress, _presale, _rewardTokensPerBlock, _lockTime, _endBlock], options);
|
|
699
|
+
}
|
|
696
700
|
/**
|
|
697
701
|
* blacklistUsers
|
|
698
702
|
* nonpayable
|
|
@@ -704,6 +708,28 @@ class stakingManagerV4_json {
|
|
|
704
708
|
}
|
|
705
709
|
return this.contract.write.blacklistUsers([_usersToBlacklist], options);
|
|
706
710
|
}
|
|
711
|
+
/**
|
|
712
|
+
* deposit
|
|
713
|
+
* nonpayable
|
|
714
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
715
|
+
*/
|
|
716
|
+
async deposit(_amount, options) {
|
|
717
|
+
if (!this.contract.write) {
|
|
718
|
+
throw new Error('Wallet client is required for write operations');
|
|
719
|
+
}
|
|
720
|
+
return this.contract.write.deposit([_amount], options);
|
|
721
|
+
}
|
|
722
|
+
/**
|
|
723
|
+
* depositByPresale
|
|
724
|
+
* nonpayable
|
|
725
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
726
|
+
*/
|
|
727
|
+
async depositByPresale(_user, _amount, options) {
|
|
728
|
+
if (!this.contract.write) {
|
|
729
|
+
throw new Error('Wallet client is required for write operations');
|
|
730
|
+
}
|
|
731
|
+
return this.contract.write.depositByPresale([_user, _amount], options);
|
|
732
|
+
}
|
|
707
733
|
/**
|
|
708
734
|
* harvestRewards
|
|
709
735
|
* nonpayable
|
|
@@ -738,15 +764,15 @@ class stakingManagerV4_json {
|
|
|
738
764
|
return this.contract.write.renounceOwnership(options);
|
|
739
765
|
}
|
|
740
766
|
/**
|
|
741
|
-
*
|
|
767
|
+
* setClaimStart
|
|
742
768
|
* nonpayable
|
|
743
769
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
744
770
|
*/
|
|
745
|
-
async
|
|
771
|
+
async setClaimStart(_claimStart, options) {
|
|
746
772
|
if (!this.contract.write) {
|
|
747
773
|
throw new Error('Wallet client is required for write operations');
|
|
748
774
|
}
|
|
749
|
-
return this.contract.write.
|
|
775
|
+
return this.contract.write.setClaimStart([_claimStart], options);
|
|
750
776
|
}
|
|
751
777
|
/**
|
|
752
778
|
* setEndBlock
|
|
@@ -760,37 +786,48 @@ class stakingManagerV4_json {
|
|
|
760
786
|
return this.contract.write.setEndBlock([_endBlock], options);
|
|
761
787
|
}
|
|
762
788
|
/**
|
|
763
|
-
*
|
|
789
|
+
* setHarvestLock
|
|
764
790
|
* nonpayable
|
|
765
791
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
766
792
|
*/
|
|
767
|
-
async
|
|
793
|
+
async setHarvestLock(_harvestlock, options) {
|
|
768
794
|
if (!this.contract.write) {
|
|
769
795
|
throw new Error('Wallet client is required for write operations');
|
|
770
796
|
}
|
|
771
|
-
return this.contract.write.
|
|
797
|
+
return this.contract.write.setHarvestLock([_harvestlock], options);
|
|
772
798
|
}
|
|
773
799
|
/**
|
|
774
|
-
*
|
|
800
|
+
* setLockedTime
|
|
775
801
|
* nonpayable
|
|
776
802
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
777
803
|
*/
|
|
778
|
-
async
|
|
804
|
+
async setLockedTime(_time, options) {
|
|
779
805
|
if (!this.contract.write) {
|
|
780
806
|
throw new Error('Wallet client is required for write operations');
|
|
781
807
|
}
|
|
782
|
-
return this.contract.write.
|
|
808
|
+
return this.contract.write.setLockedTime([_time], options);
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* setPresale
|
|
812
|
+
* nonpayable
|
|
813
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
814
|
+
*/
|
|
815
|
+
async setPresale(_presale, options) {
|
|
816
|
+
if (!this.contract.write) {
|
|
817
|
+
throw new Error('Wallet client is required for write operations');
|
|
818
|
+
}
|
|
819
|
+
return this.contract.write.setPresale([_presale], options);
|
|
783
820
|
}
|
|
784
821
|
/**
|
|
785
|
-
*
|
|
822
|
+
* setStakeToken
|
|
786
823
|
* nonpayable
|
|
787
824
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
788
825
|
*/
|
|
789
|
-
async
|
|
826
|
+
async setStakeToken(_stakeToken, options) {
|
|
790
827
|
if (!this.contract.write) {
|
|
791
828
|
throw new Error('Wallet client is required for write operations');
|
|
792
829
|
}
|
|
793
|
-
return this.contract.write.
|
|
830
|
+
return this.contract.write.setStakeToken([_stakeToken], options);
|
|
794
831
|
}
|
|
795
832
|
/**
|
|
796
833
|
* transferOwnership
|
|
@@ -828,6 +865,14 @@ class stakingManagerV4_json {
|
|
|
828
865
|
throw new Error('Public client is required for simulation');
|
|
829
866
|
}
|
|
830
867
|
return {
|
|
868
|
+
/**
|
|
869
|
+
* Simulate __stakingManager_init
|
|
870
|
+
* Returns gas estimate and result without sending transaction
|
|
871
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
872
|
+
*/
|
|
873
|
+
async __stakingManager_init(_rewardTokenAddress, _presale, _rewardTokensPerBlock, _lockTime, _endBlock, options) {
|
|
874
|
+
return contract.simulate.__stakingManager_init([_rewardTokenAddress, _presale, _rewardTokensPerBlock, _lockTime, _endBlock], options);
|
|
875
|
+
},
|
|
831
876
|
/**
|
|
832
877
|
* Simulate blacklistUsers
|
|
833
878
|
* Returns gas estimate and result without sending transaction
|
|
@@ -836,6 +881,22 @@ class stakingManagerV4_json {
|
|
|
836
881
|
async blacklistUsers(_usersToBlacklist, options) {
|
|
837
882
|
return contract.simulate.blacklistUsers([_usersToBlacklist], options);
|
|
838
883
|
},
|
|
884
|
+
/**
|
|
885
|
+
* Simulate deposit
|
|
886
|
+
* Returns gas estimate and result without sending transaction
|
|
887
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
888
|
+
*/
|
|
889
|
+
async deposit(_amount, options) {
|
|
890
|
+
return contract.simulate.deposit([_amount], options);
|
|
891
|
+
},
|
|
892
|
+
/**
|
|
893
|
+
* Simulate depositByPresale
|
|
894
|
+
* Returns gas estimate and result without sending transaction
|
|
895
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
896
|
+
*/
|
|
897
|
+
async depositByPresale(_user, _amount, options) {
|
|
898
|
+
return contract.simulate.depositByPresale([_user, _amount], options);
|
|
899
|
+
},
|
|
839
900
|
/**
|
|
840
901
|
* Simulate harvestRewards
|
|
841
902
|
* Returns gas estimate and result without sending transaction
|
|
@@ -861,12 +922,12 @@ class stakingManagerV4_json {
|
|
|
861
922
|
return contract.simulate.renounceOwnership(options);
|
|
862
923
|
},
|
|
863
924
|
/**
|
|
864
|
-
* Simulate
|
|
925
|
+
* Simulate setClaimStart
|
|
865
926
|
* Returns gas estimate and result without sending transaction
|
|
866
927
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
867
928
|
*/
|
|
868
|
-
async
|
|
869
|
-
return contract.simulate.
|
|
929
|
+
async setClaimStart(_claimStart, options) {
|
|
930
|
+
return contract.simulate.setClaimStart([_claimStart], options);
|
|
870
931
|
},
|
|
871
932
|
/**
|
|
872
933
|
* Simulate setEndBlock
|
|
@@ -877,28 +938,36 @@ class stakingManagerV4_json {
|
|
|
877
938
|
return contract.simulate.setEndBlock([_endBlock], options);
|
|
878
939
|
},
|
|
879
940
|
/**
|
|
880
|
-
* Simulate
|
|
941
|
+
* Simulate setHarvestLock
|
|
881
942
|
* Returns gas estimate and result without sending transaction
|
|
882
943
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
883
944
|
*/
|
|
884
|
-
async
|
|
885
|
-
return contract.simulate.
|
|
945
|
+
async setHarvestLock(_harvestlock, options) {
|
|
946
|
+
return contract.simulate.setHarvestLock([_harvestlock], options);
|
|
886
947
|
},
|
|
887
948
|
/**
|
|
888
|
-
* Simulate
|
|
949
|
+
* Simulate setLockedTime
|
|
889
950
|
* Returns gas estimate and result without sending transaction
|
|
890
951
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
891
952
|
*/
|
|
892
|
-
async
|
|
893
|
-
return contract.simulate.
|
|
953
|
+
async setLockedTime(_time, options) {
|
|
954
|
+
return contract.simulate.setLockedTime([_time], options);
|
|
955
|
+
},
|
|
956
|
+
/**
|
|
957
|
+
* Simulate setPresale
|
|
958
|
+
* Returns gas estimate and result without sending transaction
|
|
959
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
960
|
+
*/
|
|
961
|
+
async setPresale(_presale, options) {
|
|
962
|
+
return contract.simulate.setPresale([_presale], options);
|
|
894
963
|
},
|
|
895
964
|
/**
|
|
896
|
-
* Simulate
|
|
965
|
+
* Simulate setStakeToken
|
|
897
966
|
* Returns gas estimate and result without sending transaction
|
|
898
967
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
899
968
|
*/
|
|
900
|
-
async
|
|
901
|
-
return contract.simulate.
|
|
969
|
+
async setStakeToken(_stakeToken, options) {
|
|
970
|
+
return contract.simulate.setStakeToken([_stakeToken], options);
|
|
902
971
|
},
|
|
903
972
|
/**
|
|
904
973
|
* Simulate transferOwnership
|
|
@@ -941,7 +1010,7 @@ class stakingManagerV4_json {
|
|
|
941
1010
|
Deposit: (callback, filter) => {
|
|
942
1011
|
return this.publicClient.watchContractEvent({
|
|
943
1012
|
address: this.contractAddress,
|
|
944
|
-
abi: exports.
|
|
1013
|
+
abi: exports.stakingManager_jsonAbi,
|
|
945
1014
|
eventName: 'Deposit',
|
|
946
1015
|
args: filter,
|
|
947
1016
|
onLogs: (logs) => {
|
|
@@ -960,7 +1029,7 @@ class stakingManagerV4_json {
|
|
|
960
1029
|
HarvestRewards: (callback, filter) => {
|
|
961
1030
|
return this.publicClient.watchContractEvent({
|
|
962
1031
|
address: this.contractAddress,
|
|
963
|
-
abi: exports.
|
|
1032
|
+
abi: exports.stakingManager_jsonAbi,
|
|
964
1033
|
eventName: 'HarvestRewards',
|
|
965
1034
|
args: filter,
|
|
966
1035
|
onLogs: (logs) => {
|
|
@@ -979,7 +1048,7 @@ class stakingManagerV4_json {
|
|
|
979
1048
|
Initialized: (callback) => {
|
|
980
1049
|
return this.publicClient.watchContractEvent({
|
|
981
1050
|
address: this.contractAddress,
|
|
982
|
-
abi: exports.
|
|
1051
|
+
abi: exports.stakingManager_jsonAbi,
|
|
983
1052
|
eventName: 'Initialized',
|
|
984
1053
|
onLogs: (logs) => {
|
|
985
1054
|
logs.forEach((log) => {
|
|
@@ -997,7 +1066,7 @@ class stakingManagerV4_json {
|
|
|
997
1066
|
OwnershipTransferred: (callback, filter) => {
|
|
998
1067
|
return this.publicClient.watchContractEvent({
|
|
999
1068
|
address: this.contractAddress,
|
|
1000
|
-
abi: exports.
|
|
1069
|
+
abi: exports.stakingManager_jsonAbi,
|
|
1001
1070
|
eventName: 'OwnershipTransferred',
|
|
1002
1071
|
args: filter,
|
|
1003
1072
|
onLogs: (logs) => {
|
|
@@ -1007,44 +1076,6 @@ class stakingManagerV4_json {
|
|
|
1007
1076
|
},
|
|
1008
1077
|
});
|
|
1009
1078
|
},
|
|
1010
|
-
/**
|
|
1011
|
-
* Watch RestakePrincipal events
|
|
1012
|
-
* @param callback Function to call when event is emitted
|
|
1013
|
-
* @param filter Optional filter for indexed parameters
|
|
1014
|
-
* @returns Unwatch function to stop listening
|
|
1015
|
-
*/
|
|
1016
|
-
RestakePrincipal: (callback, filter) => {
|
|
1017
|
-
return this.publicClient.watchContractEvent({
|
|
1018
|
-
address: this.contractAddress,
|
|
1019
|
-
abi: exports.stakingManagerV4_jsonAbi,
|
|
1020
|
-
eventName: 'RestakePrincipal',
|
|
1021
|
-
args: filter,
|
|
1022
|
-
onLogs: (logs) => {
|
|
1023
|
-
logs.forEach((log) => {
|
|
1024
|
-
callback(log.args);
|
|
1025
|
-
});
|
|
1026
|
-
},
|
|
1027
|
-
});
|
|
1028
|
-
},
|
|
1029
|
-
/**
|
|
1030
|
-
* Watch RestakeRewards events
|
|
1031
|
-
* @param callback Function to call when event is emitted
|
|
1032
|
-
* @param filter Optional filter for indexed parameters
|
|
1033
|
-
* @returns Unwatch function to stop listening
|
|
1034
|
-
*/
|
|
1035
|
-
RestakeRewards: (callback, filter) => {
|
|
1036
|
-
return this.publicClient.watchContractEvent({
|
|
1037
|
-
address: this.contractAddress,
|
|
1038
|
-
abi: exports.stakingManagerV4_jsonAbi,
|
|
1039
|
-
eventName: 'RestakeRewards',
|
|
1040
|
-
args: filter,
|
|
1041
|
-
onLogs: (logs) => {
|
|
1042
|
-
logs.forEach((log) => {
|
|
1043
|
-
callback(log.args);
|
|
1044
|
-
});
|
|
1045
|
-
},
|
|
1046
|
-
});
|
|
1047
|
-
},
|
|
1048
1079
|
/**
|
|
1049
1080
|
* Watch Withdraw events
|
|
1050
1081
|
* @param callback Function to call when event is emitted
|
|
@@ -1054,7 +1085,7 @@ class stakingManagerV4_json {
|
|
|
1054
1085
|
Withdraw: (callback, filter) => {
|
|
1055
1086
|
return this.publicClient.watchContractEvent({
|
|
1056
1087
|
address: this.contractAddress,
|
|
1057
|
-
abi: exports.
|
|
1088
|
+
abi: exports.stakingManager_jsonAbi,
|
|
1058
1089
|
eventName: 'Withdraw',
|
|
1059
1090
|
args: filter,
|
|
1060
1091
|
onLogs: (logs) => {
|
|
@@ -1067,4 +1098,4 @@ class stakingManagerV4_json {
|
|
|
1067
1098
|
};
|
|
1068
1099
|
}
|
|
1069
1100
|
}
|
|
1070
|
-
exports.
|
|
1101
|
+
exports.stakingManager_json = stakingManager_json;
|