1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize, Clone, Copy)]
/// Data inherent to an invocation. Meant to be supplied by a runtime, not a user.
#[must_use]
pub struct InherentData {
/// The seed to associate with an invocation.
pub seed: u64,
/// The timestamp to associate with an invocation.
pub timestamp: u64,
}
impl InherentData {
/// Constructor for [InherentData]
pub fn new(seed: u64, timestamp: u64) -> Self {
Self { seed, timestamp }
}
}
#[cfg(test)]
mod tests {}