pub struct MulticallResult {
pub success: bool,
pub data: Bytes,
}Expand description
Result of a single call in the multicall batch
Fields§
§success: boolWhether the call succeeded
data: BytesThe return data (empty if failed)
Implementations§
Source§impl MulticallResult
impl MulticallResult
Sourcepub fn decode_uint256(&self) -> Option<U256>
pub fn decode_uint256(&self) -> Option<U256>
Try to decode as uint256 (for totalSupply, balanceOf, getEthBalance)
Sourcepub fn decode_uint8(&self) -> Option<u8>
pub fn decode_uint8(&self) -> Option<u8>
Try to decode as uint8 (for decimals)
Sourcepub fn decode_string(&self) -> Option<String>
pub fn decode_string(&self) -> Option<String>
Try to decode as a string (for name/symbol)
Trait Implementations§
Source§impl Clone for MulticallResult
impl Clone for MulticallResult
Source§fn clone(&self) -> MulticallResult
fn clone(&self) -> MulticallResult
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 moreAuto Trait Implementations§
impl !Freeze for MulticallResult
impl RefUnwindSafe for MulticallResult
impl Send for MulticallResult
impl Sync for MulticallResult
impl Unpin for MulticallResult
impl UnsafeUnpin for MulticallResult
impl UnwindSafe for MulticallResult
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