mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-30 14:29:57 +00:00
MEL: Origin, Referenda, ConvictionVoting (#11631)
* Referenda & CV pallets ready * Fix build * Add mel_bound for Voting and Casting types * Add mel_bound on Tally * Add mel_bound on another Tally * Add mel_bound for pallet_collective::RawOrigin Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
1 parent
849a6c35fd
commit
c47431118b
22 files changed
+106
-39
No files matched your search
@@ -122,6 +122,13 @@ impl<Tally, Moment, Class> PollStatus<Tally, Moment, Class> {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ClassCountOf<P, T>(sp_std::marker::PhantomData<(P, T)>);
|
||||
impl<T, P: Polling<T>> sp_runtime::traits::Get<u32> for ClassCountOf<P, T> {
|
||||
fn get() -> u32 {
|
||||
P::classes().len() as u32
|
||||
}
|
||||
}
|
||||
|
||||
pub trait Polling<Tally> {
|
||||
type Index: Parameter + Member + Ord + PartialOrd + Copy + HasCompact + MaxEncodedLen;
|
||||
type Votes: Parameter + Member + Ord + PartialOrd + Copy + HasCompact + MaxEncodedLen;
|
||||
|
||||
Reference in new issue
Block a user