[][src]Enum pallet_democracy::Call

pub enum Call<T: Trait> {
    propose(T::Hash, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance),
    second(PropIndexu32),
    vote(ReferendumIndexAccountVote<<<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance>),
    emergency_cancel(ReferendumIndex),
    external_propose(T::Hash),
    external_propose_majority(T::Hash),
    external_propose_default(T::Hash),
    fast_track(T::Hash, T::BlockNumber, T::BlockNumber),
    veto_external(T::Hash),
    cancel_referendum(ReferendumIndex),
    cancel_queued(ReferendumIndex),
    delegate(T::AccountIdConviction, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance),
    undelegate(),
    clear_public_proposals(),
    note_preimage(Vec<u8>),
    note_preimage_operational(Vec<u8>),
    note_imminent_preimage(Vec<u8>),
    note_imminent_preimage_operational(Vec<u8>),
    reap_preimage(T::Hashu32),
    unlock(T::AccountId),
    remove_vote(ReferendumIndex),
    remove_other_vote(T::AccountIdReferendumIndex),
    enact_proposal(T::HashReferendumIndex),
    // some variants omitted
}

Dispatchable calls.

Each variant of this enum maps to a dispatchable function from the associated module.

Variants

propose(T::Hash, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance)

Propose a sensitive action to be taken.

The dispatch origin of this call must be Signed and the sender must have funds to cover the deposit.

Emits Proposed.

second(PropIndexu32)

Signals agreement with a particular proposal.

The dispatch origin of this call must be Signed and the sender must have funds to cover the deposit, equal to the original deposit.

vote(ReferendumIndexAccountVote<<<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance>)

Vote in a referendum. If vote.is_aye(), the vote is to enact the proposal; otherwise it is a vote to keep the status quo.

The dispatch origin of this call must be Signed.

emergency_cancel(ReferendumIndex)

Schedule an emergency cancellation of a referendum. Cannot happen twice to the same referendum.

The dispatch origin of this call must be CancellationOrigin.

-ref_index: The index of the referendum to cancel.

external_propose(T::Hash)

Schedule a referendum to be tabled once it is legal to schedule an external referendum.

The dispatch origin of this call must be ExternalOrigin.

external_propose_majority(T::Hash)

Schedule a majority-carries referendum to be tabled next once it is legal to schedule an external referendum.

The dispatch of this call must be ExternalMajorityOrigin.

Unlike external_propose, blacklisting has no effect on this and it may replace a pre-scheduled external_propose call.

external_propose_default(T::Hash)

Schedule a negative-turnout-bias referendum to be tabled next once it is legal to schedule an external referendum.

The dispatch of this call must be ExternalDefaultOrigin.

Unlike external_propose, blacklisting has no effect on this and it may replace a pre-scheduled external_propose call.

fast_track(T::Hash, T::BlockNumber, T::BlockNumber)

Schedule the currently externally-proposed majority-carries referendum to be tabled immediately. If there is no externally-proposed referendum currently, or if there is one but it is not a majority-carries referendum then it fails.

The dispatch of this call must be FastTrackOrigin.

Emits Started.

veto_external(T::Hash)

Veto and blacklist the external proposal hash.

The dispatch origin of this call must be VetoOrigin.

Emits Vetoed.

cancel_referendum(ReferendumIndex)

Remove a referendum.

The dispatch origin of this call must be Root.

cancel_queued(ReferendumIndex)

Cancel a proposal queued for enactment.

The dispatch origin of this call must be Root.

delegate(T::AccountIdConviction, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance)

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:

Emits Delegated.

undelegate()

Undelegate the voting power of the sending account.

Tokens may be unlocked following once an amount of time consistent with the lock period of the conviction with which the delegation was issued.

The dispatch origin of this call must be Signed and the signing account must be currently delegating.

Emits Undelegated.

clear_public_proposals()

Clears all public proposals.

The dispatch origin of this call must be Root.

note_preimage(Vec<u8>)

