Skip to content

Commit

Permalink
rename to moonkit_tempalte_runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
girazoki committed Aug 29, 2023
1 parent 9f07943 commit 247bc3f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
22 changes: 11 additions & 11 deletions template/node/src/chain_spec.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use cumulus_primitives_core::ParaId;
use parachain_template_runtime::{AccountId, NimbusId, Signature};
use moonkit_template_runtime::{AccountId, NimbusId, Signature};
use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
use sc_service::ChainType;
use serde::{Deserialize, Serialize};
Expand All @@ -8,7 +8,7 @@ use sp_runtime::traits::{IdentifyAccount, Verify};

/// Specialized `ChainSpec` for the normal parachain runtime.
pub type ChainSpec =
sc_service::GenericChainSpec<parachain_template_runtime::GenesisConfig, Extensions>;
sc_service::GenericChainSpec<moonkit_template_runtime::GenesisConfig, Extensions>;

/// Helper function to generate a crypto pair from seed
pub fn get_pair_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {
Expand Down Expand Up @@ -165,25 +165,25 @@ fn testnet_genesis(
authorities: Vec<(AccountId, NimbusId)>,
endowed_accounts: Vec<AccountId>,
id: ParaId,
) -> parachain_template_runtime::GenesisConfig {
parachain_template_runtime::GenesisConfig {
system: parachain_template_runtime::SystemConfig {
code: parachain_template_runtime::WASM_BINARY
) -> moonkit_template_runtime::GenesisConfig {
moonkit_template_runtime::GenesisConfig {
system: moonkit_template_runtime::SystemConfig {
code: moonkit_template_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
},
balances: parachain_template_runtime::BalancesConfig {
balances: moonkit_template_runtime::BalancesConfig {
balances: endowed_accounts
.iter()
.cloned()
.map(|k| (k, 1 << 60))
.collect(),
},
parachain_info: parachain_template_runtime::ParachainInfoConfig { parachain_id: id },
author_filter: parachain_template_runtime::AuthorFilterConfig {
eligible_count: parachain_template_runtime::EligibilityValue::default(),
parachain_info: moonkit_template_runtime::ParachainInfoConfig { parachain_id: id },
author_filter: moonkit_template_runtime::AuthorFilterConfig {
eligible_count: moonkit_template_runtime::EligibilityValue::default(),
},
potential_author_set: parachain_template_runtime::PotentialAuthorSetConfig {
potential_author_set: moonkit_template_runtime::PotentialAuthorSetConfig {
mapping: authorities,
},
parachain_system: Default::default(),
Expand Down
4 changes: 2 additions & 2 deletions template/node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use cumulus_client_cli::generate_genesis_block;
use cumulus_primitives_core::ParaId;
use frame_benchmarking_cli::BenchmarkCmd;
use log::info;
use parachain_template_runtime::{Block, RuntimeApi};
use moonkit_template_runtime::{Block, RuntimeApi};
use parity_scale_codec::Encode;
use sc_cli::{
ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams,
Expand Down Expand Up @@ -67,7 +67,7 @@ impl SubstrateCli for Cli {
}

fn native_runtime_version(_: &Box<dyn ChainSpec>) -> &'static RuntimeVersion {
&parachain_template_runtime::VERSION
&moonkit_template_runtime::VERSION
}
}

Expand Down
2 changes: 1 addition & 1 deletion template/node/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

use std::sync::Arc;

use parachain_template_runtime::{opaque::Block, AccountId, Balance, Index as Nonce};
use moonkit_template_runtime::{opaque::Block, AccountId, Balance, Index as Nonce};

use sc_client_api::AuxStore;
pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor};
Expand Down
6 changes: 3 additions & 3 deletions template/node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use std::{sync::Arc, time::Duration};

// Local Runtime Types
use parachain_template_runtime::{opaque::Block, AccountId, Balance, Index as Nonce, RuntimeApi};
use moonkit_template_runtime::{opaque::Block, AccountId, Balance, Index as Nonce, RuntimeApi};

use nimbus_consensus::{
BuildNimbusConsensusParams, NimbusConsensus, NimbusManualSealConsensusDataProvider,
Expand Down Expand Up @@ -49,11 +49,11 @@ impl sc_executor::NativeExecutionDispatch for TemplateRuntimeExecutor {
type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;

fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {
parachain_template_runtime::api::dispatch(method, data)
moonkit_template_runtime::api::dispatch(method, data)
}

fn native_version() -> sc_executor::NativeVersion {
parachain_template_runtime::native_version()
moonkit_template_runtime::native_version()
}
}

Expand Down

0 comments on commit 247bc3f

Please sign in to comment.