pub fn unstake<T: Config>(smart_contract: T::SmartContract, amount: Balance)
Expand description

Unstake the specified amount from a smart contract. The amount specified must not exceed what’s staked, otherwise the call will fail.

If unstaking the specified amount would take staker below the minimum stake threshold, everything is unstaked.

Depending on the period type, appropriate stake amount will be updated. In case amount is unstaked during Voting subperiod, the voting amount is reduced. In case amount is unstaked during Build&Earn subperiod, first the build_and_earn is reduced, and any spillover is subtracted from the voting amount.

§Warning: Doc-Only

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