[CLI] Remove some macros

Refactor the implementations for the following CLI methods in order to
avoid using macros:
- init_bridge
- relay_headers
- relay_parachains

Signed-off-by: Serban Iorga <serban@parity.io>
This commit is contained in:
Serban Iorga
2022-07-05 16:28:19 +03:00
committed by Bastian Köcher
parent 4929493f83
commit 46c0400f26
5 changed files with 464 additions and 321 deletions
@@ -17,7 +17,7 @@
//! Westend chain specification for CLI.
use crate::cli::CliChain;
use relay_westend_client::Westend;
use relay_westend_client::{Westend, Westmint};
use sp_version::RuntimeVersion;
impl CliChain for Westend {
@@ -33,3 +33,17 @@ impl CliChain for Westend {
.into()
}
}
impl CliChain for Westmint {
const RUNTIME_VERSION: RuntimeVersion = bp_westend::VERSION;
type KeyPair = sp_core::sr25519::Pair;
type MessagePayload = Vec<u8>;
fn ss58_format() -> u16 {
sp_core::crypto::Ss58AddressFormat::from(
sp_core::crypto::Ss58AddressFormatRegistry::SubstrateAccount,
)
.into()
}
}