Make relay CLI generic (#849)

* Start generalizing rialto-millau commands.

* cargo fmt --all

* Introduce generic balance.

* Unify message payloads.

* cargo fmt --all

* init - generic

* Attempt to unify send message.

* Start moving things around.

* cargo fmt --all

* Move init-bridge.

* cargo fmt --all

* Improve UX of bridge argument.

* Fix clippy.

* Fix docs and scripts.

* Add docs.

* Apply suggestions from code review

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* Fix copyright.

* Add issue numbers.

* More todos.

* Update comments.

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
This commit is contained in:
Tomasz Drwięga
2021-04-01 12:49:49 +02:00
committed by Bastian Köcher
parent b6d034afaf
commit 904b9f4da5
22 changed files with 896 additions and 879 deletions
@@ -56,7 +56,6 @@ pub enum ExchangeRelayMode {
}
/// PoA exchange transaction relay params.
#[derive(Debug)]
pub struct EthereumExchangeParams {
/// Ethereum connection params.
pub eth_params: EthereumConnectionParams,
@@ -72,6 +71,19 @@ pub struct EthereumExchangeParams {
pub instance: Arc<dyn BridgeInstance>,
}
impl std::fmt::Debug for EthereumExchangeParams {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
f.debug_struct("EthereumExchangeParams")
.field("eth_params", &self.eth_params)
.field("sub_params", &self.sub_params)
.field("sub_sign", &sp_core::Pair::public(&self.sub_sign))
.field("mode", &self.mode)
.field("metrics_params", &self.metrics_params)
.field("instance", &self.instance)
.finish()
}
}
/// Ethereum to Substrate exchange pipeline.
struct EthereumToSubstrateExchange;