Struct dharitri_wasm::types::ContractCall
source · pub struct ContractCall<BigUint: BigUintApi + 'static, R> {
pub arg_buffer: ArgBuffer,
/* private fields */
}Expand description
Represents metadata for calling another contract. Can transform into either an async call, transfer call or other types of calls.
Fields§
§arg_buffer: ArgBufferImplementations§
source§impl<BigUint, R> ContractCall<BigUint, R>where
BigUint: BigUintApi,
impl<BigUint, R> ContractCall<BigUint, R>where
BigUint: BigUintApi,
pub fn new( to: Address, token: TokenIdentifier, payment: BigUint, endpoint_name: BoxedBytes ) -> Self
pub fn get_mut_arg_buffer(&mut self) -> &mut ArgBuffer
sourcepub fn push_argument_raw_bytes(&mut self, bytes: &[u8])
pub fn push_argument_raw_bytes(&mut self, bytes: &[u8])
Provided for cases where we build the contract call by hand.
pub fn async_call(self) -> AsyncCall<BigUint>
sourcepub fn transfer_moax_execute(self) -> TransferMoaxExecute<BigUint>
pub fn transfer_moax_execute(self) -> TransferMoaxExecute<BigUint>
Produces an MOAX (or no value) transfer-execute call, no callback.
Will always result in a transferValueExecute call.
sourcepub fn transfer_dct_execute(self) -> TransferDctExecute<BigUint>
pub fn transfer_dct_execute(self) -> TransferDctExecute<BigUint>
Produces an DCT transfer-execute call, no callback.
Will always result in a transferDCTExecute call.
sourcepub fn transfer_execute(self) -> TransferExecute<BigUint>
pub fn transfer_execute(self) -> TransferExecute<BigUint>
Produces a transfer-execute call, no callback.
Will result in either a transferValueExecute or a transferDCTExecute call, depending on input.
source§impl<BigUint, R> ContractCall<BigUint, R>where
BigUint: BigUintApi,
R: DynArg,
impl<BigUint, R> ContractCall<BigUint, R>where
BigUint: BigUintApi,
R: DynArg,
sourcepub fn execute_on_dest_context<SA>(self, gas: u64, api: SA) -> Rwhere
SA: SendApi<BigUint>,
pub fn execute_on_dest_context<SA>(self, gas: u64, api: SA) -> Rwhere
SA: SendApi<BigUint>,
Executes immediately, synchronously, and returns contract call result. Only works if the target contract is in the same shard.
Auto Trait Implementations§
impl<BigUint, R> RefUnwindSafe for ContractCall<BigUint, R>where
BigUint: RefUnwindSafe,
R: RefUnwindSafe,
impl<BigUint, R> Send for ContractCall<BigUint, R>
impl<BigUint, R> Sync for ContractCall<BigUint, R>
impl<BigUint, R> Unpin for ContractCall<BigUint, R>
impl<BigUint, R> UnwindSafe for ContractCall<BigUint, R>where
BigUint: UnwindSafe,
R: UnwindSafe,
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