Addressed comments and restored extract_genesis_wasm macro
@@ -30,13 +30,7 @@ pub mod standalone {
}
fn description() -> String {
- format!(
- "Circuit Parachain Collator\n\nThe command-line arguments provided first will be \
- passed to the parachain node, while the arguments provided after -- will be passed \
- to the relay chain node.\n\n\
- {} [parachain-args] -- [relaychain-args]",
- Self::executable_name()
- )
+ format!("Circuit Standalone Node")
}
fn author() -> String {
@@ -183,6 +177,18 @@ pub mod parachain {
use std::net::SocketAddr;
use t3rn_primitives::Block;
+ #[allow(clippy::borrowed_box)]
+ fn extract_genesis_wasm(
+ chain_spec: &Box<dyn sc_service::ChainSpec>,
+ ) -> sc_cli::Result<Vec<u8>> {
+ let mut storage = chain_spec.build_storage()?;
+
+ storage
+ .top
+ .remove(sp_core::storage::well_known_keys::CODE)
+ .ok_or_else(|| "Could not find wasm file in genesis state!".into())
+ }
+
macro_rules! construct_async_run {
(|$components:ident, $cli:ident, $cmd:ident, $config:ident| $( $code:tt )* ) => {{
let runner = $cli.create_runner($cmd)?;
@@ -212,49 +218,6 @@ pub mod parachain {
})
}
- impl SubstrateCli for Cli {
- fn impl_name() -> String {
- "Circuit Parachain Collator".into()
- }
-
- fn impl_version() -> String {
- "0.1.0".into()
- }
-
- fn description() -> String {
- format!(
- "Circuit Parachain Collator\n\nThe command-line arguments provided first will be \
- passed to the parachain node, while the arguments provided after -- will be passed \
- to the relay chain node.\n\n\
- {} [parachain-args] -- [relaychain-args]",
- Self::executable_name()
- )
- }
-
- fn author() -> String {
- "t3rn".into()
- }
-
- fn support_url() -> String {
- "https://github.com/t3rn/t3rn/issues/new".into()
- }
-
- fn copyright_start_year() -> i32 {
- 2020
- }
-
- fn load_spec(
- &self,
- id: &str,
- ) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
- load_spec(id)
- }
-
- fn native_runtime_version(_: &Box<dyn sc_service::ChainSpec>) -> &'static RuntimeVersion {
- &VERSION
- }
- }
-
impl SubstrateCli for RelayChainCli {
fn impl_name() -> String {
"Circuit Parachain Collator".into()
