@gitmyabi/stakingmanager 1.0.5 → 1.0.6
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/TransparentUpgradeableProxy_json.d.ts +230 -2
- package/contracts/TransparentUpgradeableProxy_json.js +175 -3
- package/contracts/TransparentUpgradeableProxy_json.ts +289 -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} +245 -141
- package/contracts/{stakingManagerV4_json.js → stakingManager_json.js} +213 -182
- package/contracts/{stakingManagerV4_json.ts → stakingManager_json.ts} +309 -188
- 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,32 @@ 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
|
-
}
|
|
107
|
-
],
|
|
108
|
-
"name": "RestakePrincipal",
|
|
109
|
-
"type": "event"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"anonymous": false,
|
|
113
|
-
"inputs": [
|
|
114
|
-
{
|
|
115
|
-
"indexed": true,
|
|
116
|
-
"internalType": "address",
|
|
117
|
-
"name": "user",
|
|
118
|
-
"type": "address"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"indexed": false,
|
|
122
|
-
"internalType": "uint256",
|
|
123
|
-
"name": "amount",
|
|
124
|
-
"type": "uint256"
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"indexed": false,
|
|
128
|
-
"internalType": "uint256",
|
|
129
|
-
"name": "timestamp",
|
|
130
|
-
"type": "uint256"
|
|
131
100
|
}
|
|
132
101
|
],
|
|
133
|
-
"name": "
|
|
102
|
+
"name": "Withdraw",
|
|
134
103
|
"type": "event"
|
|
135
104
|
},
|
|
136
105
|
{
|
|
137
|
-
"anonymous": false,
|
|
138
106
|
"inputs": [
|
|
139
107
|
{
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"type": "address"
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"indexed": false,
|
|
147
|
-
"internalType": "uint256",
|
|
148
|
-
"name": "amount",
|
|
149
|
-
"type": "uint256"
|
|
108
|
+
"internalType": "address[]",
|
|
109
|
+
"name": "_usersToBlacklist",
|
|
110
|
+
"type": "address[]"
|
|
150
111
|
}
|
|
151
112
|
],
|
|
152
|
-
"name": "
|
|
153
|
-
"
|
|
113
|
+
"name": "blacklistUsers",
|
|
114
|
+
"outputs": [],
|
|
115
|
+
"stateMutability": "nonpayable",
|
|
116
|
+
"type": "function"
|
|
154
117
|
},
|
|
155
118
|
{
|
|
156
119
|
"inputs": [],
|
|
157
|
-
"name": "
|
|
120
|
+
"name": "claimStart",
|
|
158
121
|
"outputs": [
|
|
159
122
|
{
|
|
160
|
-
"internalType": "
|
|
123
|
+
"internalType": "uint256",
|
|
161
124
|
"name": "",
|
|
162
|
-
"type": "
|
|
125
|
+
"type": "uint256"
|
|
163
126
|
}
|
|
164
127
|
],
|
|
165
128
|
"stateMutability": "view",
|
|
@@ -168,27 +131,32 @@ exports.stakingManagerV4_jsonAbi = [
|
|
|
168
131
|
{
|
|
169
132
|
"inputs": [
|
|
170
133
|
{
|
|
171
|
-
"internalType": "
|
|
172
|
-
"name": "
|
|
173
|
-
"type": "
|
|
134
|
+
"internalType": "uint256",
|
|
135
|
+
"name": "_amount",
|
|
136
|
+
"type": "uint256"
|
|
174
137
|
}
|
|
175
138
|
],
|
|
176
|
-
"name": "
|
|
139
|
+
"name": "deposit",
|
|
177
140
|
"outputs": [],
|
|
178
141
|
"stateMutability": "nonpayable",
|
|
179
142
|
"type": "function"
|
|
180
143
|
},
|
|
181
144
|
{
|
|
182
|
-
"inputs": [
|
|
183
|
-
|
|
184
|
-
|
|
145
|
+
"inputs": [
|
|
146
|
+
{
|
|
147
|
+
"internalType": "address",
|
|
148
|
+
"name": "_user",
|
|
149
|
+
"type": "address"
|
|
150
|
+
},
|
|
185
151
|
{
|
|
186
152
|
"internalType": "uint256",
|
|
187
|
-
"name": "",
|
|
153
|
+
"name": "_amount",
|
|
188
154
|
"type": "uint256"
|
|
189
155
|
}
|
|
190
156
|
],
|
|
191
|
-
"
|
|
157
|
+
"name": "depositByPresale",
|
|
158
|
+
"outputs": [],
|
|
159
|
+
"stateMutability": "nonpayable",
|
|
192
160
|
"type": "function"
|
|
193
161
|
},
|
|
194
162
|
{
|
|
@@ -243,6 +211,39 @@ exports.stakingManagerV4_jsonAbi = [
|
|
|
243
211
|
"stateMutability": "nonpayable",
|
|
244
212
|
"type": "function"
|
|
245
213
|
},
|
|
214
|
+
{
|
|
215
|
+
"inputs": [
|
|
216
|
+
{
|
|
217
|
+
"internalType": "address",
|
|
218
|
+
"name": "_rewardTokenAddress",
|
|
219
|
+
"type": "address"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"internalType": "address",
|
|
223
|
+
"name": "_presale",
|
|
224
|
+
"type": "address"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"internalType": "uint256",
|
|
228
|
+
"name": "_rewardTokensPerBlock",
|
|
229
|
+
"type": "uint256"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"internalType": "uint256",
|
|
233
|
+
"name": "_lockTime",
|
|
234
|
+
"type": "uint256"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"internalType": "uint256",
|
|
238
|
+
"name": "_endBlock",
|
|
239
|
+
"type": "uint256"
|
|
240
|
+
}
|
|
241
|
+
],
|
|
242
|
+
"name": "initialize",
|
|
243
|
+
"outputs": [],
|
|
244
|
+
"stateMutability": "nonpayable",
|
|
245
|
+
"type": "function"
|
|
246
|
+
},
|
|
246
247
|
{
|
|
247
248
|
"inputs": [
|
|
248
249
|
{
|
|
@@ -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
|
|
@@ -704,6 +697,28 @@ class stakingManagerV4_json {
|
|
|
704
697
|
}
|
|
705
698
|
return this.contract.write.blacklistUsers([_usersToBlacklist], options);
|
|
706
699
|
}
|
|
700
|
+
/**
|
|
701
|
+
* deposit
|
|
702
|
+
* nonpayable
|
|
703
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
704
|
+
*/
|
|
705
|
+
async deposit(_amount, options) {
|
|
706
|
+
if (!this.contract.write) {
|
|
707
|
+
throw new Error('Wallet client is required for write operations');
|
|
708
|
+
}
|
|
709
|
+
return this.contract.write.deposit([_amount], options);
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* depositByPresale
|
|
713
|
+
* nonpayable
|
|
714
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
715
|
+
*/
|
|
716
|
+
async depositByPresale(_user, _amount, options) {
|
|
717
|
+
if (!this.contract.write) {
|
|
718
|
+
throw new Error('Wallet client is required for write operations');
|
|
719
|
+
}
|
|
720
|
+
return this.contract.write.depositByPresale([_user, _amount], options);
|
|
721
|
+
}
|
|
707
722
|
/**
|
|
708
723
|
* harvestRewards
|
|
709
724
|
* nonpayable
|
|
@@ -715,6 +730,17 @@ class stakingManagerV4_json {
|
|
|
715
730
|
}
|
|
716
731
|
return this.contract.write.harvestRewards(options);
|
|
717
732
|
}
|
|
733
|
+
/**
|
|
734
|
+
* initialize
|
|
735
|
+
* nonpayable
|
|
736
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
737
|
+
*/
|
|
738
|
+
async initialize(_rewardTokenAddress, _presale, _rewardTokensPerBlock, _lockTime, _endBlock, options) {
|
|
739
|
+
if (!this.contract.write) {
|
|
740
|
+
throw new Error('Wallet client is required for write operations');
|
|
741
|
+
}
|
|
742
|
+
return this.contract.write.initialize([_rewardTokenAddress, _presale, _rewardTokensPerBlock, _lockTime, _endBlock], options);
|
|
743
|
+
}
|
|
718
744
|
/**
|
|
719
745
|
* removeFromBlacklist
|
|
720
746
|
* 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
|
|
@@ -836,6 +873,22 @@ class stakingManagerV4_json {
|
|
|
836
873
|
async blacklistUsers(_usersToBlacklist, options) {
|
|
837
874
|
return contract.simulate.blacklistUsers([_usersToBlacklist], options);
|
|
838
875
|
},
|
|
876
|
+
/**
|
|
877
|
+
* Simulate deposit
|
|
878
|
+
* Returns gas estimate and result without sending transaction
|
|
879
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
880
|
+
*/
|
|
881
|
+
async deposit(_amount, options) {
|
|
882
|
+
return contract.simulate.deposit([_amount], options);
|
|
883
|
+
},
|
|
884
|
+
/**
|
|
885
|
+
* Simulate depositByPresale
|
|
886
|
+
* Returns gas estimate and result without sending transaction
|
|
887
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
888
|
+
*/
|
|
889
|
+
async depositByPresale(_user, _amount, options) {
|
|
890
|
+
return contract.simulate.depositByPresale([_user, _amount], options);
|
|
891
|
+
},
|
|
839
892
|
/**
|
|
840
893
|
* Simulate harvestRewards
|
|
841
894
|
* Returns gas estimate and result without sending transaction
|
|
@@ -844,6 +897,14 @@ class stakingManagerV4_json {
|
|
|
844
897
|
async harvestRewards(options) {
|
|
845
898
|
return contract.simulate.harvestRewards(options);
|
|
846
899
|
},
|
|
900
|
+
/**
|
|
901
|
+
* Simulate initialize
|
|
902
|
+
* Returns gas estimate and result without sending transaction
|
|
903
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
904
|
+
*/
|
|
905
|
+
async initialize(_rewardTokenAddress, _presale, _rewardTokensPerBlock, _lockTime, _endBlock, options) {
|
|
906
|
+
return contract.simulate.initialize([_rewardTokenAddress, _presale, _rewardTokensPerBlock, _lockTime, _endBlock], options);
|
|
907
|
+
},
|
|
847
908
|
/**
|
|
848
909
|
* Simulate removeFromBlacklist
|
|
849
910
|
* 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;
|