@gitmyabi/stakingmanager 1.0.4 → 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.
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stakingManagerV2_json = exports.stakingManagerV2_jsonAbi = void 0;
3
+ exports.stakingManager_json = exports.stakingManager_jsonAbi = void 0;
4
4
  const viem_1 = require("viem");
5
5
  /**
6
- * stakingManagerV2_json ABI
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.stakingManagerV2_jsonAbi = [
10
+ exports.stakingManager_jsonAbi = [
11
11
  {
12
12
  "inputs": [],
13
13
  "stateMutability": "nonpayable",
@@ -102,39 +102,6 @@ exports.stakingManagerV2_jsonAbi = [
102
102
  "name": "Withdraw",
103
103
  "type": "event"
104
104
  },
105
- {
106
- "inputs": [
107
- {
108
- "internalType": "address",
109
- "name": "_rewardTokenAddress",
110
- "type": "address"
111
- },
112
- {
113
- "internalType": "address",
114
- "name": "_presale",
115
- "type": "address"
116
- },
117
- {
118
- "internalType": "uint256",
119
- "name": "_rewardTokensPerBlock",
120
- "type": "uint256"
121
- },
122
- {
123
- "internalType": "uint256",
124
- "name": "_lockTime",
125
- "type": "uint256"
126
- },
127
- {
128
- "internalType": "uint256",
129
- "name": "_endBlock",
130
- "type": "uint256"
131
- }
132
- ],
133
- "name": "__stakingManager_init",
134
- "outputs": [],
135
- "stateMutability": "nonpayable",
136
- "type": "function"
137
- },
138
105
  {
139
106
  "inputs": [
140
107
  {
@@ -244,6 +211,39 @@ exports.stakingManagerV2_jsonAbi = [
244
211
  "stateMutability": "nonpayable",
245
212
  "type": "function"
246
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
+ },
247
247
  {
248
248
  "inputs": [
249
249
  {
@@ -465,24 +465,6 @@ exports.stakingManagerV2_jsonAbi = [
465
465
  "stateMutability": "view",
466
466
  "type": "function"
467
467
  },
468
- {
469
- "inputs": [
470
- {
471
- "internalType": "address",
472
- "name": "_token",
473
- "type": "address"
474
- },
475
- {
476
- "internalType": "uint256",
477
- "name": "_amount",
478
- "type": "uint256"
479
- }
480
- ],
481
- "name": "tokenTransfer",
482
- "outputs": [],
483
- "stateMutability": "nonpayable",
484
- "type": "function"
485
- },
486
468
  {
487
469
  "inputs": [],
488
470
  "name": "tokensStaked",
@@ -550,7 +532,7 @@ exports.stakingManagerV2_jsonAbi = [
550
532
  }
551
533
  ];
552
534
  /**
553
- * stakingManagerV2_json Contract Class
535
+ * stakingManager_json Contract Class
554
536
  *
555
537
  * Provides a class-based API similar to TypeChain for interacting with the contract.
556
538
  *
@@ -558,12 +540,12 @@ exports.stakingManagerV2_jsonAbi = [
558
540
  * ```typescript
559
541
  * import { createPublicClient, createWalletClient, http } from 'viem';
560
542
  * import { mainnet } from 'viem/chains';
561
- * import { stakingManagerV2_json } from 'stakingManagerV2_json';
543
+ * import { stakingManager_json } from 'stakingManager_json';
562
544
  *
563
545
  * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
564
546
  * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
565
547
  *
566
- * const contract = new stakingManagerV2_json('0x...', { publicClient, walletClient });
548
+ * const contract = new stakingManager_json('0x...', { publicClient, walletClient });
567
549
  *
568
550
  * // Read functions
569
551
  * const result = await contract.balanceOf('0x...');
@@ -581,13 +563,13 @@ exports.stakingManagerV2_jsonAbi = [
581
563
  * });
582
564
  * ```
583
565
  */
