Function parachain_staking::pallet::dispatchables::join_delegators
source · pub fn join_delegators<T: Config>(
collator: <T::Lookup as StaticLookup>::Source,
amount: <<T as Config>::Currency as Inspect<<T as Config>::AccountId>>::Balance
)
Expand description
Join the set of delegators by delegating to a collator candidate.
The account that wants to delegate cannot be part of the collator candidates set as well.
The caller must not have a delegation. If that is the case, they are required to first remove the delegation.
The amount staked must be larger than the minimum required to become a delegator as set in the pallet’s configuration.
As only MaxDelegatorsPerCollator
are allowed to delegate a given
collator, the amount staked must be larger than the lowest one in
the current set of delegator for the operation to be meaningful.
The collator’s total stake as well as the pallet’s total stake are increased accordingly.
Emits Delegation
.
Emits DelegationReplaced
if the candidate has
MaxDelegatorsPerCollator
many delegations but this delegator
staked more than one of the other delegators of this candidate.
Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::join_delegators
.