pub fn unstake<T: Config>(
    target: MessageSourceId,
    requested_amount: <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance
)
Expand description

Schedules an amount of the stake to be unlocked.

Errors

  • Returns Error::UnstakedAmountIsZero if amount is not greater than zero.
  • Returns Error::MaxUnlockingChunksExceeded if attempting to unlock more times than config::MaxUnlockingChunks.
  • Returns Error::AmountToUnstakeExceedsAmountStaked if amount exceeds the amount currently staked.
  • Returns Error::InvalidTarget if target is not a valid staking target (not a Provider)
  • Returns Error:: NotAStakingAccount if origin has nothing staked at all
  • Returns Error::StakerTargetRelationshipNotFound if origin has nothing staked to target

Warning: Doc-Only

This function is an automatically generated, and is doc-only, uncallable stub. See the real version in Pallet::unstake.