diff --git a/templates/parachain/README.docify.md b/templates/parachain/README.docify.md index af5ecee7ff39..40f9bc2ae396 100644 --- a/templates/parachain/README.docify.md +++ b/templates/parachain/README.docify.md @@ -96,7 +96,7 @@ Please see the installation section at [`crates.io/staging-chain-spec-builder`]( #### Use `chain-spec-builder` to generate the `chain_spec.json` file ```sh -chain-spec-builder create --relay-chain "rococo-local" --para-id {{PARACHAIN_ID}} --runtime \ +chain-spec-builder create --relay-chain "rococo-local" --para-id --runtime \ target/release/wbuild/parachain-template-runtime/parachain_template_runtime.wasm named-preset development ``` @@ -246,3 +246,5 @@ relay chain network (see [Parachain Template node](#parachain-template-node) set - 👥 Additionally, there are [GitHub issues](https://github.com/paritytech/polkadot-sdk/issues) and [Substrate StackExchange](https://substrate.stackexchange.com/). + + diff --git a/templates/parachain/runtime/src/genesis_config_presets.rs b/templates/parachain/runtime/src/genesis_config_presets.rs index 2c44805be542..c3a2eb23f0cc 100644 --- a/templates/parachain/runtime/src/genesis_config_presets.rs +++ b/templates/parachain/runtime/src/genesis_config_presets.rs @@ -10,10 +10,7 @@ use polkadot_sdk::{staging_xcm as xcm, *}; #[doc::include_str!("../../README.md")] #[cfg(feature = "generate-readme")] -docify::compile_markdown!( - "README.docify.md", - "README.md" -); +docify::compile_markdown!("README.docify.md","README.md"); use docify::export; @@ -27,7 +24,7 @@ use sp_keyring::Sr25519Keyring; /// The default XCM version to set in genesis config. const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION; /// Parachain id used for genesis config presets of parachain template. -#[docify::export_content] +#[export] pub const PARACHAIN_ID: u32 = 2000; /// Generate the session keys from individual elements. @@ -36,6 +33,10 @@ pub const PARACHAIN_ID: u32 = 2000; pub fn template_session_keys(keys: AuraId) -> SessionKeys { SessionKeys { aura: keys } } +#[docify::export_content] +fn get_parachain_id(){ + PARACHAIN_ID.to_string(); +} fn testnet_genesis( invulnerables: Vec<(AccountId, AuraId)>,