pub type ReferendumStatusOf<T, I> = ReferendumStatus<TrackIdOf<T, I>, PalletsOriginOf<T>, BlockNumberFor<T, I>, BoundedCallOf<T, I>, BalanceOf<T, I>, TallyOf<T, I>, <T as Config>::AccountId, ScheduleAddressOf<T, I>>;
Aliased Type§
struct ReferendumStatusOf<T, I> {
pub track: <<T as Config<I>>::Tracks as TracksInfo<<<T as Config<I>>::Currency as Currency<<T as Config>::AccountId>>::Balance, <<T as Config<I>>::BlockNumberProvider as BlockNumberProvider>::BlockNumber>>::Id,
pub origin: <<T as Config>::RuntimeOrigin as OriginTrait>::PalletsOrigin,
pub proposal: Bounded<<T as Config<I>>::RuntimeCall, <T as Config>::Hashing>,
pub enactment: DispatchTime<<<T as Config<I>>::BlockNumberProvider as BlockNumberProvider>::BlockNumber>,
pub submitted: <<T as Config<I>>::BlockNumberProvider as BlockNumberProvider>::BlockNumber,
pub submission_deposit: Deposit<<T as Config>::AccountId, <<T as Config<I>>::Currency as Currency<<T as Config>::AccountId>>::Balance>,
pub decision_deposit: Option<Deposit<<T as Config>::AccountId, <<T as Config<I>>::Currency as Currency<<T as Config>::AccountId>>::Balance>>,
pub deciding: Option<DecidingStatus<<<T as Config<I>>::BlockNumberProvider as BlockNumberProvider>::BlockNumber>>,
pub tally: <T as Config<I>>::Tally,
pub in_queue: bool,
pub alarm: Option<(<<T as Config<I>>::BlockNumberProvider as BlockNumberProvider>::BlockNumber, <<T as Config<I>>::Scheduler as Anon<<<T as Config<I>>::BlockNumberProvider as BlockNumberProvider>::BlockNumber, <T as Config<I>>::RuntimeCall, <<T as Config>::RuntimeOrigin as OriginTrait>::PalletsOrigin>>::Address)>,
}
Fields§
§track: <<T as Config<I>>::Tracks as TracksInfo<<<T as Config<I>>::Currency as Currency<<T as Config>::AccountId>>::Balance, <<T as Config<I>>::BlockNumberProvider as BlockNumberProvider>::BlockNumber>>::Id
The track of this referendum.
origin: <<T as Config>::RuntimeOrigin as OriginTrait>::PalletsOrigin
The origin for this referendum.
proposal: Bounded<<T as Config<I>>::RuntimeCall, <T as Config>::Hashing>
The hash of the proposal up for referendum.
enactment: DispatchTime<<<T as Config<I>>::BlockNumberProvider as BlockNumberProvider>::BlockNumber>
The time the proposal should be scheduled for enactment.
submitted: <<T as Config<I>>::BlockNumberProvider as BlockNumberProvider>::BlockNumber
The time of submission. Once UndecidingTimeout
passes, it may be closed by anyone if
deciding
is None
.
submission_deposit: Deposit<<T as Config>::AccountId, <<T as Config<I>>::Currency as Currency<<T as Config>::AccountId>>::Balance>
The deposit reserved for the submission of this referendum.
decision_deposit: Option<Deposit<<T as Config>::AccountId, <<T as Config<I>>::Currency as Currency<<T as Config>::AccountId>>::Balance>>
The deposit reserved for this referendum to be decided.
deciding: Option<DecidingStatus<<<T as Config<I>>::BlockNumberProvider as BlockNumberProvider>::BlockNumber>>
The status of a decision being made. If None
, it has not entered the deciding period.
tally: <T as Config<I>>::Tally
The current tally of votes in this referendum.
in_queue: bool
Whether we have been placed in the queue for being decided or not.
alarm: Option<(<<T as Config<I>>::BlockNumberProvider as BlockNumberProvider>::BlockNumber, <<T as Config<I>>::Scheduler as Anon<<<T as Config<I>>::BlockNumberProvider as BlockNumberProvider>::BlockNumber, <T as Config<I>>::RuntimeCall, <<T as Config>::RuntimeOrigin as OriginTrait>::PalletsOrigin>>::Address)>
The next scheduled wake-up, if Some
.
Trait Implementations
Source§impl<TrackId: Clone + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, RuntimeOrigin: Clone + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, Moment: Clone + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone + EncodeLike, Call: Clone + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, Balance: Clone + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, Tally: Clone + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, AccountId: Clone + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, ScheduleAddress: Clone + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone> Clone for ReferendumStatus<TrackId, RuntimeOrigin, Moment, Call, Balance, Tally, AccountId, ScheduleAddress>
impl<TrackId: Clone + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, RuntimeOrigin: Clone + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, Moment: Clone + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone + EncodeLike, Call: Clone + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, Balance: Clone + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, Tally: Clone + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, AccountId: Clone + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, ScheduleAddress: Clone + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone> Clone for ReferendumStatus<TrackId, RuntimeOrigin, Moment, Call, Balance, Tally, AccountId, ScheduleAddress>
Source§fn clone(
&self,
) -> ReferendumStatus<TrackId, RuntimeOrigin, Moment, Call, Balance, Tally, AccountId, ScheduleAddress>
fn clone( &self, ) -> ReferendumStatus<TrackId, RuntimeOrigin, Moment, Call, Balance, Tally, AccountId, ScheduleAddress>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<TrackId, RuntimeOrigin, Moment, Call, Balance, Tally, AccountId, ScheduleAddress> Debug for ReferendumStatus<TrackId, RuntimeOrigin, Moment, Call, Balance, Tally, AccountId, ScheduleAddress>where
TrackId: Debug + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
RuntimeOrigin: Debug + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
Moment: Debug + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone + EncodeLike,
Call: Debug + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
Balance: Debug + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
Tally: Debug + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
AccountId: Debug + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
ScheduleAddress: Debug + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
impl<TrackId, RuntimeOrigin, Moment, Call, Balance, Tally, AccountId, ScheduleAddress> Debug for ReferendumStatus<TrackId, RuntimeOrigin, Moment, Call, Balance, Tally, AccountId, ScheduleAddress>where
TrackId: Debug + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
RuntimeOrigin: Debug + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
Moment: Debug + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone + EncodeLike,
Call: Debug + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
Balance: Debug + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
Tally: Debug + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
AccountId: Debug + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
ScheduleAddress: Debug + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
Source§impl<TrackId, RuntimeOrigin, Moment, Call, Balance: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, Tally, AccountId: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, ScheduleAddress: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone> Decode for ReferendumStatus<TrackId, RuntimeOrigin, Moment, Call, Balance, Tally, AccountId, ScheduleAddress>where
TrackId: Decode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
RuntimeOrigin: Decode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
Call: Decode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
DispatchTime<Moment>: Decode,
Moment: Decode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone + EncodeLike,
Deposit<AccountId, Balance>: Decode,
Option<Deposit<AccountId, Balance>>: Decode,
Option<DecidingStatus<Moment>>: Decode,
Tally: Decode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
Option<(Moment, ScheduleAddress)>: Decode,
impl<TrackId, RuntimeOrigin, Moment, Call, Balance: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, Tally, AccountId: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, ScheduleAddress: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone> Decode for ReferendumStatus<TrackId, RuntimeOrigin, Moment, Call, Balance, Tally, AccountId, ScheduleAddress>where
TrackId: Decode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
RuntimeOrigin: Decode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
Call: Decode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
DispatchTime<Moment>: Decode,
Moment: Decode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone + EncodeLike,
Deposit<AccountId, Balance>: Decode,
Option<Deposit<AccountId, Balance>>: Decode,
Option<DecidingStatus<Moment>>: Decode,
Tally: Decode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
Option<(Moment, ScheduleAddress)>: Decode,
Source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
Attempt to deserialise the value from input.
§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
Attempt to skip the encoded value from input. Read more
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
Source§impl<TrackId, RuntimeOrigin, Moment, Call, Balance: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, Tally, AccountId: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, ScheduleAddress: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone> Encode for ReferendumStatus<TrackId, RuntimeOrigin, Moment, Call, Balance, Tally, AccountId, ScheduleAddress>where
TrackId: Encode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
RuntimeOrigin: Encode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
Call: Encode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
DispatchTime<Moment>: Encode,
Moment: Encode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone + EncodeLike,
Deposit<AccountId, Balance>: Encode,
Option<Deposit<AccountId, Balance>>: Encode,
Option<DecidingStatus<Moment>>: Encode,
Tally: Encode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
Option<(Moment, ScheduleAddress)>: Encode,
impl<TrackId, RuntimeOrigin, Moment, Call, Balance: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, Tally, AccountId: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, ScheduleAddress: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone> Encode for ReferendumStatus<TrackId, RuntimeOrigin, Moment, Call, Balance, Tally, AccountId, ScheduleAddress>where
TrackId: Encode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
RuntimeOrigin: Encode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
Call: Encode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
DispatchTime<Moment>: Encode,
Moment: Encode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone + EncodeLike,
Deposit<AccountId, Balance>: Encode,
Option<Deposit<AccountId, Balance>>: Encode,
Option<DecidingStatus<Moment>>: Encode,
Tally: Encode + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
Option<(Moment, ScheduleAddress)>: Encode,
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl<TrackId, RuntimeOrigin, Moment, Call, Balance: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, Tally, AccountId: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, ScheduleAddress: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone> MaxEncodedLen for ReferendumStatus<TrackId, RuntimeOrigin, Moment, Call, Balance, Tally, AccountId, ScheduleAddress>where
TrackId: MaxEncodedLen + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
RuntimeOrigin: MaxEncodedLen + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
Call: MaxEncodedLen + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
DispatchTime<Moment>: MaxEncodedLen,
Moment: MaxEncodedLen + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone + EncodeLike,
Deposit<AccountId, Balance>: MaxEncodedLen,
Option<Deposit<AccountId, Balance>>: MaxEncodedLen,
Option<DecidingStatus<Moment>>: MaxEncodedLen,
Tally: MaxEncodedLen + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
Option<(Moment, ScheduleAddress)>: MaxEncodedLen,
impl<TrackId, RuntimeOrigin, Moment, Call, Balance: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, Tally, AccountId: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, ScheduleAddress: Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone> MaxEncodedLen for ReferendumStatus<TrackId, RuntimeOrigin, Moment, Call, Balance, Tally, AccountId, ScheduleAddress>where
TrackId: MaxEncodedLen + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
RuntimeOrigin: MaxEncodedLen + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
Call: MaxEncodedLen + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
DispatchTime<Moment>: MaxEncodedLen,
Moment: MaxEncodedLen + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone + EncodeLike,
Deposit<AccountId, Balance>: MaxEncodedLen,
Option<Deposit<AccountId, Balance>>: MaxEncodedLen,
Option<DecidingStatus<Moment>>: MaxEncodedLen,
Tally: MaxEncodedLen + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone,
Option<(Moment, ScheduleAddress)>: MaxEncodedLen,
Source§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
Source§impl<TrackId: PartialEq + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, RuntimeOrigin: PartialEq + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, Moment: PartialEq + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone + EncodeLike, Call: PartialEq + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, Balance: PartialEq + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, Tally: PartialEq + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, AccountId: PartialEq + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, ScheduleAddress: PartialEq + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone> PartialEq for ReferendumStatus<TrackId, RuntimeOrigin, Moment, Call, Balance, Tally, AccountId, ScheduleAddress>
impl<TrackId: PartialEq + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, RuntimeOrigin: PartialEq + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, Moment: PartialEq + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone + EncodeLike, Call: PartialEq + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, Balance: PartialEq + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, Tally: PartialEq + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, AccountId: PartialEq + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone, ScheduleAddress: PartialEq + Eq + PartialEq + Debug + Encode + Decode + TypeInfo + Clone> PartialEq for ReferendumStatus<TrackId, RuntimeOrigin, Moment, Call, Balance, Tally, AccountId, ScheduleAddress>
Source§fn eq(
&self,
other: &ReferendumStatus<TrackId, RuntimeOrigin, Moment, Call, Balance, Tally, AccountId, ScheduleAddress>,
) -> bool
fn eq( &self, other: &ReferendumStatus<TrackId, RuntimeOrigin, Moment, Call, Balance, Tally, AccountId, ScheduleAddress>, ) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.