Trait sc_service::ChainSpec[][src]

pub trait ChainSpec: BuildStorage + Send + Sync {
Show 15 methods fn name(&self) -> &str;
fn id(&self) -> &str;
fn chain_type(&self) -> ChainType;
fn boot_nodes(&self) -> &[MultiaddrWithPeerId]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
fn telemetry_endpoints(&self) -> &Option<TelemetryEndpoints>;
fn protocol_id(&self) -> Option<&str>;
fn properties(&self) -> Map<String, Value>;
fn extensions(&self) -> &dyn GetExtension;
fn extensions_mut(&mut self) -> &mut dyn GetExtension;
fn add_boot_node(&mut self, addr: MultiaddrWithPeerId);
fn as_json(&self, raw: bool) -> Result<String, String>;
fn as_storage_builder(&self) -> &dyn BuildStorage;
fn cloned_box(&self) -> Box<dyn ChainSpec + 'static, Global>
Notable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    I: Iterator + ?Sized,
    A: Allocator
type Item = <I as Iterator>::Item;
fn set_storage(&mut self, storage: Storage);
fn code_substitutes(&self) -> HashMap<String, Vec<u8, Global>, RandomState>;
Expand description

Common interface of a chain specification.

Required methods

Spec name.

Spec id.

Type of the chain.

A list of bootnode addresses.

Telemetry endpoints (if any)

Network protocol id.

Additional loosly-typed properties of the chain.

Returns an empty JSON object if ‘properties’ not defined in config

Returns a reference to the defined chain spec extensions.

Returns a mutable reference to the defined chain spec extensions.

Add a bootnode to the list.

Return spec as JSON.

Return StorageBuilder for this spec.

Returns a cloned Box<dyn ChainSpec>.

Set the storage that should be used by this chain spec.

This will be used as storage at genesis.

Returns code substitutes that should be used for the on chain wasm.

Trait Implementations

Formats the value using the given formatter. Read more