Move Relay-Specific Shared Code to One Place (#1193)

* add common libs

* asset hubs

* add westend

* bridge hubs

* collectives

* contracts

* emulated tests

* parachain bin

* delete collectives constants and update docs

* integration tests should have apache license (some missing, some needed changing)

* propagate features

* fmt
This commit is contained in:
joe petrowski
2023-09-05 08:13:19 +02:00
committed by GitHub
parent 7217a5da65
commit a14691804d
68 changed files with 523 additions and 998 deletions
@@ -32,11 +32,11 @@ pub type AssetHubWestendChainSpec =
sc_service::GenericChainSpec<asset_hub_westend_runtime::RuntimeGenesisConfig, Extensions>;
const ASSET_HUB_POLKADOT_ED: AssetHubBalance =
asset_hub_polkadot_runtime::constants::currency::EXISTENTIAL_DEPOSIT;
parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT;
const ASSET_HUB_KUSAMA_ED: AssetHubBalance =
asset_hub_kusama_runtime::constants::currency::EXISTENTIAL_DEPOSIT;
parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT;
const ASSET_HUB_WESTEND_ED: AssetHubBalance =
asset_hub_westend_runtime::constants::currency::EXISTENTIAL_DEPOSIT;
parachains_common::westend::currency::EXISTENTIAL_DEPOSIT;
/// Generate the session keys from individual elements.
///
@@ -192,7 +192,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 =
bridge_hub_rococo_runtime::constants::currency::EXISTENTIAL_DEPOSIT;
parachains_common::rococo::currency::EXISTENTIAL_DEPOSIT;
/// Specialized `ChainSpec` for the normal parachain runtime.
pub type BridgeHubChainSpec =
@@ -372,7 +372,7 @@ pub mod kusama {
pub(crate) const BRIDGE_HUB_KUSAMA_LOCAL: &str = "bridge-hub-kusama-local";
pub(crate) const BRIDGE_HUB_KUSAMA_DEVELOPMENT: &str = "bridge-hub-kusama-dev";
const BRIDGE_HUB_KUSAMA_ED: BridgeHubBalance =
bridge_hub_kusama_runtime::constants::currency::EXISTENTIAL_DEPOSIT;
parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT;
/// Specialized `ChainSpec` for the normal parachain runtime.
pub type BridgeHubChainSpec =
@@ -509,7 +509,7 @@ pub mod polkadot {
pub(crate) const BRIDGE_HUB_POLKADOT_LOCAL: &str = "bridge-hub-polkadot-local";
pub(crate) const BRIDGE_HUB_POLKADOT_DEVELOPMENT: &str = "bridge-hub-polkadot-dev";
const BRIDGE_HUB_POLKADOT_ED: BridgeHubBalance =
bridge_hub_polkadot_runtime::constants::currency::EXISTENTIAL_DEPOSIT;
parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT;
/// Specialized `ChainSpec` for the normal parachain runtime.
pub type BridgeHubChainSpec =
@@ -26,7 +26,7 @@ pub type CollectivesPolkadotChainSpec =
sc_service::GenericChainSpec<collectives_polkadot_runtime::RuntimeGenesisConfig, Extensions>;
const COLLECTIVES_POLKADOT_ED: CollectivesBalance =
collectives_polkadot_runtime::constants::currency::EXISTENTIAL_DEPOSIT;
parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT;
/// Generate the session keys from individual elements.
///
@@ -31,7 +31,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 =
contracts_rococo_runtime::constants::currency::EXISTENTIAL_DEPOSIT;
parachains_common::rococo::currency::EXISTENTIAL_DEPOSIT;
pub fn contracts_rococo_development_config() -> ContractsRococoChainSpec {
let mut properties = sc_chain_spec::Properties::new();