import { StakingInitializable, StakingFactory } from '../contracts'; import { ContractTransaction } from 'ethers'; export declare class Staking { staking: StakingInitializable; constructor(routerAddress: string, privKey: string, rpcURL: string); /** * A function to initiate Staking Factory contract instance * @param {string} factoryAddress - address of staking factory contract. * @param {string} privKey - private key of signer account. * @param {string} rpcURL - RPC URL of blockchain provider. * @return {StakingFactory} - instance of staking factory contract. */ static FACTORY(factoryAddress: string, privKey: string, rpcURL: string): StakingFactory; /** * A function to deposit given amount of Staked Token in given Staking Pool contract. * @param {string} amount - amount of the KIP7 token (stakedToken) going to be staked. * @return {Promise} - ContractTransaction object. */ deposit(amount: string): Promise; /** * A function to withdraw Staked tokens from given Staking pool contract * @param {string} amount - amount of the Staked Token (KIP7 token) going to be withdrawn. * @return {Promise} - ContractTransaction object. */ withdraw(amount: string): Promise; /** * A function to emergency withdraw funds from given Staking Pool contract. * @return {Promise} - ContractReceipt object. */ emergencyWithdraw(): Promise; /** * A function that encodes all the details required to deploy a new Staking Pool. * @notice - Output of this function should be submitted to MULTISIG contract * @param {StakingFactory} factory - Staking Factory contract's instance. * @param {string} stakedTokenAddress - Address of the KIP7 token which will be staked in this Staking Pool. * @param {string} rewardTokenAddress - Address of the KIP7 token in which stakers will get their reward. * @param {string} rewardPerBlock - Number of tokens to be rewarded per block (in rewardToken) * @param {string} startBlock - Block number from where staking will get started. * @param {string} rewardEndBlock - Block number at which reward distribution will get ended. * @param {string} poolLimitPerUser - pool limit per user in stakedToken (if any, else 0). * @param {string} numberBlocksForUserLimit - block numbers available for user limit (after start block). * @param {string} multiSigAddress - MULTISIG contract address. * @return {string} - encoded raw transaction data to be submitted & executed by Multisig contract. */ static deployPool(factory: StakingFactory, stakedTokenAddress: string, rewardTokenAddress: string, rewardPerBlock: string, startBlock: string, rewardEndBlock: string, poolLimitPerUser: string, numberBlocksForUserLimit: string, multiSigAddress: string): string; /** * A function that encodes all the details required to emergency withdraw funds from given staking pool contract. * @notice - Output of this function should be submitted to MULTISIG contract * @param {string} amount - amount of staked token to be withdrawn. * @param {string} recipient - address of recipient account to whom staked tokens should be sent. * @return {Promise} - encoded raw transaction data to be submitted & executed by Multisig contract. */ emergencyRewardWithdraw(amount: string, recipient: string): Promise; /** * A function that encodes all the details required to recover token (unintentionally transferred) from given staking pool contract. * @notice - Output of this function should be submitted to MULTISIG contract * @param {string} token - KIP7 token's address which is to be recovered. * @param {string} recipient - address of recipient account to whom recovered tokens should be sent. * @return {Promise} - encoded raw transaction data to be submitted & executed by Multisig contract. */ recoverToken(token: string, recipient: string): Promise; /** * A function that encodes all the details required to stop reward distribution in given staking pool contract. * @notice - Output of this function should be submitted to MULTISIG contract * @return {Promise} - encoded raw transaction data to be submitted & executed by Multisig contract. */ stopReward(): Promise; /** * A function that encodes all the details required to update pool limit in given staking pool contract. * @notice - Output of this function should be submitted to MULTISIG contract * @param {boolean} userLimit - whether the limit remains forced. * @param {string} poolLimit - new pool limit per user. * @return {Promise} - encoded raw transaction data to be submitted & executed by Multisig contract. */ updatePoolLimitPerUser(userLimit: boolean, poolLimit: string): Promise; /** * A function that encodes all the details required to update reward per block in given staking pool contract. * @notice - Output of this function should be submitted to MULTISIG contract * @param {string} rewardPerBlock - new reward per block to be set. * @return {Promise} - encoded raw transaction data to be submitted & executed by Multisig contract. */ updateRewardPerBlock(rewardPerBlock: string): Promise; /** * A function that encodes all the details required to update start and end blocks in given staking pool contract. * @notice - Output of this function should be submitted to MULTISIG contract * @param {string} startRewardBlock - new starting reward block number. * @param {string} rewardEndBlock - new ending reward block number. * @return {Promise} - encoded raw transaction data to be submitted & executed by Multisig contract. */ updateStartAndEndBlocks(startRewardBlock: string, rewardEndBlock: string): Promise; /** * A getter function to return Staking contract's instance * @return {StakingInitializable} - Staking contract's instance. */ getStaking(): StakingInitializable; }