mirror of
https://github.com/pezkuwichain/pezkuwi-runtime-templates.git
synced 2026-06-15 04:11:02 +00:00
Update documentation and templates for Pezkuwi branding
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
|
||||
use alloc::{format, vec, vec::Vec};
|
||||
|
||||
use cumulus_primitives_core::ParaId;
|
||||
use pezcumulus_primitives_core::ParaId;
|
||||
use pezframe_support::build_struct_json_patch;
|
||||
use teyrchains_common::AuraId;
|
||||
use serde_json::Value;
|
||||
use sp_core::{ecdsa, Pair, Public};
|
||||
use sp_genesis_builder::PresetId;
|
||||
use sp_runtime::traits::{IdentifyAccount, Verify};
|
||||
use pezsp_core::{ecdsa, Pair, Public};
|
||||
use pezsp_genesis_builder::PresetId;
|
||||
use pezsp_runtime::traits::{IdentifyAccount, Verify};
|
||||
|
||||
use crate::{
|
||||
constants::currency::EXISTENTIAL_DEPOSIT, AccountId, BalancesConfig, CollatorSelectionConfig,
|
||||
@@ -124,8 +124,8 @@ fn development_config_genesis() -> Value {
|
||||
/// Provides the JSON representation of predefined genesis config for given `id`.
|
||||
pub fn get_preset(id: &PresetId) -> Option<Vec<u8>> {
|
||||
let patch = match id.as_ref() {
|
||||
sp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET => local_testnet_genesis(),
|
||||
sp_genesis_builder::DEV_RUNTIME_PRESET => development_config_genesis(),
|
||||
pezsp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET => local_testnet_genesis(),
|
||||
pezsp_genesis_builder::DEV_RUNTIME_PRESET => development_config_genesis(),
|
||||
_ => return None,
|
||||
};
|
||||
Some(
|
||||
@@ -138,8 +138,8 @@ pub fn get_preset(id: &PresetId) -> Option<Vec<u8>> {
|
||||
/// List of supported presets.
|
||||
pub fn preset_names() -> Vec<PresetId> {
|
||||
vec![
|
||||
PresetId::from(sp_genesis_builder::DEV_RUNTIME_PRESET),
|
||||
PresetId::from(sp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET),
|
||||
PresetId::from(pezsp_genesis_builder::DEV_RUNTIME_PRESET),
|
||||
PresetId::from(pezsp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET),
|
||||
]
|
||||
}
|
||||
|
||||
@@ -274,14 +274,14 @@ mod tests {
|
||||
fn get_preset_roundtrips_known_ids() {
|
||||
// LOCAL_TESTNET
|
||||
let p =
|
||||
super::get_preset(&PresetId::from(sp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET))
|
||||
super::get_preset(&PresetId::from(pezsp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET))
|
||||
.expect("local preset should exist");
|
||||
let from_api = parse_bytes(p);
|
||||
let from_fn = super::local_testnet_genesis();
|
||||
assert_eq!(from_api, from_fn, "local_testnet preset must match function output");
|
||||
|
||||
// DEV
|
||||
let p = super::get_preset(&PresetId::from(sp_genesis_builder::DEV_RUNTIME_PRESET))
|
||||
let p = super::get_preset(&PresetId::from(pezsp_genesis_builder::DEV_RUNTIME_PRESET))
|
||||
.expect("dev preset should exist");
|
||||
let from_api = parse_bytes(p);
|
||||
let from_fn = super::development_config_genesis();
|
||||
@@ -292,11 +292,11 @@ mod tests {
|
||||
fn preset_names_lists_supported() {
|
||||
let names = super::preset_names();
|
||||
assert!(
|
||||
names.contains(&PresetId::from(sp_genesis_builder::DEV_RUNTIME_PRESET)),
|
||||
names.contains(&PresetId::from(pezsp_genesis_builder::DEV_RUNTIME_PRESET)),
|
||||
"DEV preset should be listed"
|
||||
);
|
||||
assert!(
|
||||
names.contains(&PresetId::from(sp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET)),
|
||||
names.contains(&PresetId::from(pezsp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET)),
|
||||
"LOCAL_TESTNET preset should be listed"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user