@uniswap/v3-sdk / Exports / Staker
Class: Staker
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• Protected new Staker()
Defined in
Properties
INCENTIVE_KEY_ABI
▪ Static Private INCENTIVE_KEY_ABI: string = 'tuple(address rewardToken, address pool, uint256 startTime, uint256 endTime, address refundee)'
Defined in
INTERFACE
▪ Static INTERFACE: Interface
Defined in
Methods
_encodeIncentiveKey
▸ Static Private _encodeIncentiveKey(incentiveKey): Object
Parameters
| Name | Type | Description |
|---|---|---|
incentiveKey | IncentiveKey | An IncentiveKey which represents a unique staking program. |
Returns
Object
An encoded IncentiveKey to be read by ethers
Defined in
collectRewards
▸ Static collectRewards(incentiveKeys, options): MethodParameters
Note: A tokenId can be staked in many programs but to claim rewards and continue the program you must unstake, claim, and then restake.
Parameters
| Name | Type | Description |
|---|---|---|
incentiveKeys | IncentiveKey | IncentiveKey[] | An IncentiveKey or array of IncentiveKeys that tokenId is staked in. Input an array of IncentiveKeys to claim rewards for each program. |
options | ClaimOptions | ClaimOptions to specify tokenId, recipient, and amount wanting to collect. Note that you can only specify one amount and one recipient across the various programs if you are collecting from multiple programs at once. |
Returns
Defined in
encodeClaim
▸ Static Private encodeClaim(incentiveKey, options): string[]
To claim rewards, must unstake and then claim.
Parameters
| Name | Type | Description |
|---|---|---|
incentiveKey | IncentiveKey | The unique identifier of a staking program. |
options | ClaimOptions | Options for producing the calldata to claim. Can't claim unless you unstake. |
Returns
string[]
The calldatas for 'unstakeToken' and 'claimReward'.