mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 00:31:02 +00:00
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:
committed by
Bastian Köcher
parent
b6d034afaf
commit
904b9f4da5
@@ -156,20 +156,17 @@ impl SubmitEthereumHeaders for SubstrateClient<Rialto> {
|
||||
) -> SubmittedHeaders<EthereumHeaderId, RpcError> {
|
||||
let ids = headers.iter().map(|header| header.id()).collect();
|
||||
let submission_result = async {
|
||||
self.submit_signed_extrinsic(
|
||||
params.signer.public().as_array_ref().clone().into(),
|
||||
|transaction_nonce| {
|
||||
Bytes(
|
||||
Rialto::sign_transaction(
|
||||
*self.genesis_hash(),
|
||||
¶ms.signer,
|
||||
transaction_nonce,
|
||||
instance.build_signed_header_call(headers),
|
||||
)
|
||||
.encode(),
|
||||
self.submit_signed_extrinsic(params.public().as_array_ref().clone().into(), |transaction_nonce| {
|
||||
Bytes(
|
||||
Rialto::sign_transaction(
|
||||
*self.genesis_hash(),
|
||||
¶ms,
|
||||
transaction_nonce,
|
||||
instance.build_signed_header_call(headers),
|
||||
)
|
||||
},
|
||||
)
|
||||
.encode(),
|
||||
)
|
||||
})
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
@@ -260,20 +257,17 @@ impl SubmitEthereumExchangeTransactionProof for SubstrateClient<Rialto> {
|
||||
instance: Arc<dyn BridgeInstance>,
|
||||
proof: rialto_runtime::exchange::EthereumTransactionInclusionProof,
|
||||
) -> RpcResult<()> {
|
||||
self.submit_signed_extrinsic(
|
||||
params.signer.public().as_array_ref().clone().into(),
|
||||
|transaction_nonce| {
|
||||
Bytes(
|
||||
Rialto::sign_transaction(
|
||||
*self.genesis_hash(),
|
||||
¶ms.signer,
|
||||
transaction_nonce,
|
||||
instance.build_currency_exchange_call(proof),
|
||||
)
|
||||
.encode(),
|
||||
self.submit_signed_extrinsic(params.public().as_array_ref().clone().into(), |transaction_nonce| {
|
||||
Bytes(
|
||||
Rialto::sign_transaction(
|
||||
*self.genesis_hash(),
|
||||
¶ms,
|
||||
transaction_nonce,
|
||||
instance.build_currency_exchange_call(proof),
|
||||
)
|
||||
},
|
||||
)
|
||||
.encode(),
|
||||
)
|
||||
})
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user