pub struct SorobanTransactionResponse {
pub response: GetTransactionResponse,
}
Expand description
Extended transaction response with methods to extract Soroban-specific data
Fields§
§response: GetTransactionResponse
The underlying RPC transaction response
Implementations§
Source§impl SorobanTransactionResponse
impl SorobanTransactionResponse
Sourcepub fn new(response: GetTransactionResponse) -> Self
pub fn new(response: GetTransactionResponse) -> Self
Creates a new SorobanTransactionResponse from a GetTransactionResponse
Sourcepub fn get_return_value(&self) -> Result<ScVal, SorobanHelperError>
pub fn get_return_value(&self) -> Result<ScVal, SorobanHelperError>
Extracts the Soroban transaction return value from the transaction metadata
§Returns
The Soroban return value as an ScVal or an error if:
- The transaction result is not available
- The transaction metadata is not available
- The transaction metadata is not in V3 format
- The Soroban metadata is not available
Sourcepub fn get_events(&self) -> Result<Vec<ContractEvent>, SorobanHelperError>
pub fn get_events(&self) -> Result<Vec<ContractEvent>, SorobanHelperError>
Extracts the Soroban transaction events from the transaction metadata
§Returns
A vector of contract events or an error if:
- The transaction result is not available
- The transaction metadata is not available
- The transaction metadata is not in V3 format
- The Soroban metadata is not available
Sourcepub fn get_soroban_meta(
&self,
) -> Result<SorobanTransactionMeta, SorobanHelperError>
pub fn get_soroban_meta( &self, ) -> Result<SorobanTransactionMeta, SorobanHelperError>
Extracts the full Soroban transaction metadata
§Returns
The Soroban transaction metadata or an error if:
- The transaction result is not available
- The transaction metadata is not available
- The transaction metadata is not in V3 format
- The Soroban metadata is not available
Trait Implementations§
Source§impl Clone for SorobanTransactionResponse
impl Clone for SorobanTransactionResponse
Source§fn clone(&self) -> SorobanTransactionResponse
fn clone(&self) -> SorobanTransactionResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SorobanTransactionResponse
impl Debug for SorobanTransactionResponse
Source§impl From<GetTransactionResponse> for SorobanTransactionResponse
impl From<GetTransactionResponse> for SorobanTransactionResponse
Source§fn from(response: GetTransactionResponse) -> Self
fn from(response: GetTransactionResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SorobanTransactionResponse
impl RefUnwindSafe for SorobanTransactionResponse
impl Send for SorobanTransactionResponse
impl Sync for SorobanTransactionResponse
impl Unpin for SorobanTransactionResponse
impl UnwindSafe for SorobanTransactionResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more