Type Alias moonbeam_service::chain_spec::moonriver::ChainSpec
source · pub type ChainSpec = GenericChainSpec<Extensions>;
Expand description
Specialized ChainSpec
. This is a specialization of the general Substrate ChainSpec type.
Aliased Type§
struct ChainSpec { /* private fields */ }
Implementations
§impl<E, EHF> ChainSpec<E, EHF>
impl<E, EHF> ChainSpec<E, EHF>
pub fn boot_nodes(&self) -> &[MultiaddrWithPeerId]
pub fn boot_nodes(&self) -> &[MultiaddrWithPeerId]
A list of bootnode addresses.
pub fn telemetry_endpoints(&self) -> &Option<TelemetryEndpoints>
pub fn telemetry_endpoints(&self) -> &Option<TelemetryEndpoints>
Telemetry endpoints (if any)
pub fn protocol_id(&self) -> Option<&str>
pub fn protocol_id(&self) -> Option<&str>
Network protocol id.
pub fn properties(&self) -> Map<String, Value>
pub fn properties(&self) -> Map<String, Value>
Additional loosely-typed properties of the chain.
Returns an empty JSON object if ‘properties’ not defined in config
pub fn add_boot_node(&mut self, addr: MultiaddrWithPeerId)
pub fn add_boot_node(&mut self, addr: MultiaddrWithPeerId)
Add a bootnode to the list.
pub fn extensions(&self) -> &E
pub fn extensions(&self) -> &E
Returns a reference to the defined chain spec extensions.
pub fn extensions_mut(&mut self) -> &mut E
pub fn extensions_mut(&mut self) -> &mut E
Returns a mutable reference to the defined chain spec extensions.
§impl<E, EHF> ChainSpec<E, EHF>where
E: DeserializeOwned,
impl<E, EHF> ChainSpec<E, EHF>where
E: DeserializeOwned,
pub fn from_json_bytes(
json: impl Into<Cow<'static, [u8]>>,
) -> Result<ChainSpec<E, EHF>, String>
pub fn from_json_bytes( json: impl Into<Cow<'static, [u8]>>, ) -> Result<ChainSpec<E, EHF>, String>
Parse json content into a ChainSpec
pub fn from_json_file(path: PathBuf) -> Result<ChainSpec<E, EHF>, String>
pub fn from_json_file(path: PathBuf) -> Result<ChainSpec<E, EHF>, String>
Parse json file into a ChainSpec
Trait Implementations
§impl<E, EHF> BuildStorage for ChainSpec<E, EHF>where
EHF: HostFunctions,
impl<E, EHF> BuildStorage for ChainSpec<E, EHF>where
EHF: HostFunctions,
§fn assimilate_storage(&self, storage: &mut Storage) -> Result<(), String>
fn assimilate_storage(&self, storage: &mut Storage) -> Result<(), String>
Assimilate the storage for this module into pre-existing overlays.
§fn build_storage(&self) -> Result<Storage, String>
fn build_storage(&self) -> Result<Storage, String>
Build the storage out of this builder.
§impl<E, EHF> ChainSpec for ChainSpec<E, EHF>
impl<E, EHF> ChainSpec for ChainSpec<E, EHF>
§fn boot_nodes(&self) -> &[MultiaddrWithPeerId]
fn boot_nodes(&self) -> &[MultiaddrWithPeerId]
A list of bootnode addresses.
§fn chain_type(&self) -> ChainType
fn chain_type(&self) -> ChainType
Type of the chain.
§fn telemetry_endpoints(&self) -> &Option<TelemetryEndpoints>
fn telemetry_endpoints(&self) -> &Option<TelemetryEndpoints>
Telemetry endpoints (if any)
§fn protocol_id(&self) -> Option<&str>
fn protocol_id(&self) -> Option<&str>
Network protocol id.
§fn properties(&self) -> Map<String, Value>
fn properties(&self) -> Map<String, Value>
Additional loosely-typed properties of the chain. Read more
§fn add_boot_node(&mut self, addr: MultiaddrWithPeerId)
fn add_boot_node(&mut self, addr: MultiaddrWithPeerId)
Add a bootnode to the list.
§fn extensions(&self) -> &dyn GetExtension
fn extensions(&self) -> &dyn GetExtension
Returns a reference to the defined chain spec extensions.
§fn extensions_mut(&mut self) -> &mut dyn GetExtension
fn extensions_mut(&mut self) -> &mut dyn GetExtension
Returns a mutable reference to the defined chain spec extensions.
§fn as_storage_builder(&self) -> &dyn BuildStorage
fn as_storage_builder(&self) -> &dyn BuildStorage
Return StorageBuilder for this spec.
§fn cloned_box(&self) -> Box<dyn ChainSpec>
fn cloned_box(&self) -> Box<dyn ChainSpec>
Returns a cloned
Box<dyn ChainSpec>
.§fn set_storage(&mut self, storage: Storage)
fn set_storage(&mut self, storage: Storage)
Set the storage that should be used by this chain spec. Read more