Function pallet_capacity::pallet::dispatchables::unstake
source · 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
ifamount
is not greater than zero. - Returns
Error::MaxUnlockingChunksExceeded
if attempting to unlock more times than config::MaxUnlockingChunks. - Returns
Error::AmountToUnstakeExceedsAmountStaked
ifamount
exceeds the amount currently staked. - Returns
Error::InvalidTarget
iftarget
is not a valid staking target (not a Provider) - Returns
Error::NotAStakingAccount
iforigin
has nothing staked at all - Returns
Error::StakerTargetRelationshipNotFound
iforigin
has 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
.