pub struct DynSolCall { /* private fields */ }Available on crate feature
dyn-abi only.Expand description
A representation of a Solidity call
Implementations§
Source§impl DynSolCall
impl DynSolCall
Sourcepub const fn new(
selector: FixedBytes<4>,
parameters: Vec<DynSolType>,
method: Option<String>,
returns: DynSolReturns,
) -> DynSolCall
pub const fn new( selector: FixedBytes<4>, parameters: Vec<DynSolType>, method: Option<String>, returns: DynSolReturns, ) -> DynSolCall
Create a new DynSolCall with the given selector and types.
Sourcepub const fn selector(&self) -> FixedBytes<4>
pub const fn selector(&self) -> FixedBytes<4>
Get the selector of the call.
Sourcepub fn types(&self) -> &[DynSolType]
pub fn types(&self) -> &[DynSolType]
Get the types of the call.
Sourcepub const fn returns(&self) -> &DynSolReturns
pub const fn returns(&self) -> &DynSolReturns
Get the types of the call’s returns.
Sourcepub fn abi_encode_input(&self, values: &[DynSolValue]) -> Result<Vec<u8>, Error>
pub fn abi_encode_input(&self, values: &[DynSolValue]) -> Result<Vec<u8>, Error>
ABI encode the given values as function params.
Sourcepub fn abi_encode_input_raw(
&self,
values: &[DynSolValue],
) -> Result<Vec<u8>, Error>
pub fn abi_encode_input_raw( &self, values: &[DynSolValue], ) -> Result<Vec<u8>, Error>
ABI encode the given values as function params without prefixing the selector.
Sourcepub fn abi_decode_input(
&self,
data: &[u8],
validate: bool,
) -> Result<Vec<DynSolValue>, Error>
pub fn abi_decode_input( &self, data: &[u8], validate: bool, ) -> Result<Vec<DynSolValue>, Error>
ABI decode the given data as function returns.
Sourcepub fn abi_encode_output(
&self,
values: &[DynSolValue],
) -> Result<Vec<u8>, Error>
pub fn abi_encode_output( &self, values: &[DynSolValue], ) -> Result<Vec<u8>, Error>
ABI encode the given values as function return values.
Sourcepub fn abi_decode_output(
&self,
data: &[u8],
validate: bool,
) -> Result<Vec<DynSolValue>, Error>
pub fn abi_decode_output( &self, data: &[u8], validate: bool, ) -> Result<Vec<DynSolValue>, Error>
ABI decode the given data as function return values.
Trait Implementations§
Source§impl Clone for DynSolCall
impl Clone for DynSolCall
Source§fn clone(&self) -> DynSolCall
fn clone(&self) -> DynSolCall
Returns a copy 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 DynSolCall
impl Debug for DynSolCall
Source§impl PartialEq for DynSolCall
impl PartialEq for DynSolCall
Source§impl Specifier<DynSolCall> for Function
impl Specifier<DynSolCall> for Function
impl Eq for DynSolCall
impl StructuralPartialEq for DynSolCall
Auto Trait Implementations§
impl Freeze for DynSolCall
impl RefUnwindSafe for DynSolCall
impl Send for DynSolCall
impl Sync for DynSolCall
impl Unpin for DynSolCall
impl UnwindSafe for DynSolCall
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 80 bytes