Skip to content

Commit

Permalink
Allow taking out raw bytes from a SubmittableExtrinsic
Browse files Browse the repository at this point in the history
  • Loading branch information
MOZGIII committed Oct 6, 2022
1 parent 98af356 commit 995d079
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions subxt/src/tx/tx_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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_bytes(self) -> Vec<u8> {
self.encoded.0
}
}

impl<T, C> SubmittableExtrinsic<T, C>
Expand Down

0 comments on commit 995d079

Please sign in to comment.