Skip to content

Reward calls reference

uprendis edited this page Mar 25, 2021 · 1 revision

Reward calls

Claim rewards

Claim earned rewards. The rewards will be transferred to the account.

// check you have rewards to claim:
sfcc.pendingRewards("0xAddress", validatorID) // returns: rewards amount
// claim rewards:
sfcc.claimRewards(validatorID, {from: "0xAddress"})

Checks

  • Delegation pendingRewards is greater than zero

Claim rewards

Restake earned rewards. Rewards will be added to the stake amount.

If a part of the reward received for locked up stake, then this reward will be added to the locked stake.

// check you have rewards to claim:
sfcc.pendingRewards("0xAddress", validatorID) // returns: rewards amount
// restaje rewards:
sfcc.restakeRewards(validatorID, {from: "0xAddress"})

Checks

  • Delegation pendingRewards is greater than zero
  • Validator's stake is less or equal to 16.0 * validator's self-stake
Clone this wiki locally