From e44fcbe27e36f84a1685c4f55031e1f666cc920c Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Fri, 16 Dec 2022 10:31:51 +0000 Subject: [PATCH] tx: Expose the tx index Signed-off-by: Alexandru Vasile --- subxt/src/tx/tx_progress.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/subxt/src/tx/tx_progress.rs b/subxt/src/tx/tx_progress.rs index a1d3e44ca4..2c736a9ccd 100644 --- a/subxt/src/tx/tx_progress.rs +++ b/subxt/src/tx/tx_progress.rs @@ -334,6 +334,11 @@ impl> TxInBlock { self.ext_hash } + /// Return the index of the extrinsic that was submitted. + pub fn extrinsic_index(&self) -> usize { + self.index + } + /// Fetch the events associated with this transaction. If the transaction /// was successful (ie no `ExtrinsicFailed`) events were found, then we return /// the events associated with it. If the transaction was not successful, or