584
- class stakingManagerV2_json {
566
+ class stakingManager_json {
585
567
  constructor(address, clients) {
586
568
  this.contractAddress = address;
587
569
  this.publicClient = clients.publicClient;
588
570
  this.contract = (0, viem_1.getContract)({
589
571
  address,
590
- abi: exports.stakingManagerV2_jsonAbi,
572
+ abi: exports.stakingManager_jsonAbi,
591
573
  client: {
592
574
  public: clients.publicClient,
593
575
  wallet: clients.walletClient,
@@ -704,17 +686,6 @@ class stakingManagerV2_json {
704
686
  async userLockedRewards(arg0) {
705
687
  return this.contract.read.userLockedRewards([arg0]);
706
688
  }
707
- /**
708
- * __stakingManager_init
709
- * nonpayable
710
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
711
- */
712
- async __stakingManager_init(_rewardTokenAddress, _presale, _rewardTokensPerBlock, _lockTime, _endBlock, options) {
713
- if (!this.contract.write) {
714
- throw new Error('Wallet client is required for write operations');
715
- }
716
- return this.contract.write.__stakingManager_init([_rewardTokenAddress, _presale, _rewardTokensPerBlock, _lockTime, _endBlock], options);
717
- }
718
689
  /**
719
690
  * blacklistUsers
720
691
  * nonpayable
@@ -759,6 +730,17 @@ class stakingManagerV2_json {
759
730
  }
760
731
  return this.contract.write.harvestRewards(options);
761
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
+ }
762
744
  /**
763
745
  * removeFromBlacklist
764
746
  * nonpayable
@@ -847,17 +829,6 @@ class stakingManagerV2_json {
847
829
  }
848
830
  return this.contract.write.setStakeToken([_stakeToken], options);
849
831
  }
850
- /**
851
- * tokenTransfer
852
- * nonpayable
853
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
854
- */
855
- async tokenTransfer(_token, _amount, options) {
856
- if (!this.contract.write) {
857
- throw new Error('Wallet client is required for write operations');
858
- }
859
- return this.contract.write.tokenTransfer([_token, _amount], options);
860
- }
861
832
  /**
862
833
  * transferOwnership
863
834
  * nonpayable
@@ -894,14 +865,6 @@ class stakingManagerV2_json {
894
865
  throw new Error('Public client is required for simulation');
895
866
  }
896
867
  return {
897
- /**
898
- * Simulate __stakingManager_init
899
- * Returns gas estimate and result without sending transaction
900
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
901
- */
902
- async __stakingManager_init(_rewardTokenAddress, _presale, _rewardTokensPerBlock, _lockTime, _endBlock, options) {
903
- return contract.simulate.__stakingManager_init([_rewardTokenAddress, _presale, _rewardTokensPerBlock, _lockTime, _endBlock], options);
904
- },
905
868
  /**
906
869
  * Simulate blacklistUsers
907
870
  * Returns gas estimate and result without sending transaction
@@ -934,6 +897,14 @@ class stakingManagerV2_json {
934
897
  async harvestRewards(options) {
935
898
  return contract.simulate.harvestRewards(options);
936
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
+ },
937
908
  /**
938
909
  * Simulate removeFromBlacklist
939
910
  * Returns gas estimate and result without sending transaction
@@ -998,14 +969,6 @@ class stakingManagerV2_json {
998
969
  async setStakeToken(_stakeToken, options) {
999
970
  return contract.simulate.setStakeToken([_stakeToken], options);
1000
971
  },
1001
- /**
1002
- * Simulate tokenTransfer
1003
- * Returns gas estimate and result without sending transaction
1004
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1005
- */
1006
- async tokenTransfer(_token, _amount, options) {
1007
- return contract.simulate.tokenTransfer([_token, _amount], options);
1008
- },
1009
972
  /**
1010
973
  * Simulate transferOwnership
1011
974
  * Returns gas estimate and result without sending transaction
@@ -1047,7 +1010,7 @@ class stakingManagerV2_json {
1047
1010
  Deposit: (callback, filter) => {
1048
1011
  return this.publicClient.watchContractEvent({
1049
1012
  address: this.contractAddress,
1050
- abi: exports.stakingManagerV2_jsonAbi,
1013
+ abi: exports.stakingManager_jsonAbi,
1051
1014
  eventName: 'Deposit',
1052
1015
  args: filter,
1053
1016
  onLogs: (logs) => {
@@ -1066,7 +1029,7 @@ class stakingManagerV2_json {
1066
1029
  HarvestRewards: (callback, filter) => {
1067
1030
  return this.publicClient.watchContractEvent({
1068
1031
  address: this.contractAddress,
1069
- abi: exports.stakingManagerV2_jsonAbi,
1032
+ abi: exports.stakingManager_jsonAbi,
1070
1033
  eventName: 'HarvestRewards',
1071
1034
  args: filter,
1072
1035
  onLogs: (logs) => {
@@ -1085,7 +1048,7 @@ class stakingManagerV2_json {
1085
1048
  Initialized: (callback) => {
1086
1049
  return this.publicClient.watchContractEvent({
1087
1050
  address: this.contractAddress,
1088
- abi: exports.stakingManagerV2_jsonAbi,
1051
+ abi: exports.stakingManager_jsonAbi,
1089
1052
  eventName: 'Initialized',
1090
1053
  onLogs: (logs) => {
1091
1054
  logs.forEach((log) => {
@@ -1103,7 +1066,7 @@ class stakingManagerV2_json {
1103
1066
  OwnershipTransferred: (callback, filter) => {
1104
1067
  return this.publicClient.watchContractEvent({
1105
1068
  address: this.contractAddress,
1106
- abi: exports.stakingManagerV2_jsonAbi,
1069
+ abi: exports.stakingManager_jsonAbi,
1107
1070
  eventName: 'OwnershipTransferred',
1108
1071
  args: filter,
1109
1072
  onLogs: (logs) => {
@@ -1122,7 +1085,7 @@ class stakingManagerV2_json {
1122
1085
  Withdraw: (callback, filter) => {
1123
1086
  return this.publicClient.watchContractEvent({
1124
1087
  address: this.contractAddress,
1125
- abi: exports.stakingManagerV2_jsonAbi,
1088
+ abi: exports.stakingManager_jsonAbi,
1126
1089
  eventName: 'Withdraw',
1127
1090
  args: filter,
1128
1091
  onLogs: (logs) => {
@@ -1135,4 +1098,4 @@ class stakingManagerV2_json {
1135
1098
  };
1136
1099
  }
1137
1100
  }
1138
- exports.stakingManagerV2_json = stakingManagerV2_json;
1101
+ exports.stakingManager_json = stakingManager_json;