mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 07:31:02 +00:00
[cumulus] parachains-common testnet constants cleaning (#3134)
The `parachains-common` contains a lots of constants and type definitions which are used for `polkadot-sdk`'s testnet runtimes and also for `polkadot-fellows`'s production [SP runtimes](https://github.com/polkadot-fellows/runtimes/tree/main/system-parachains/constants). This PR cleans `parachains-common` module to contain only common and generic functionality. Testnet-specific constants have been moved to the separate module dedicated just for testnets: `polkadot-sdk/cumulus/parachains/runtimes/constants/` Part of: https://github.com/paritytech/polkadot-sdk/issues/3054 --------- Co-authored-by: georgepisaltu <george.pisaltu@parity.io>
This commit is contained in:
@@ -24,10 +24,8 @@ use parachains_common::{AccountId, AuraId, Balance as AssetHubBalance};
|
||||
use sc_service::ChainType;
|
||||
use sp_core::{crypto::UncheckedInto, sr25519};
|
||||
|
||||
const ASSET_HUB_WESTEND_ED: AssetHubBalance =
|
||||
parachains_common::westend::currency::EXISTENTIAL_DEPOSIT;
|
||||
const ASSET_HUB_ROCOCO_ED: AssetHubBalance =
|
||||
parachains_common::westend::currency::EXISTENTIAL_DEPOSIT;
|
||||
const ASSET_HUB_WESTEND_ED: AssetHubBalance = asset_hub_westend_runtime::ExistentialDeposit::get();
|
||||
const ASSET_HUB_ROCOCO_ED: AssetHubBalance = asset_hub_rococo_runtime::ExistentialDeposit::get();
|
||||
|
||||
/// Generate the session keys from individual elements.
|
||||
///
|
||||
@@ -68,7 +66,7 @@ pub fn asset_hub_westend_development_config() -> GenericChainSpec {
|
||||
get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
|
||||
],
|
||||
parachains_common::westend::currency::UNITS * 1_000_000,
|
||||
testnet_parachains_constants::westend::currency::UNITS * 1_000_000,
|
||||
1000.into(),
|
||||
))
|
||||
.with_properties(properties)
|
||||
@@ -114,7 +112,7 @@ pub fn asset_hub_westend_local_config() -> GenericChainSpec {
|
||||
get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
|
||||
],
|
||||
parachains_common::westend::currency::UNITS * 1_000_000,
|
||||
testnet_parachains_constants::westend::currency::UNITS * 1_000_000,
|
||||
1000.into(),
|
||||
))
|
||||
.with_properties(properties)
|
||||
@@ -243,7 +241,7 @@ fn asset_hub_rococo_like_development_config(
|
||||
get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
|
||||
],
|
||||
parachains_common::rococo::currency::UNITS * 1_000_000,
|
||||
testnet_parachains_constants::rococo::currency::UNITS * 1_000_000,
|
||||
para_id.into(),
|
||||
))
|
||||
.with_properties(properties)
|
||||
@@ -302,7 +300,7 @@ fn asset_hub_rococo_like_local_config(
|
||||
get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
|
||||
],
|
||||
parachains_common::rococo::currency::UNITS * 1_000_000,
|
||||
testnet_parachains_constants::rococo::currency::UNITS * 1_000_000,
|
||||
para_id.into(),
|
||||
))
|
||||
.with_properties(properties)
|
||||
|
||||
@@ -133,7 +133,7 @@ pub mod rococo {
|
||||
pub(crate) const BRIDGE_HUB_ROCOCO_LOCAL: &str = "bridge-hub-rococo-local";
|
||||
pub(crate) const BRIDGE_HUB_ROCOCO_DEVELOPMENT: &str = "bridge-hub-rococo-dev";
|
||||
const BRIDGE_HUB_ROCOCO_ED: BridgeHubBalance =
|
||||
parachains_common::rococo::currency::EXISTENTIAL_DEPOSIT;
|
||||
bridge_hub_rococo_runtime::ExistentialDeposit::get();
|
||||
|
||||
pub fn local_config<ModifyProperties: Fn(&mut sc_chain_spec::Properties)>(
|
||||
id: &str,
|
||||
@@ -257,7 +257,7 @@ pub mod westend {
|
||||
pub(crate) const BRIDGE_HUB_WESTEND_LOCAL: &str = "bridge-hub-westend-local";
|
||||
pub(crate) const BRIDGE_HUB_WESTEND_DEVELOPMENT: &str = "bridge-hub-westend-dev";
|
||||
const BRIDGE_HUB_WESTEND_ED: BridgeHubBalance =
|
||||
parachains_common::westend::currency::EXISTENTIAL_DEPOSIT;
|
||||
bridge_hub_westend_runtime::ExistentialDeposit::get();
|
||||
|
||||
pub fn local_config(
|
||||
id: &str,
|
||||
|
||||
@@ -24,7 +24,7 @@ use sc_service::ChainType;
|
||||
use sp_core::sr25519;
|
||||
|
||||
const COLLECTIVES_WESTEND_ED: CollectivesBalance =
|
||||
parachains_common::westend::currency::EXISTENTIAL_DEPOSIT;
|
||||
collectives_westend_runtime::ExistentialDeposit::get();
|
||||
|
||||
/// Generate the session keys from individual elements.
|
||||
///
|
||||
|
||||
@@ -29,7 +29,7 @@ const CONTRACTS_PARACHAIN_ID: u32 = 1002;
|
||||
|
||||
/// The existential deposit is determined by the runtime "contracts-rococo".
|
||||
const CONTRACTS_ROCOCO_ED: contracts_rococo_runtime::Balance =
|
||||
parachains_common::rococo::currency::EXISTENTIAL_DEPOSIT;
|
||||
testnet_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT;
|
||||
|
||||
pub fn contracts_rococo_development_config() -> GenericChainSpec {
|
||||
let mut properties = sc_chain_spec::Properties::new();
|
||||
|
||||
@@ -120,7 +120,7 @@ pub mod rococo {
|
||||
pub(crate) const CORETIME_ROCOCO: &str = "coretime-rococo";
|
||||
pub(crate) const CORETIME_ROCOCO_LOCAL: &str = "coretime-rococo-local";
|
||||
pub(crate) const CORETIME_ROCOCO_DEVELOPMENT: &str = "coretime-rococo-dev";
|
||||
const CORETIME_ROCOCO_ED: Balance = parachains_common::rococo::currency::EXISTENTIAL_DEPOSIT;
|
||||
const CORETIME_ROCOCO_ED: Balance = coretime_rococo_runtime::ExistentialDeposit::get();
|
||||
|
||||
pub fn local_config(runtime_type: CoretimeRuntimeType, relay_chain: &str) -> GenericChainSpec {
|
||||
// Rococo defaults
|
||||
@@ -215,7 +215,7 @@ pub mod westend {
|
||||
|
||||
pub(crate) const CORETIME_WESTEND_LOCAL: &str = "coretime-westend-local";
|
||||
pub(crate) const CORETIME_WESTEND_DEVELOPMENT: &str = "coretime-westend-dev";
|
||||
const CORETIME_WESTEND_ED: Balance = parachains_common::westend::currency::EXISTENTIAL_DEPOSIT;
|
||||
const CORETIME_WESTEND_ED: Balance = coretime_westend_runtime::ExistentialDeposit::get();
|
||||
|
||||
pub fn local_config(runtime_type: CoretimeRuntimeType, relay_chain: &str) -> GenericChainSpec {
|
||||
// westend defaults
|
||||
|
||||
@@ -106,14 +106,14 @@ pub mod rococo {
|
||||
get_account_id_from_seed, get_collator_keys_from_seed, Extensions, GenericChainSpec,
|
||||
SAFE_XCM_VERSION,
|
||||
};
|
||||
use parachains_common::{rococo::currency::EXISTENTIAL_DEPOSIT, AccountId, AuraId};
|
||||
use parachains_common::{AccountId, AuraId};
|
||||
use sc_chain_spec::ChainType;
|
||||
use sp_core::sr25519;
|
||||
|
||||
pub(crate) const PEOPLE_ROCOCO: &str = "people-rococo";
|
||||
pub(crate) const PEOPLE_ROCOCO_LOCAL: &str = "people-rococo-local";
|
||||
pub(crate) const PEOPLE_ROCOCO_DEVELOPMENT: &str = "people-rococo-development";
|
||||
const PEOPLE_ROCOCO_ED: PeopleBalance = EXISTENTIAL_DEPOSIT;
|
||||
const PEOPLE_ROCOCO_ED: PeopleBalance = people_rococo_runtime::ExistentialDeposit::get();
|
||||
|
||||
pub fn local_config(
|
||||
id: &str,
|
||||
@@ -216,14 +216,14 @@ pub mod westend {
|
||||
get_account_id_from_seed, get_collator_keys_from_seed, Extensions, GenericChainSpec,
|
||||
SAFE_XCM_VERSION,
|
||||
};
|
||||
use parachains_common::{westend::currency::EXISTENTIAL_DEPOSIT, AccountId, AuraId};
|
||||
use parachains_common::{AccountId, AuraId};
|
||||
use sc_chain_spec::ChainType;
|
||||
use sp_core::sr25519;
|
||||
|
||||
pub(crate) const PEOPLE_WESTEND: &str = "people-westend";
|
||||
pub(crate) const PEOPLE_WESTEND_LOCAL: &str = "people-westend-local";
|
||||
pub(crate) const PEOPLE_WESTEND_DEVELOPMENT: &str = "people-westend-development";
|
||||
const PEOPLE_WESTEND_ED: PeopleBalance = EXISTENTIAL_DEPOSIT;
|
||||
const PEOPLE_WESTEND_ED: PeopleBalance = people_westend_runtime::ExistentialDeposit::get();
|
||||
|
||||
pub fn local_config(
|
||||
id: &str,
|
||||
|
||||
Reference in New Issue
Block a user