Struct darkfi_sdk::tx::ContractCall
source · pub struct ContractCall {
pub contract_id: ContractId,
pub data: Vec<u8>,
}
Expand description
A ContractCall is the part of a transaction that executes a certain
contract_id
with data
as the call’s payload.
Fields§
§contract_id: ContractId
ID of the contract invoked
data: Vec<u8>
Call data passed to the contract
Implementations§
source§impl ContractCall
impl ContractCall
sourcepub fn is_money_fee(&self) -> bool
pub fn is_money_fee(&self) -> bool
Returns true if call is a money fee.
sourcepub fn is_money_genesis_mint(&self) -> bool
pub fn is_money_genesis_mint(&self) -> bool
Returns true if call is a money genesis mint.
sourcepub fn is_money_pow_reward(&self) -> bool
pub fn is_money_pow_reward(&self) -> bool
Returns true if call is a money PoW reward.
sourcepub fn is_money_transfer(&self) -> bool
pub fn is_money_transfer(&self) -> bool
Returns true if call is a money transfer.
sourcepub fn is_money_otc_swap(&self) -> bool
pub fn is_money_otc_swap(&self) -> bool
Returns true if call is a money over-the-counter swap.
sourcepub fn is_money_auth_token_mint(&self) -> bool
pub fn is_money_auth_token_mint(&self) -> bool
Returns true if call is a money token mint authorization.
sourcepub fn is_money_auth_token_freeze(&self) -> bool
pub fn is_money_auth_token_freeze(&self) -> bool
Returns true if call is a money token freeze authorization.
sourcepub fn is_money_token_mint(&self) -> bool
pub fn is_money_token_mint(&self) -> bool
Returns true if call is a money token mint.
sourcepub fn is_dao_mint(&self) -> bool
pub fn is_dao_mint(&self) -> bool
Returns true if call is a DAO mint.
sourcepub fn is_dao_propose(&self) -> bool
pub fn is_dao_propose(&self) -> bool
Returns true if call is a DAO proposal.
sourcepub fn is_dao_vote(&self) -> bool
pub fn is_dao_vote(&self) -> bool
Returns true if call is a DAO vote.
sourcepub fn is_dao_exec(&self) -> bool
pub fn is_dao_exec(&self) -> bool
Returns true if call is a DAO execution.
sourcepub fn is_dao_auth_money_transfer(&self) -> bool
pub fn is_dao_auth_money_transfer(&self) -> bool
Returns true if call is a DAO money transfer authorization.
sourcepub fn is_deployment(&self) -> bool
pub fn is_deployment(&self) -> bool
Returns true if call is a deployoor deployment.
sourcepub fn matches_contract_call_type(
&self,
contract_id: ContractId,
func_code: u8,
) -> bool
pub fn matches_contract_call_type( &self, contract_id: ContractId, func_code: u8, ) -> bool
Returns true if contract call matches provided contract id and function code.
Trait Implementations§
source§impl AsyncDecodable for ContractCall
impl AsyncDecodable for ContractCall
source§impl AsyncEncodable for ContractCall
impl AsyncEncodable for ContractCall
source§fn encode_async<'life0, 'life1, 'async_trait, S>(
&'life0 self,
s: &'life1 mut S,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
fn encode_async<'life0, 'life1, 'async_trait, S>( &'life0 self, s: &'life1 mut S, ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
AsyncWrite
errors.
Returns the number of bytes written on success.source§impl Clone for ContractCall
impl Clone for ContractCall
source§fn clone(&self) -> ContractCall
fn clone(&self) -> ContractCall
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ContractCall
impl Debug for ContractCall
source§impl Decodable for ContractCall
impl Decodable for ContractCall
source§impl Encodable for ContractCall
impl Encodable for ContractCall
source§impl PartialEq for ContractCall
impl PartialEq for ContractCall
source§fn eq(&self, other: &ContractCall) -> bool
fn eq(&self, other: &ContractCall) -> bool
self
and other
values to be equal, and is used
by ==
.impl Eq for ContractCall
impl StructuralPartialEq for ContractCall
Auto Trait Implementations§
impl Freeze for ContractCall
impl RefUnwindSafe for ContractCall
impl Send for ContractCall
impl Sync for ContractCall
impl Unpin for ContractCall
impl UnwindSafe for ContractCall
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.