From 74e2d7735e2bbdbbc3048d6246e88eb4174ecfe3 Mon Sep 17 00:00:00 2001 From: MOZGIII Date: Fri, 7 Oct 2022 00:33:00 +0400 Subject: [PATCH] Allow taking out raw bytes from a SubmittableExtrinsic --- subxt/src/tx/tx_client.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/subxt/src/tx/tx_client.rs b/subxt/src/tx/tx_client.rs index 7e686ebdc5..494ec0f91a 100644 --- a/subxt/src/tx/tx_client.rs +++ b/subxt/src/tx/tx_client.rs @@ -350,6 +350,12 @@ where pub fn encoded(&self) -> &[u8] { &self.encoded.0 } + + /// Consumes [`SubmittableExtrinsic`] and returns the SCALE encoded + /// extrinsic bytes. + pub fn into_encoded(self) -> Vec { + self.encoded.0 + } } impl SubmittableExtrinsic