chain-spec-generator 13.0.1-beta.196

Generates a chainspec artifact for use in genesis block creation of a Xand network.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use serde::{Deserialize, Serialize};
use std::fmt::{Display, Formatter};

#[derive(Clone, Default, Deserialize, Debug, Eq, PartialEq, Serialize)]
pub struct ValidatorAuthAddress(String);

impl<S: AsRef<str>> From<S> for ValidatorAuthAddress {
    fn from(val: S) -> Self {
        ValidatorAuthAddress(val.as_ref().to_string())
    }
}

impl Display for ValidatorAuthAddress {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.0)
    }
}