mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 08:41:02 +00:00
Move generic CLI logic to different crate (#2885)
* Move generic CLI logic to separate crate * Move and rename `CliChain` trait definition Move it to `relay-substrate-client` * Move generic cli logic to substrate-relay-helper * Fix docs warnings
This commit is contained in:
committed by
Bastian Köcher
parent
bfce7a250f
commit
3643f721d4
@@ -16,6 +16,7 @@
|
||||
|
||||
use crate::calls::UtilityCall;
|
||||
|
||||
use crate::SimpleRuntimeVersion;
|
||||
use bp_header_chain::ChainWithGrandpa as ChainWithGrandpaBase;
|
||||
use bp_messages::ChainWithMessages as ChainWithMessagesBase;
|
||||
use bp_runtime::{
|
||||
@@ -58,6 +59,16 @@ pub trait Chain: ChainBase + Clone {
|
||||
type Call: Clone + Codec + Debug + Send + Sync;
|
||||
}
|
||||
|
||||
/// Bridge-supported network definition.
|
||||
///
|
||||
/// Used to abstract away CLI commands.
|
||||
pub trait ChainWithRuntimeVersion: Chain {
|
||||
/// Current version of the chain runtime, known to relay.
|
||||
///
|
||||
/// can be `None` if relay is not going to submit transactions to that chain.
|
||||
const RUNTIME_VERSION: Option<SimpleRuntimeVersion>;
|
||||
}
|
||||
|
||||
/// Substrate-based relay chain that supports parachains.
|
||||
///
|
||||
/// We assume that the parachains are supported using `runtime_parachains::paras` pallet.
|
||||
|
||||
@@ -35,9 +35,9 @@ use std::time::Duration;
|
||||
pub use crate::{
|
||||
chain::{
|
||||
AccountKeyPairOf, BlockWithJustification, CallOf, Chain, ChainWithBalances,
|
||||
ChainWithGrandpa, ChainWithMessages, ChainWithTransactions, ChainWithUtilityPallet,
|
||||
FullRuntimeUtilityPallet, MockedRuntimeUtilityPallet, Parachain, RelayChain, SignParam,
|
||||
TransactionStatusOf, UnsignedTransaction, UtilityPallet,
|
||||
ChainWithGrandpa, ChainWithMessages, ChainWithRuntimeVersion, ChainWithTransactions,
|
||||
ChainWithUtilityPallet, FullRuntimeUtilityPallet, MockedRuntimeUtilityPallet, Parachain,
|
||||
RelayChain, SignParam, TransactionStatusOf, UnsignedTransaction, UtilityPallet,
|
||||
},
|
||||
client::{
|
||||
is_ancient_block, ChainRuntimeVersion, Client, OpaqueGrandpaAuthoritiesSet,
|
||||
|
||||
Reference in New Issue
Block a user