Class: StakingPoolService
modules/staking.StakingPoolService
Abstraction over staking pool smart contract
Table of contents
Constructors
Methods
- checkReward
- getContributionLimit
- getEnd
- getHardCap
- getRatio
- getStake
- getStart
- getTotalStaked
- partialWithdraw
- putStake
- withdraw
Constructors
constructor
• new StakingPoolService(signerService
, address
)
Parameters
Name | Type |
---|---|
signerService |
SignerService |
address |
string |
Methods
checkReward
▸ checkReward(): Promise
<BigNumber
>
Accumulated reward
Returns
Promise
<BigNumber
>
getContributionLimit
▸ getContributionLimit(): Promise
<BigNumber
>
Returns
Promise
<BigNumber
>
getEnd
▸ getEnd(): Promise
<BigNumber
>
Returns
Promise
<BigNumber
>
getHardCap
▸ getHardCap(): Promise
<BigNumber
>
Returns
Promise
<BigNumber
>
getRatio
▸ getRatio(): Promise
<BigNumber
>
Returns
Promise
<BigNumber
>
getStake
▸ getStake(): Promise
<Stake
>
Returns
Promise
<Stake
>
Stake
getStart
▸ getStart(): Promise
<BigNumber
>
Returns
Promise
<BigNumber
>
getTotalStaked
▸ getTotalStaked(): Promise
<BigNumber
>
Returns
Promise
<BigNumber
>
partialWithdraw
▸ partialWithdraw(value
): Promise
<ContractReceipt
>
Parameters
Name | Type |
---|---|
value |
number | BigNumber |
Returns
Promise
<ContractReceipt
>
Description
putStake
▸ putStake(stake
): Promise
<void
>
Parameters
Name | Type |
---|---|
stake |
number | BigNumber |
Returns
Promise
<void
>
Description
Locks stake and starts accumulating reward
Emits
StakingPool.StakePut
withdraw
▸ withdraw(): Promise
<void
>
Returns
Promise
<void
>
Description
pays back stake with accumulated reward.