Register the preimage for an upcoming proposal. This doesn't require the proposal to be in the dispatch queue but does require a deposit, returned once enacted.

The dispatch origin of this call must be Signed.

Emits PreimageNoted.

note_preimage_operational(Vec<u8>)

Same as note_preimage but origin is OperationalPreimageOrigin.

note_imminent_preimage(Vec<u8>)

Register the preimage for an upcoming proposal. This requires the proposal to be in the dispatch queue. No deposit is needed. When this call is successful, i.e. the preimage has not been uploaded before and matches some imminent proposal, no fee is paid.

The dispatch origin of this call must be Signed.

Emits PreimageNoted.

note_imminent_preimage_operational(Vec<u8>)

Same as note_imminent_preimage but origin is OperationalPreimageOrigin.

reap_preimage(T::Hashu32)

Remove an expired proposal preimage and collect the deposit.

The dispatch origin of this call must be Signed.

This will only work after VotingPeriod blocks from the time that the preimage was noted, if it's the same account doing it. If it's a different account, then it'll only work an additional EnactmentPeriod later.

Emits PreimageReaped.

unlock(T::AccountId)

Unlock tokens that have an expired lock.

The dispatch origin of this call must be Signed.

remove_vote(ReferendumIndex)

Remove a vote for a referendum.

If:

If, however, the referendum has ended and:

The dispatch origin of this call must be Signed, and the signer must have a vote registered for referendum index.

remove_other_vote(T::AccountIdReferendumIndex)

Remove a vote for a referendum.

If the target is equal to the signer, then this function is exactly equivalent to remove_vote. If not equal to the signer, then the vote must have expired, either because the referendum was cancelled, because the voter lost the referendum or because the conviction period is over.

The dispatch origin of this call must be Signed.

enact_proposal(T::HashReferendumIndex)

Enact a proposal from a referendum. For now we just make the weight be the maximum.

Trait Implementations

impl<T: Trait> Clone for Call<T>[src]

impl<T: Trait> Debug for Call<T>[src]

impl<T: Trait> Decode for Call<T> where
    T::Hash: Decode,
    T::Hash: Decode,
    AccountVote<<<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance>: Decode,
    AccountVote<<<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance>: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::BlockNumber: Decode,
    T::BlockNumber: Decode,
    T::BlockNumber: Decode,
    T::BlockNumber: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance: Decode,
    <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::AccountId: Decode,
    T::Hash: Decode,
    T::Hash: Decode,
    <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance: HasCompact
[src]

impl<T: Trait> Encode for Call<T> where
    T::Hash: Encode,
    T::Hash: Encode,
    AccountVote<<<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance>: Encode,
    AccountVote<<<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance>: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    T::BlockNumber: Encode,
    T::BlockNumber: Encode,
    T::BlockNumber: Encode,
    T::BlockNumber: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    T::AccountId: Encode,
    T::AccountId: Encode,
    <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance: Encode,
    <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    T::AccountId: Encode,
    T::AccountId: Encode,
    T::AccountId: Encode,
    T::AccountId: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance: HasCompact
[src]

impl<T: Trait> EncodeLike<Call<T>> for Call<T> where
    T::Hash: Encode,
    T::Hash: Encode,
    AccountVote<<<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance>: Encode,
    AccountVote<<<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance>: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    T::BlockNumber: Encode,
    T::BlockNumber: Encode,
    T::BlockNumber: Encode,
    T::BlockNumber: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    T::AccountId: Encode,
    T::AccountId: Encode,
    <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance: Encode,
    <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    T::AccountId: Encode,
    T::AccountId: Encode,
    T::AccountId: Encode,
    T::AccountId: Encode,
    T::Hash: Encode,
    T::Hash: Encode,
    <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance: HasCompact
[src]

impl<T: Trait> Eq for Call<T>[src]

impl<T: Trait> GetCallName for Call<T>[src]

impl<T: Trait> GetDispatchInfo for Call<T>[src]

impl<T: Trait> PartialEq<Call<T>> for Call<T>[src]

