mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 04:37:57 +00:00
Parameter trait for Time::Moment (#4237)
* Debug for Time::Moment Without this we cannot have a Moment parameter in dispatchable functions * Update frame/support/src/traits.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Update traits.rs
This commit is contained in:
committed by
Bastian Köcher
parent
4a21f9bbfd
commit
630f7d8425
@@ -26,6 +26,8 @@ use sr_primitives::{
|
||||
traits::{MaybeSerializeDeserialize, SimpleArithmetic, Saturating},
|
||||
};
|
||||
|
||||
use crate::dispatch::Parameter;
|
||||
|
||||
/// Anything that can have a `::len()` method.
|
||||
pub trait Len {
|
||||
/// Return the length of data type.
|
||||
@@ -622,7 +624,7 @@ bitmask! {
|
||||
}
|
||||
|
||||
pub trait Time {
|
||||
type Moment: SimpleArithmetic + FullCodec + Clone + Default + Copy;
|
||||
type Moment: SimpleArithmetic + Parameter + Default + Copy;
|
||||
|
||||
fn now() -> Self::Moment;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user