k2NativeDelegationRSTIncentives sub-class
The following readme describes all the functions and their parameters exposed by the k2NativeDelegationRSTIncentives
class of the K2 SDK. This sub-class contains all the important functions from the K2 Native Delegation RST Incentives contract of the K2 Lending protocol.
poolLength function
Get the length of the pool.
Using poolLength function
Return Parameter
Returns the length of the pool.
poolIdByRewardToken function
Get pool ID by the reward token.
Input Parameters
rewardToken: The RST reward token address.
Using poolIdByRewardToken function
Return Parameter
Return the pool ID for the RST reward token.
getRewardFromLastBlock function
Get the rewards from the last given block.
Input Parameters
poolId: The pool ID for the RST token
lastBlock: The last block number
Using getRewardFromLastBlock function
Return Parameter
Returns the rewards received from the last given block.
pendingRewards function
Get the pending rewards of a user.
Input Parameters
poolId: The pool ID for the RST token
user: The user’s ETH Address
Using pendingRewards function
Return Parameter
Returns the pending rewards of the user.
massUpdatePools function
Update all the pools.
Using massUpdatePools function
Return Parameter
Transaction details if the transaction was successful.
updatePool function
Update pool for the given pool ID.
Input Parameters
poolId: The pool ID for the pool to be updated.
Using updatePool function
Return Parameter
Transaction details if the transaction was successful.
nativeDelegationDeposit function
Farming deposit with native delegation.
Input Parameters
poolId: The pool ID
Using nativeDelegationDeposit function
Return Parameter
Transaction details if the transaction was successful.
deposit function
K2 LP farming deposit function.
Input Parameters
poolId: The pool ID to be withdrawn from
amount: The withdraw amount
Using deposit function
Return Parameter
Transaction details if the transaction was successful.
nativeDelegationWithdraw function
Withdraw all the native delegation from a pool.
Input Parameters
poolId: The pool ID for the pool to be updated.
Using nativeDelegationWithdraw function
Return Parameter
Transaction details if the transaction was successful.
withdraw function
Withdraw the K2 LP tokens.
Input Parameters
poolId: The pool ID to be withdrawn from
amount: The withdraw amount
Using withdraw function
Return Parameter
Transaction details if the transaction was successful.
claim function
Claim the pending BSN tokens.
Input Parameters
poolId: The pool ID to claim from
Using claim function
Return Parameter
Transaction details if the transaction was successful.
forceWithdraw function
Force withdraw K2 LP without rewards.
Input Parameters
poolId: The pool ID to withdraw from
Using forceWithdraw function
Return Parameter
Transaction details if the transaction was successful.
forceWithdrawNativeDelegation function
Force withdraw K2 LP without rewards for native delegation farmers.
Input Parameters
poolId: The pool ID to withdraw from
Using forceWithdrawNativeDelegation function
Return Parameter
Transaction details if the transaction was successful.