diff --git a/subxt/src/blocks/block_types.rs b/subxt/src/blocks/block_types.rs index 0105f428c7..36b42d3569 100644 --- a/subxt/src/blocks/block_types.rs +++ b/subxt/src/blocks/block_types.rs @@ -266,6 +266,15 @@ impl ExtrinsicEvents { self.find::().next().transpose() } + /// Iterate through the transaction events using metadata to dynamically decode and skip + /// them, and return the last event found which decodes to the provided `Ev` type. + /// + /// This works in the same way that [`events::Events::find_last()`] does, with the + /// exception that it ignores events not related to the submitted extrinsic. + pub fn find_last(&self) -> Result, Error> { + self.find::().last().transpose() + } + /// Find an event in those associated with this transaction. Returns true if it was found. /// /// This works in the same way that [`events::Events::has()`] does, with the