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::UnstakedAmountIsZeroifamountis not greater than zero. - Returns
Error::MaxUnlockingChunksExceededif attempting to unlock more times than config::MaxUnlockingChunks. - Returns
Error::AmountToUnstakeExceedsAmountStakedifamountexceeds the amount currently staked. - Returns
Error::InvalidTargetiftargetis not a valid staking target (not a Provider) - Returns
Error::NotAStakingAccountiforiginhas nothing staked at all - Returns
Error::StakerTargetRelationshipNotFoundiforiginhas nothing staked totarget
§Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::unstake.