Function pallet_democracy::pallet::dispatchables::delegate
source · pub fn delegate<T: Config>(
to: <<T as Config>::Lookup as StaticLookup>::Source,
conviction: Conviction,
balance: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance
)
Expand description
Delegate the voting power (with some given conviction) of the sending account.
The balance delegated is locked for as long as it’s delegated, and thereafter for the time appropriate for the conviction’s lock period.
The dispatch origin of this call must be Signed, and the signing account must either:
-
be delegating already; or
-
have no voting activity (if there is, then it will need to be removed/consolidated through
reap_vote
orunvote
). -
to
: The account whose voting thetarget
account’s voting power will follow. -
conviction
: The conviction that will be attached to the delegated votes. When the account is undelegated, the funds will be locked for the corresponding period. -
balance
: The amount of the account’s balance to be used in delegating. This must not be more than the account’s current balance.
Emits Delegated
.
Weight: O(R)
where R is the number of referendums the voter delegating to has
voted on. Weight is charged as if maximum votes.
Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::delegate
.