Function polkadot_runtime_common::crowdloan::pallet::dispatchables::withdraw
source · pub fn withdraw<T: Config>(who: T::AccountId, index: Id)
Expand description
Withdraw full balance of a specific contributor.
Origin must be signed, but can come from anyone.
The fund must be either in, or ready for, retirement. For a fund to be in retirement, then the retirement flag must be set. For a fund to be ready for retirement, then:
- it must not already be in retirement;
- the amount of raised funds must be bigger than the free balance of the account;
- and either:
- the block number must be at least
end
; or - the current lease period must be greater than the fund’s
last_period
.
- the block number must be at least
In this case, the fund’s retirement flag is set and its end
is reset to the current
block number.
who
: The account whose contribution should be withdrawn.index
: The parachain to whose crowdloan the contribution was made.
§Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::withdraw
.