pub struct DynSolCall { /* private fields */ }
Expand description
A representation of a Solidity call
Implementations§
Source§impl DynSolCall
impl DynSolCall
Sourcepub const fn new(
selector: Selector,
parameters: Vec<DynSolType>,
method: Option<String>,
returns: DynSolReturns,
) -> Self
pub const fn new( selector: Selector, parameters: Vec<DynSolType>, method: Option<String>, returns: DynSolReturns, ) -> Self
Create a new DynSolCall
with the given selector and types.
Sourcepub fn types(&self) -> &[DynSolType]
pub fn types(&self) -> &[DynSolType]
Get the types of the call.
Sourcepub fn abi_encode_input(&self, values: &[DynSolValue]) -> Result<Vec<u8>>
pub fn abi_encode_input(&self, values: &[DynSolValue]) -> Result<Vec<u8>>
ABI encode the given values as function params.
Sourcepub fn abi_encode_input_raw(&self, values: &[DynSolValue]) -> Result<Vec<u8>>
pub fn abi_encode_input_raw(&self, values: &[DynSolValue]) -> Result<Vec<u8>>
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>>
pub fn abi_decode_input( &self, data: &[u8], validate: bool, ) -> Result<Vec<DynSolValue>>
ABI decode the given data as function returns.
Sourcepub fn abi_encode_output(&self, values: &[DynSolValue]) -> Result<Vec<u8>>
pub fn abi_encode_output(&self, values: &[DynSolValue]) -> Result<Vec<u8>>
ABI encode the given values as function return values.
Sourcepub fn abi_decode_output(
&self,
data: &[u8],
validate: bool,
) -> Result<Vec<DynSolValue>>
pub fn abi_decode_output( &self, data: &[u8], validate: bool, ) -> Result<Vec<DynSolValue>>
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
Source§fn resolve(&self) -> Result<DynSolCall>
fn resolve(&self) -> Result<DynSolCall>
Resolve the type into a value.
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)