Removed dependance on rococo_parachain_runtime for unrelated stuff (#1500)

* Clean misleading imports `rococo_parachain_runtime::{AccountId, AuraId}`

* Remove dependance on `rococo_parachain_runtime` for unrelated stuff

* fmt + rebase fix

* Addressing review comments

* Addressing review comments

* Fix for `purge_chain_works` works now with `rococo-local` and purge command needs to allow `rococo-native`
This commit is contained in:
Branislav Kontur
2022-08-16 12:22:22 +02:00
committed by GitHub
parent 15943f1852
commit d709336a09
19 changed files with 370 additions and 266 deletions
+3 -3
View File
@@ -14,7 +14,7 @@ pub type ChainSpec =
const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION;
/// Helper function to generate a crypto pair from seed
pub fn get_public_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {
pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {
TPublic::Pair::from_string(&format!("//{}", seed), None)
.expect("static values are valid; qed")
.public()
@@ -43,7 +43,7 @@ type AccountPublic = <Signature as Verify>::Signer;
///
/// This function's return type must always match the session keys of the chain in tuple format.
pub fn get_collator_keys_from_seed(seed: &str) -> AuraId {
get_public_from_seed::<AuraId>(seed)
get_from_seed::<AuraId>(seed)
}
/// Helper function to generate an account ID from seed
@@ -51,7 +51,7 @@ pub fn get_account_id_from_seed<TPublic: Public>(seed: &str) -> AccountId
where
AccountPublic: From<<TPublic::Pair as Pair>::Public>,
{
AccountPublic::from(get_public_from_seed::<TPublic>(seed)).into_account()
AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()
}
/// Generate the session keys from individual elements.