@gitmyabi/stakingmanager 1.0.0 → 1.0.2
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 → stakingManagerV3_json.d.ts} +55 -59
- package/contracts/{stakingManagerV2_json.js → stakingManagerV3_json.js} +46 -51
- package/contracts/{stakingManagerV2_json.ts → stakingManagerV3_json.ts} +73 -78
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Auto-generated TypeScript type bindings for **stakingManager**
|
|
4
4
|
|
|
5
|
-
- **Build ID**: `etherscan-stakingmanager-
|
|
5
|
+
- **Build ID**: `etherscan-stakingmanager-6475bdeb-1787503825123`
|
|
6
6
|
- **Build Number**: 1
|
|
7
|
-
- **Commit**: `
|
|
7
|
+
- **Commit**: `4b458ad`
|
|
8
8
|
- **Branch**: `etherscan`
|
|
9
9
|
- **Target**: `ethers-v6`
|
|
10
10
|
- **Contracts**: 2
|
|
@@ -12,7 +12,7 @@ Auto-generated TypeScript type bindings for **stakingManager**
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
npm install @gitmyabi/stakingmanager@1.0.
|
|
15
|
+
npm install @gitmyabi/stakingmanager@1.0.2
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Usage
|
package/contracts/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { TransparentUpgradeableProxy_jsonAbi, TransparentUpgradeableProxy_json } from './TransparentUpgradeableProxy_json';
|
|
2
2
|
export type { TransparentUpgradeableProxy_jsonAbi as TransparentUpgradeableProxy_jsonAbiType, TransparentUpgradeableProxy_jsonContract } from './TransparentUpgradeableProxy_json';
|
|
3
|
-
export {
|
|
4
|
-
export type {
|
|
3
|
+
export { stakingManagerV3_jsonAbi, stakingManagerV3_json } from './stakingManagerV3_json';
|
|
4
|
+
export type { stakingManagerV3_jsonAbi as stakingManagerV3_jsonAbiType, stakingManagerV3_jsonContract } from './stakingManagerV3_json';
|
package/contracts/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.stakingManagerV3_json = exports.stakingManagerV3_jsonAbi = exports.TransparentUpgradeableProxy_json = exports.TransparentUpgradeableProxy_jsonAbi = void 0;
|
|
4
4
|
// Auto-generated exports for all contracts
|
|
5
5
|
var TransparentUpgradeableProxy_json_1 = require("./TransparentUpgradeableProxy_json");
|
|
6
6
|
Object.defineProperty(exports, "TransparentUpgradeableProxy_jsonAbi", { enumerable: true, get: function () { return TransparentUpgradeableProxy_json_1.TransparentUpgradeableProxy_jsonAbi; } });
|
|
7
7
|
Object.defineProperty(exports, "TransparentUpgradeableProxy_json", { enumerable: true, get: function () { return TransparentUpgradeableProxy_json_1.TransparentUpgradeableProxy_json; } });
|
|
8
|
-
var
|
|
9
|
-
Object.defineProperty(exports, "
|
|
10
|
-
Object.defineProperty(exports, "
|
|
8
|
+
var stakingManagerV3_json_1 = require("./stakingManagerV3_json");
|
|
9
|
+
Object.defineProperty(exports, "stakingManagerV3_jsonAbi", { enumerable: true, get: function () { return stakingManagerV3_json_1.stakingManagerV3_jsonAbi; } });
|
|
10
|
+
Object.defineProperty(exports, "stakingManagerV3_json", { enumerable: true, get: function () { return stakingManagerV3_json_1.stakingManagerV3_json; } });
|
package/contracts/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Auto-generated exports for all contracts
|
|
2
2
|
export { TransparentUpgradeableProxy_jsonAbi, TransparentUpgradeableProxy_json } from './TransparentUpgradeableProxy_json';
|
|
3
3
|
export type { TransparentUpgradeableProxy_jsonAbi as TransparentUpgradeableProxy_jsonAbiType, TransparentUpgradeableProxy_jsonContract } from './TransparentUpgradeableProxy_json';
|
|
4
|
-
export {
|
|
5
|
-
export type {
|
|
4
|
+
export { stakingManagerV3_jsonAbi, stakingManagerV3_json } from './stakingManagerV3_json';
|
|
5
|
+
export type { stakingManagerV3_jsonAbi as stakingManagerV3_jsonAbiType, stakingManagerV3_jsonContract } from './stakingManagerV3_json';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Address, PublicClient, WalletClient } from 'viem';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* stakingManagerV3_json ABI
|
|
4
4
|
*
|
|
5
5
|
* This ABI is typed using viem's type system for full type safety.
|
|
6
6
|
*/
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const stakingManagerV3_jsonAbi: readonly [{
|
|
8
8
|
readonly inputs: readonly [];
|
|
9
9
|
readonly stateMutability: "nonpayable";
|
|
10
10
|
readonly type: "constructor";
|
|
@@ -114,20 +114,6 @@ export declare const stakingManagerV2_jsonAbi: readonly [{
|
|
|
114
114
|
readonly outputs: readonly [];
|
|
115
115
|
readonly stateMutability: "nonpayable";
|
|
116
116
|
readonly type: "function";
|
|
117
|
-
}, {
|
|
118
|
-
readonly inputs: readonly [{
|
|
119
|
-
readonly internalType: "uint256";
|
|
120
|
-
readonly name: "_rewardTokensPerBlock";
|
|
121
|
-
readonly type: "uint256";
|
|
122
|
-
}, {
|
|
123
|
-
readonly internalType: "uint256";
|
|
124
|
-
readonly name: "_endBlock";
|
|
125
|
-
readonly type: "uint256";
|
|
126
|
-
}];
|
|
127
|
-
readonly name: "changeRewardTokensPerBlock";
|
|
128
|
-
readonly outputs: readonly [];
|
|
129
|
-
readonly stateMutability: "nonpayable";
|
|
130
|
-
readonly type: "function";
|
|
131
117
|
}, {
|
|
132
118
|
readonly inputs: readonly [];
|
|
133
119
|
readonly name: "claimStart";
|
|
@@ -422,17 +408,27 @@ export declare const stakingManagerV2_jsonAbi: readonly [{
|
|
|
422
408
|
readonly outputs: readonly [];
|
|
423
409
|
readonly stateMutability: "nonpayable";
|
|
424
410
|
readonly type: "function";
|
|
411
|
+
}, {
|
|
412
|
+
readonly inputs: readonly [{
|
|
413
|
+
readonly internalType: "uint256";
|
|
414
|
+
readonly name: "_amount";
|
|
415
|
+
readonly type: "uint256";
|
|
416
|
+
}];
|
|
417
|
+
readonly name: "withdrawToken";
|
|
418
|
+
readonly outputs: readonly [];
|
|
419
|
+
readonly stateMutability: "nonpayable";
|
|
420
|
+
readonly type: "function";
|
|
425
421
|
}];
|
|
426
422
|
/**
|
|
427
|
-
* Type-safe ABI for
|
|
423
|
+
* Type-safe ABI for stakingManagerV3_json
|
|
428
424
|
*/
|
|
429
|
-
export type
|
|
425
|
+
export type stakingManagerV3_jsonAbi = typeof stakingManagerV3_jsonAbi;
|
|
430
426
|
/**
|
|
431
|
-
* Contract instance type for
|
|
427
|
+
* Contract instance type for stakingManagerV3_json
|
|
432
428
|
*/
|
|
433
|
-
export type
|
|
429
|
+
export type stakingManagerV3_jsonContract = any;
|
|
434
430
|
/**
|
|
435
|
-
*
|
|
431
|
+
* stakingManagerV3_json Contract Class
|
|
436
432
|
*
|
|
437
433
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
438
434
|
*
|
|
@@ -440,12 +436,12 @@ export type stakingManagerV2_jsonContract = any;
|
|
|
440
436
|
* ```typescript
|
|
441
437
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
442
438
|
* import { mainnet } from 'viem/chains';
|
|
443
|
-
* import {
|
|
439
|
+
* import { stakingManagerV3_json } from 'stakingManagerV3_json';
|
|
444
440
|
*
|
|
445
441
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
446
442
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
447
443
|
*
|
|
448
|
-
* const contract = new
|
|
444
|
+
* const contract = new stakingManagerV3_json('0x...', { publicClient, walletClient });
|
|
449
445
|
*
|
|
450
446
|
* // Read functions
|
|
451
447
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -463,7 +459,7 @@ export type stakingManagerV2_jsonContract = any;
|
|
|
463
459
|
* });
|
|
464
460
|
* ```
|
|
465
461
|
*/
|
|
466
|
-
export declare class
|
|
462
|
+
export declare class stakingManagerV3_json {
|
|
467
463
|
private contract;
|
|
468
464
|
private contractAddress;
|
|
469
465
|
private publicClient;
|
|
@@ -478,7 +474,7 @@ export declare class stakingManagerV2_json {
|
|
|
478
474
|
/**
|
|
479
475
|
* Get the underlying viem contract instance
|
|
480
476
|
*/
|
|
481
|
-
getContract():
|
|
477
|
+
getContract(): stakingManagerV3_jsonContract;
|
|
482
478
|
/**
|
|
483
479
|
* claimStart
|
|
484
480
|
* view
|
|
@@ -583,23 +579,6 @@ export declare class stakingManagerV2_json {
|
|
|
583
579
|
nonce?: number;
|
|
584
580
|
value?: bigint;
|
|
585
581
|
}): Promise<`0x${string}`>;
|
|
586
|
-
/**
|
|
587
|
-
* changeRewardTokensPerBlock
|
|
588
|
-
* nonpayable
|
|
589
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
590
|
-
*/
|
|
591
|
-
changeRewardTokensPerBlock(_rewardTokensPerBlock: bigint, _endBlock: bigint, options?: {
|
|
592
|
-
accessList?: import('viem').AccessList;
|
|
593
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
594
|
-
chain?: import('viem').Chain | null;
|
|
595
|
-
dataSuffix?: `0x${string}`;
|
|
596
|
-
gas?: bigint;
|
|
597
|
-
gasPrice?: bigint;
|
|
598
|
-
maxFeePerGas?: bigint;
|
|
599
|
-
maxPriorityFeePerGas?: bigint;
|
|
600
|
-
nonce?: number;
|
|
601
|
-
value?: bigint;
|
|
602
|
-
}): Promise<`0x${string}`>;
|
|
603
582
|
/**
|
|
604
583
|
* deposit
|
|
605
584
|
* nonpayable
|
|
@@ -821,6 +800,23 @@ export declare class stakingManagerV2_json {
|
|
|
821
800
|
nonce?: number;
|
|
822
801
|
value?: bigint;
|
|
823
802
|
}): Promise<`0x${string}`>;
|
|
803
|
+
/**
|
|
804
|
+
* withdrawToken
|
|
805
|
+
* nonpayable
|
|
806
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
807
|
+
*/
|
|
808
|
+
withdrawToken(_amount: bigint, options?: {
|
|
809
|
+
accessList?: import('viem').AccessList;
|
|
810
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
811
|
+
chain?: import('viem').Chain | null;
|
|
812
|
+
dataSuffix?: `0x${string}`;
|
|
813
|
+
gas?: bigint;
|
|
814
|
+
gasPrice?: bigint;
|
|
815
|
+
maxFeePerGas?: bigint;
|
|
816
|
+
maxPriorityFeePerGas?: bigint;
|
|
817
|
+
nonce?: number;
|
|
818
|
+
value?: bigint;
|
|
819
|
+
}): Promise<`0x${string}`>;
|
|
824
820
|
/**
|
|
825
821
|
* Simulate contract write operations (dry-run without sending transaction)
|
|
826
822
|
*
|
|
@@ -864,23 +860,6 @@ export declare class stakingManagerV2_json {
|
|
|
864
860
|
nonce?: number;
|
|
865
861
|
value?: bigint;
|
|
866
862
|
}): Promise<void>;
|
|
867
|
-
/**
|
|
868
|
-
* Simulate changeRewardTokensPerBlock
|
|
869
|
-
* Returns gas estimate and result without sending transaction
|
|
870
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
871
|
-
*/
|
|
872
|
-
changeRewardTokensPerBlock(_rewardTokensPerBlock: bigint, _endBlock: bigint, options?: {
|
|
873
|
-
accessList?: import("viem").AccessList;
|
|
874
|
-
authorizationList?: import("viem").AuthorizationList;
|
|
875
|
-
chain?: import("viem").Chain | null;
|
|
876
|
-
dataSuffix?: `0x${string}`;
|
|
877
|
-
gas?: bigint;
|
|
878
|
-
gasPrice?: bigint;
|
|
879
|
-
maxFeePerGas?: bigint;
|
|
880
|
-
maxPriorityFeePerGas?: bigint;
|
|
881
|
-
nonce?: number;
|
|
882
|
-
value?: bigint;
|
|
883
|
-
}): Promise<void>;
|
|
884
863
|
/**
|
|
885
864
|
* Simulate deposit
|
|
886
865
|
* Returns gas estimate and result without sending transaction
|
|
@@ -1102,6 +1081,23 @@ export declare class stakingManagerV2_json {
|
|
|
1102
1081
|
nonce?: number;
|
|
1103
1082
|
value?: bigint;
|
|
1104
1083
|
}): Promise<void>;
|
|
1084
|
+
/**
|
|
1085
|
+
* Simulate withdrawToken
|
|
1086
|
+
* Returns gas estimate and result without sending transaction
|
|
1087
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1088
|
+
*/
|
|
1089
|
+
withdrawToken(_amount: bigint, options?: {
|
|
1090
|
+
accessList?: import("viem").AccessList;
|
|
1091
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1092
|
+
chain?: import("viem").Chain | null;
|
|
1093
|
+
dataSuffix?: `0x${string}`;
|
|
1094
|
+
gas?: bigint;
|
|
1095
|
+
gasPrice?: bigint;
|
|
1096
|
+
maxFeePerGas?: bigint;
|
|
1097
|
+
maxPriorityFeePerGas?: bigint;
|
|
1098
|
+
nonce?: number;
|
|
1099
|
+
value?: bigint;
|
|
1100
|
+
}): Promise<void>;
|
|
1105
1101
|
};
|
|
1106
1102
|
/**
|
|
1107
1103
|
* Watch contract events
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.stakingManagerV3_json = exports.stakingManagerV3_jsonAbi = void 0;
|
|
4
4
|
const viem_1 = require("viem");
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* stakingManagerV3_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.stakingManagerV3_jsonAbi = [
|
|
11
11
|
{
|
|
12
12
|
"inputs": [],
|
|
13
13
|
"stateMutability": "nonpayable",
|
|
@@ -148,24 +148,6 @@ exports.stakingManagerV2_jsonAbi = [
|
|
|
148
148
|
"stateMutability": "nonpayable",
|
|
149
149
|
"type": "function"
|
|
150
150
|
},
|
|
151
|
-
{
|
|
152
|
-
"inputs": [
|
|
153
|
-
{
|
|
154
|
-
"internalType": "uint256",
|
|
155
|
-
"name": "_rewardTokensPerBlock",
|
|
156
|
-
"type": "uint256"
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"internalType": "uint256",
|
|
160
|
-
"name": "_endBlock",
|
|
161
|
-
"type": "uint256"
|
|
162
|
-
}
|
|
163
|
-
],
|
|
164
|
-
"name": "changeRewardTokensPerBlock",
|
|
165
|
-
"outputs": [],
|
|
166
|
-
"stateMutability": "nonpayable",
|
|
167
|
-
"type": "function"
|
|
168
|
-
},
|
|
169
151
|
{
|
|
170
152
|
"inputs": [],
|
|
171
153
|
"name": "claimStart",
|
|
@@ -547,10 +529,23 @@ exports.stakingManagerV2_jsonAbi = [
|
|
|
547
529
|
"outputs": [],
|
|
548
530
|
"stateMutability": "nonpayable",
|
|
549
531
|
"type": "function"
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
"inputs": [
|
|
535
|
+
{
|
|
536
|
+
"internalType": "uint256",
|
|
537
|
+
"name": "_amount",
|
|
538
|
+
"type": "uint256"
|
|
539
|
+
}
|
|
540
|
+
],
|
|
541
|
+
"name": "withdrawToken",
|
|
542
|
+
"outputs": [],
|
|
543
|
+
"stateMutability": "nonpayable",
|
|
544
|
+
"type": "function"
|
|
550
545
|
}
|
|
551
546
|
];
|
|
552
547
|
/**
|
|
553
|
-
*
|
|
548
|
+
* stakingManagerV3_json Contract Class
|
|
554
549
|
*
|
|
555
550
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
556
551
|
*
|
|
@@ -558,12 +553,12 @@ exports.stakingManagerV2_jsonAbi = [
|
|
|
558
553
|
* ```typescript
|
|
559
554
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
560
555
|
* import { mainnet } from 'viem/chains';
|
|
561
|
-
* import {
|
|
556
|
+
* import { stakingManagerV3_json } from 'stakingManagerV3_json';
|
|
562
557
|
*
|
|
563
558
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
564
559
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
565
560
|
*
|
|
566
|
-
* const contract = new
|
|
561
|
+
* const contract = new stakingManagerV3_json('0x...', { publicClient, walletClient });
|
|
567
562
|
*
|
|
568
563
|
* // Read functions
|
|
569
564
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -581,13 +576,13 @@ exports.stakingManagerV2_jsonAbi = [
|
|
|
581
576
|
* });
|
|
582
577
|
* ```
|
|
583
578
|
*/
|
|
584
|
-
class
|
|
579
|
+
class stakingManagerV3_json {
|
|
585
580
|
constructor(address, clients) {
|
|
586
581
|
this.contractAddress = address;
|
|
587
582
|
this.publicClient = clients.publicClient;
|
|
588
583
|
this.contract = (0, viem_1.getContract)({
|
|
589
584
|
address,
|
|
590
|
-
abi: exports.
|
|
585
|
+
abi: exports.stakingManagerV3_jsonAbi,
|
|
591
586
|
client: {
|
|
592
587
|
public: clients.publicClient,
|
|
593
588
|
wallet: clients.walletClient,
|
|
@@ -726,17 +721,6 @@ class stakingManagerV2_json {
|
|
|
726
721
|
}
|
|
727
722
|
return this.contract.write.blacklistUsers([_usersToBlacklist], options);
|
|
728
723
|
}
|
|
729
|
-
/**
|
|
730
|
-
* changeRewardTokensPerBlock
|
|
731
|
-
* nonpayable
|
|
732
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
733
|
-
*/
|
|
734
|
-
async changeRewardTokensPerBlock(_rewardTokensPerBlock, _endBlock, options) {
|
|
735
|
-
if (!this.contract.write) {
|
|
736
|
-
throw new Error('Wallet client is required for write operations');
|
|
737
|
-
}
|
|
738
|
-
return this.contract.write.changeRewardTokensPerBlock([_rewardTokensPerBlock, _endBlock], options);
|
|
739
|
-
}
|
|
740
724
|
/**
|
|
741
725
|
* deposit
|
|
742
726
|
* nonpayable
|
|
@@ -880,6 +864,17 @@ class stakingManagerV2_json {
|
|
|
880
864
|
}
|
|
881
865
|
return this.contract.write.withdraw(options);
|
|
882
866
|
}
|
|
867
|
+
/**
|
|
868
|
+
* withdrawToken
|
|
869
|
+
* nonpayable
|
|
870
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
871
|
+
*/
|
|
872
|
+
async withdrawToken(_amount, options) {
|
|
873
|
+
if (!this.contract.write) {
|
|
874
|
+
throw new Error('Wallet client is required for write operations');
|
|
875
|
+
}
|
|
876
|
+
return this.contract.write.withdrawToken([_amount], options);
|
|
877
|
+
}
|
|
883
878
|
/**
|
|
884
879
|
* Simulate contract write operations (dry-run without sending transaction)
|
|
885
880
|
*
|
|
@@ -910,14 +905,6 @@ class stakingManagerV2_json {
|
|
|
910
905
|
async blacklistUsers(_usersToBlacklist, options) {
|
|
911
906
|
return contract.simulate.blacklistUsers([_usersToBlacklist], options);
|
|
912
907
|
},
|
|
913
|
-
/**
|
|
914
|
-
* Simulate changeRewardTokensPerBlock
|
|
915
|
-
* Returns gas estimate and result without sending transaction
|
|
916
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
917
|
-
*/
|
|
918
|
-
async changeRewardTokensPerBlock(_rewardTokensPerBlock, _endBlock, options) {
|
|
919
|
-
return contract.simulate.changeRewardTokensPerBlock([_rewardTokensPerBlock, _endBlock], options);
|
|
920
|
-
},
|
|
921
908
|
/**
|
|
922
909
|
* Simulate deposit
|
|
923
910
|
* Returns gas estimate and result without sending transaction
|
|
@@ -1021,6 +1008,14 @@ class stakingManagerV2_json {
|
|
|
1021
1008
|
*/
|
|
1022
1009
|
async withdraw(options) {
|
|
1023
1010
|
return contract.simulate.withdraw(options);
|
|
1011
|
+
},
|
|
1012
|
+
/**
|
|
1013
|
+
* Simulate withdrawToken
|
|
1014
|
+
* Returns gas estimate and result without sending transaction
|
|
1015
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1016
|
+
*/
|
|
1017
|
+
async withdrawToken(_amount, options) {
|
|
1018
|
+
return contract.simulate.withdrawToken([_amount], options);
|
|
1024
1019
|
}
|
|
1025
1020
|
};
|
|
1026
1021
|
}
|
|
@@ -1047,7 +1042,7 @@ class stakingManagerV2_json {
|
|
|
1047
1042
|
Deposit: (callback, filter) => {
|
|
1048
1043
|
return this.publicClient.watchContractEvent({
|
|
1049
1044
|
address: this.contractAddress,
|
|
1050
|
-
abi: exports.
|
|
1045
|
+
abi: exports.stakingManagerV3_jsonAbi,
|
|
1051
1046
|
eventName: 'Deposit',
|
|
1052
1047
|
args: filter,
|
|
1053
1048
|
onLogs: (logs) => {
|
|
@@ -1066,7 +1061,7 @@ class stakingManagerV2_json {
|
|
|
1066
1061
|
HarvestRewards: (callback, filter) => {
|
|
1067
1062
|
return this.publicClient.watchContractEvent({
|
|
1068
1063
|
address: this.contractAddress,
|
|
1069
|
-
abi: exports.
|
|
1064
|
+
abi: exports.stakingManagerV3_jsonAbi,
|
|
1070
1065
|
eventName: 'HarvestRewards',
|
|
1071
1066
|
args: filter,
|
|
1072
1067
|
onLogs: (logs) => {
|
|
@@ -1085,7 +1080,7 @@ class stakingManagerV2_json {
|
|
|
1085
1080
|
Initialized: (callback) => {
|
|
1086
1081
|
return this.publicClient.watchContractEvent({
|
|
1087
1082
|
address: this.contractAddress,
|
|
1088
|
-
abi: exports.
|
|
1083
|
+
abi: exports.stakingManagerV3_jsonAbi,
|
|
1089
1084
|
eventName: 'Initialized',
|
|
1090
1085
|
onLogs: (logs) => {
|
|
1091
1086
|
logs.forEach((log) => {
|
|
@@ -1103,7 +1098,7 @@ class stakingManagerV2_json {
|
|
|
1103
1098
|
OwnershipTransferred: (callback, filter) => {
|
|
1104
1099
|
return this.publicClient.watchContractEvent({
|
|
1105
1100
|
address: this.contractAddress,
|
|
1106
|
-
abi: exports.
|
|
1101
|
+
abi: exports.stakingManagerV3_jsonAbi,
|
|
1107
1102
|
eventName: 'OwnershipTransferred',
|
|
1108
1103
|
args: filter,
|
|
1109
1104
|
onLogs: (logs) => {
|
|
@@ -1122,7 +1117,7 @@ class stakingManagerV2_json {
|
|
|
1122
1117
|
Withdraw: (callback, filter) => {
|
|
1123
1118
|
return this.publicClient.watchContractEvent({
|
|
1124
1119
|
address: this.contractAddress,
|
|
1125
|
-
abi: exports.
|
|
1120
|
+
abi: exports.stakingManagerV3_jsonAbi,
|
|
1126
1121
|
eventName: 'Withdraw',
|
|
1127
1122
|
args: filter,
|
|
1128
1123
|
onLogs: (logs) => {
|
|
@@ -1135,4 +1130,4 @@ class stakingManagerV2_json {
|
|
|
1135
1130
|
};
|
|
1136
1131
|
}
|
|
1137
1132
|
}
|
|
1138
|
-
exports.
|
|
1133
|
+
exports.stakingManagerV3_json = stakingManagerV3_json;
|
|
@@ -2,11 +2,11 @@ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType }
|
|
|
2
2
|
import { getContract } from 'viem';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* stakingManagerV3_json ABI
|
|
6
6
|
*
|
|
7
7
|
* This ABI is typed using viem's type system for full type safety.
|
|
8
8
|
*/
|
|
9
|
-
export const
|
|
9
|
+
export const stakingManagerV3_jsonAbi = [
|
|
10
10
|
{
|
|
11
11
|
"inputs": [],
|
|
12
12
|
"stateMutability": "nonpayable",
|
|
@@ -147,24 +147,6 @@ export const stakingManagerV2_jsonAbi = [
|
|
|
147
147
|
"stateMutability": "nonpayable",
|
|
148
148
|
"type": "function"
|
|
149
149
|
},
|
|
150
|
-
{
|
|
151
|
-
"inputs": [
|
|
152
|
-
{
|
|
153
|
-
"internalType": "uint256",
|
|
154
|
-
"name": "_rewardTokensPerBlock",
|
|
155
|
-
"type": "uint256"
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"internalType": "uint256",
|
|
159
|
-
"name": "_endBlock",
|
|
160
|
-
"type": "uint256"
|
|
161
|
-
}
|
|
162
|
-
],
|
|
163
|
-
"name": "changeRewardTokensPerBlock",
|
|
164
|
-
"outputs": [],
|
|
165
|
-
"stateMutability": "nonpayable",
|
|
166
|
-
"type": "function"
|
|
167
|
-
},
|
|
168
150
|
{
|
|
169
151
|
"inputs": [],
|
|
170
152
|
"name": "claimStart",
|
|
@@ -546,23 +528,36 @@ export const stakingManagerV2_jsonAbi = [
|
|
|
546
528
|
"outputs": [],
|
|
547
529
|
"stateMutability": "nonpayable",
|
|
548
530
|
"type": "function"
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"inputs": [
|
|
534
|
+
{
|
|
535
|
+
"internalType": "uint256",
|
|
536
|
+
"name": "_amount",
|
|
537
|
+
"type": "uint256"
|
|
538
|
+
}
|
|
539
|
+
],
|
|
540
|
+
"name": "withdrawToken",
|
|
541
|
+
"outputs": [],
|
|
542
|
+
"stateMutability": "nonpayable",
|
|
543
|
+
"type": "function"
|
|
549
544
|
}
|
|
550
545
|
] as const satisfies Abi;
|
|
551
546
|
|
|
552
547
|
/**
|
|
553
|
-
* Type-safe ABI for
|
|
548
|
+
* Type-safe ABI for stakingManagerV3_json
|
|
554
549
|
*/
|
|
555
|
-
export type
|
|
550
|
+
export type stakingManagerV3_jsonAbi = typeof stakingManagerV3_jsonAbi;
|
|
556
551
|
|
|
557
552
|
/**
|
|
558
|
-
* Contract instance type for
|
|
553
|
+
* Contract instance type for stakingManagerV3_json
|
|
559
554
|
*/
|
|
560
555
|
// Use any for contract type to avoid complex viem type issues
|
|
561
556
|
// The runtime behavior is type-safe through viem's ABI typing
|
|
562
|
-
export type
|
|
557
|
+
export type stakingManagerV3_jsonContract = any;
|
|
563
558
|
|
|
564
559
|
/**
|
|
565
|
-
*
|
|
560
|
+
* stakingManagerV3_json Contract Class
|
|
566
561
|
*
|
|
567
562
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
568
563
|
*
|
|
@@ -570,12 +565,12 @@ export type stakingManagerV2_jsonContract = any;
|
|
|
570
565
|
* ```typescript
|
|
571
566
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
572
567
|
* import { mainnet } from 'viem/chains';
|
|
573
|
-
* import {
|
|
568
|
+
* import { stakingManagerV3_json } from 'stakingManagerV3_json';
|
|
574
569
|
*
|
|
575
570
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
576
571
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
577
572
|
*
|
|
578
|
-
* const contract = new
|
|
573
|
+
* const contract = new stakingManagerV3_json('0x...', { publicClient, walletClient });
|
|
579
574
|
*
|
|
580
575
|
* // Read functions
|
|
581
576
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -593,8 +588,8 @@ export type stakingManagerV2_jsonContract = any;
|
|
|
593
588
|
* });
|
|
594
589
|
* ```
|
|
595
590
|
*/
|
|
596
|
-
export class
|
|
597
|
-
private contract:
|
|
591
|
+
export class stakingManagerV3_json {
|
|
592
|
+
private contract: stakingManagerV3_jsonContract;
|
|
598
593
|
private contractAddress: Address;
|
|
599
594
|
private publicClient: PublicClient;
|
|
600
595
|
|
|
@@ -609,7 +604,7 @@ export class stakingManagerV2_json {
|
|
|
609
604
|
this.publicClient = clients.publicClient;
|
|
610
605
|
this.contract = getContract({
|
|
611
606
|
address,
|
|
612
|
-
abi:
|
|
607
|
+
abi: stakingManagerV3_jsonAbi,
|
|
613
608
|
client: {
|
|
614
609
|
public: clients.publicClient,
|
|
615
610
|
wallet: clients.walletClient,
|
|
@@ -627,7 +622,7 @@ export class stakingManagerV2_json {
|
|
|
627
622
|
/**
|
|
628
623
|
* Get the underlying viem contract instance
|
|
629
624
|
*/
|
|
630
|
-
getContract():
|
|
625
|
+
getContract(): stakingManagerV3_jsonContract {
|
|
631
626
|
return this.contract;
|
|
632
627
|
}
|
|
633
628
|
|
|
@@ -789,29 +784,6 @@ export class stakingManagerV2_json {
|
|
|
789
784
|
return this.contract.write.blacklistUsers([_usersToBlacklist] as const, options) as Promise<`0x${string}`>;
|
|
790
785
|
}
|
|
791
786
|
|
|
792
|
-
/**
|
|
793
|
-
* changeRewardTokensPerBlock
|
|
794
|
-
* nonpayable
|
|
795
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
796
|
-
*/
|
|
797
|
-
async changeRewardTokensPerBlock(_rewardTokensPerBlock: bigint, _endBlock: bigint, options?: {
|
|
798
|
-
accessList?: import('viem').AccessList;
|
|
799
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
800
|
-
chain?: import('viem').Chain | null;
|
|
801
|
-
dataSuffix?: `0x${string}`;
|
|
802
|
-
gas?: bigint;
|
|
803
|
-
gasPrice?: bigint;
|
|
804
|
-
maxFeePerGas?: bigint;
|
|
805
|
-
maxPriorityFeePerGas?: bigint;
|
|
806
|
-
nonce?: number;
|
|
807
|
-
value?: bigint;
|
|
808
|
-
}): Promise<`0x${string}`> {
|
|
809
|
-
if (!this.contract.write) {
|
|
810
|
-
throw new Error('Wallet client is required for write operations');
|
|
811
|
-
}
|
|
812
|
-
return this.contract.write.changeRewardTokensPerBlock([_rewardTokensPerBlock, _endBlock] as const, options) as Promise<`0x${string}`>;
|
|
813
|
-
}
|
|
814
|
-
|
|
815
787
|
/**
|
|
816
788
|
* deposit
|
|
817
789
|
* nonpayable
|
|
@@ -1111,6 +1083,29 @@ export class stakingManagerV2_json {
|
|
|
1111
1083
|
return this.contract.write.withdraw(options) as Promise<`0x${string}`>;
|
|
1112
1084
|
}
|
|
1113
1085
|
|
|
1086
|
+
/**
|
|
1087
|
+
* withdrawToken
|
|
1088
|
+
* nonpayable
|
|
1089
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1090
|
+
*/
|
|
1091
|
+
async withdrawToken(_amount: bigint, options?: {
|
|
1092
|
+
accessList?: import('viem').AccessList;
|
|
1093
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1094
|
+
chain?: import('viem').Chain | null;
|
|
1095
|
+
dataSuffix?: `0x${string}`;
|
|
1096
|
+
gas?: bigint;
|
|
1097
|
+
gasPrice?: bigint;
|
|
1098
|
+
maxFeePerGas?: bigint;
|
|
1099
|
+
maxPriorityFeePerGas?: bigint;
|
|
1100
|
+
nonce?: number;
|
|
1101
|
+
value?: bigint;
|
|
1102
|
+
}): Promise<`0x${string}`> {
|
|
1103
|
+
if (!this.contract.write) {
|
|
1104
|
+
throw new Error('Wallet client is required for write operations');
|
|
1105
|
+
}
|
|
1106
|
+
return this.contract.write.withdrawToken([_amount] as const, options) as Promise<`0x${string}`>;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1114
1109
|
|
|
1115
1110
|
|
|
1116
1111
|
/**
|
|
@@ -1165,25 +1160,6 @@ export class stakingManagerV2_json {
|
|
|
1165
1160
|
}): Promise<void> {
|
|
1166
1161
|
return contract.simulate.blacklistUsers([_usersToBlacklist] as const, options) as Promise<void>;
|
|
1167
1162
|
},
|
|
1168
|
-
/**
|
|
1169
|
-
* Simulate changeRewardTokensPerBlock
|
|
1170
|
-
* Returns gas estimate and result without sending transaction
|
|
1171
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1172
|
-
*/
|
|
1173
|
-
async changeRewardTokensPerBlock(_rewardTokensPerBlock: bigint, _endBlock: bigint, options?: {
|
|
1174
|
-
accessList?: import('viem').AccessList;
|
|
1175
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1176
|
-
chain?: import('viem').Chain | null;
|
|
1177
|
-
dataSuffix?: `0x${string}`;
|
|
1178
|
-
gas?: bigint;
|
|
1179
|
-
gasPrice?: bigint;
|
|
1180
|
-
maxFeePerGas?: bigint;
|
|
1181
|
-
maxPriorityFeePerGas?: bigint;
|
|
1182
|
-
nonce?: number;
|
|
1183
|
-
value?: bigint;
|
|
1184
|
-
}): Promise<void> {
|
|
1185
|
-
return contract.simulate.changeRewardTokensPerBlock([_rewardTokensPerBlock, _endBlock] as const, options) as Promise<void>;
|
|
1186
|
-
},
|
|
1187
1163
|
/**
|
|
1188
1164
|
* Simulate deposit
|
|
1189
1165
|
* Returns gas estimate and result without sending transaction
|
|
@@ -1430,6 +1406,25 @@ export class stakingManagerV2_json {
|
|
|
1430
1406
|
value?: bigint;
|
|
1431
1407
|
}): Promise<void> {
|
|
1432
1408
|
return contract.simulate.withdraw(options) as Promise<void>;
|
|
1409
|
+
},
|
|
1410
|
+
/**
|
|
1411
|
+
* Simulate withdrawToken
|
|
1412
|
+
* Returns gas estimate and result without sending transaction
|
|
1413
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1414
|
+
*/
|
|
1415
|
+
async withdrawToken(_amount: bigint, options?: {
|
|
1416
|
+
accessList?: import('viem').AccessList;
|
|
1417
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1418
|
+
chain?: import('viem').Chain | null;
|
|
1419
|
+
dataSuffix?: `0x${string}`;
|
|
1420
|
+
gas?: bigint;
|
|
1421
|
+
gasPrice?: bigint;
|
|
1422
|
+
maxFeePerGas?: bigint;
|
|
1423
|
+
maxPriorityFeePerGas?: bigint;
|
|
1424
|
+
nonce?: number;
|
|
1425
|
+
value?: bigint;
|
|
1426
|
+
}): Promise<void> {
|
|
1427
|
+
return contract.simulate.withdrawToken([_amount] as const, options) as Promise<void>;
|
|
1433
1428
|
}
|
|
1434
1429
|
};
|
|
1435
1430
|
}
|
|
@@ -1457,7 +1452,7 @@ export class stakingManagerV2_json {
|
|
|
1457
1452
|
Deposit: (callback: (event: { user: `0x${string}`; amount: bigint }) => void, filter?: { user: `0x${string}` }) => {
|
|
1458
1453
|
return this.publicClient.watchContractEvent({
|
|
1459
1454
|
address: this.contractAddress,
|
|
1460
|
-
abi:
|
|
1455
|
+
abi: stakingManagerV3_jsonAbi,
|
|
1461
1456
|
eventName: 'Deposit',
|
|
1462
1457
|
args: filter,
|
|
1463
1458
|
onLogs: (logs: any[]) => {
|
|
@@ -1476,7 +1471,7 @@ export class stakingManagerV2_json {
|
|
|
1476
1471
|
HarvestRewards: (callback: (event: { user: `0x${string}`; amount: bigint }) => void, filter?: { user: `0x${string}` }) => {
|
|
1477
1472
|
return this.publicClient.watchContractEvent({
|
|
1478
1473
|
address: this.contractAddress,
|
|
1479
|
-
abi:
|
|
1474
|
+
abi: stakingManagerV3_jsonAbi,
|
|
1480
1475
|
eventName: 'HarvestRewards',
|
|
1481
1476
|
args: filter,
|
|
1482
1477
|
onLogs: (logs: any[]) => {
|
|
@@ -1495,7 +1490,7 @@ export class stakingManagerV2_json {
|
|
|
1495
1490
|
Initialized: (callback: (event: { version: bigint }) => void) => {
|
|
1496
1491
|
return this.publicClient.watchContractEvent({
|
|
1497
1492
|
address: this.contractAddress,
|
|
1498
|
-
abi:
|
|
1493
|
+
abi: stakingManagerV3_jsonAbi,
|
|
1499
1494
|
eventName: 'Initialized',
|
|
1500
1495
|
|
|
1501
1496
|
onLogs: (logs: any[]) => {
|
|
@@ -1514,7 +1509,7 @@ export class stakingManagerV2_json {
|
|
|
1514
1509
|
OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => {
|
|
1515
1510
|
return this.publicClient.watchContractEvent({
|
|
1516
1511
|
address: this.contractAddress,
|
|
1517
|
-
abi:
|
|
1512
|
+
abi: stakingManagerV3_jsonAbi,
|
|
1518
1513
|
eventName: 'OwnershipTransferred',
|
|
1519
1514
|
args: filter,
|
|
1520
1515
|
onLogs: (logs: any[]) => {
|
|
@@ -1533,7 +1528,7 @@ export class stakingManagerV2_json {
|
|
|
1533
1528
|
Withdraw: (callback: (event: { user: `0x${string}`; amount: bigint }) => void, filter?: { user: `0x${string}` }) => {
|
|
1534
1529
|
return this.publicClient.watchContractEvent({
|
|
1535
1530
|
address: this.contractAddress,
|
|
1536
|
-
abi:
|
|
1531
|
+
abi: stakingManagerV3_jsonAbi,
|
|
1537
1532
|
eventName: 'Withdraw',
|
|
1538
1533
|
args: filter,
|
|
1539
1534
|
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.2",
|
|
4
|
+
"description": "Auto-generated TypeScript type bindings for stakingManager (build etherscan-stakingmanager-6475bdeb-1787503825123, commit 4b458ad, 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": "4b458ad"
|
|
43
43
|
}
|