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
-45
View File
@@ -69,21 +69,6 @@ type HostFunctions = sp_io::SubstrateHostFunctions;
type HostFunctions =
(sp_io::SubstrateHostFunctions, frame_benchmarking::benchmarking::HostFunctions);
/// Native executor instance.
pub struct RococoParachainRuntimeExecutor;
impl sc_executor::NativeExecutionDispatch for RococoParachainRuntimeExecutor {
type ExtendHostFunctions = ();
fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {
rococo_parachain_runtime::api::dispatch(method, data)
}
fn native_version() -> sc_executor::NativeVersion {
rococo_parachain_runtime::native_version()
}
}
/// Native executor instance.
pub struct ShellRuntimeExecutor;
@@ -99,21 +84,6 @@ impl sc_executor::NativeExecutionDispatch for ShellRuntimeExecutor {
}
}
/// Native executor instance.
pub struct SeedlingRuntimeExecutor;
impl sc_executor::NativeExecutionDispatch for SeedlingRuntimeExecutor {
type ExtendHostFunctions = ();
fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {
seedling_runtime::api::dispatch(method, data)
}
fn native_version() -> sc_executor::NativeVersion {
seedling_runtime::native_version()
}
}
// Native Statemint executor instance.
pub struct StatemintRuntimeExecutor;
@@ -174,21 +144,6 @@ impl sc_executor::NativeExecutionDispatch for CollectivesPolkadotRuntimeExecutor
}
}
/// Native Contracts on Rococo executor instance.
pub struct ContractsRococoRuntimeExecutor;
impl sc_executor::NativeExecutionDispatch for ContractsRococoRuntimeExecutor {
type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;
fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {
contracts_rococo_runtime::api::dispatch(method, data)
}
fn native_version() -> sc_executor::NativeVersion {
contracts_rococo_runtime::native_version()
}
}
/// Starts a `ServiceBuilder` for a full service.
///
/// Use this macro if you don't actually need the full service, but just the builder in order to