impl<T: Trait> UnfilteredDispatchable for Call<T>[src]

type Origin = T::Origin

The origin type of the runtime, (i.e. frame_system::Trait::Origin).

Auto Trait Implementations

impl<T> RefUnwindSafe for Call<T> where
    T: RefUnwindSafe,
    <T as Trait>::AccountId: RefUnwindSafe,
    <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance: RefUnwindSafe,
    <T as Trait>::BlockNumber: RefUnwindSafe,
    <T as Trait>::Currency: Currency<<T as Trait>::AccountId>,
    <T as Trait>::Hash: RefUnwindSafe

impl<T> Send for Call<T> where
    T: Send,
    <T as Trait>::AccountId: Send,
    <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance: Send,
    <T as Trait>::BlockNumber: Send,
    <T as Trait>::Currency: Currency<<T as Trait>::AccountId>,
    <T as Trait>::Hash: Send

impl<T> Sync for Call<T> where
    T: Sync,
    <T as Trait>::AccountId: Sync,
    <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance: Sync,
    <T as Trait>::BlockNumber: Sync,
    <T as Trait>::Currency: Currency<<T as Trait>::AccountId>,
    <T as Trait>::Hash: Sync

impl<T> Unpin for Call<T> where
    T: Unpin,
    <T as Trait>::AccountId: Unpin,
    <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance: Unpin,
    <T as Trait>::BlockNumber: Unpin,
    <T as Trait>::Currency: Currency<<T as Trait>::AccountId>,
    <T as Trait>::Hash: Unpin

impl<T> UnwindSafe for Call<T> where
    T: UnwindSafe,
    <T as Trait>::AccountId: UnwindSafe,
    <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance: UnwindSafe,
    <T as Trait>::BlockNumber: UnwindSafe,
    <T as Trait>::Currency: Currency<<T as Trait>::AccountId>,
    <T as Trait>::Hash: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedConversion for T[src]

impl<S> Codec for S where
    S: Encode + Decode
[src]

impl<T, X> Decode for X where
    T: Decode + Into<X>,
    X: WrapperTypeDecode<Wrapped = T>, 
[src]

impl<T> DecodeAll for T where
    T: Decode
[src]

impl<T> DecodeLimit for T where
    T: Decode
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T, X> Encode for X where
    T: Encode + ?Sized,
    X: WrapperTypeEncode<Target = T>, 
[src]

impl<'_, '_, T> EncodeLike<&'_ &'_ T> for T where
    T: Encode
[src]

impl<'_, T> EncodeLike<&'_ T> for T where
    T: Encode
[src]

impl<'_, T> EncodeLike<&'_ mut T> for T where
    T: Encode
[src]

impl<T> EncodeLike<Arc<T>> for T where
    T: Encode
[src]

impl<T> EncodeLike<Box<T>> for T where
    T: Encode
[src]

impl<'a, T> EncodeLike<Cow<'a, T>> for T where
    T: Encode + ToOwned
[src]

impl<T> EncodeLike<Rc<T>> for T where
    T: Encode
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<S> FullCodec for S where
    S: Decode + FullEncode
[src]

impl<S> FullEncode for S where
    S: Encode + EncodeLike<S>, 
[src]

impl<T> Hashable for T where
    T: Codec
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IsType<T> for T[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    Outer: AsRef<T> + AsMut<T> + From<T>,
    T: From<Outer>, 
[src]

fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> KeyedVec for T where
    T: Codec
[src]

impl<T> MaybeDebug for T where
    T: Debug
[src]

impl<T> MaybeDebug for T where
    T: Debug
[src]

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe
[src]

impl<T> Member for T where
    T: 'static + Clone + PartialEq<T> + Eq + Send + Sync + Debug
[src]

impl<T> Parameter for T where
    T: Codec + EncodeLike<T> + Clone + Eq + Debug
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> SaturatedConversion for T[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T, S> UniqueSaturatedInto<T> for S where
    S: TryInto<T>,
    T: Bounded
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]