Struct multiversx_sc::types::ContractCallNoPayment
source · pub struct ContractCallNoPayment<SA, OriginalResult>where
SA: CallTypeApi + 'static,{
pub to: ManagedAddress<SA>,
pub function_call: FunctionCall<SA>,
pub explicit_gas_limit: u64,
/* private fields */
}Expand description
Holds metadata for calling another contract, without payments.
Proxies generally create contract calls of this type (unless there are payment arguments in the endpoint - but these are mostly obsolete now).
It is also the basis for all other contract call types, all of them contain this one.
Fields§
§to: ManagedAddress<SA>§function_call: FunctionCall<SA>§explicit_gas_limit: u64Implementations§
source§impl<SA, OriginalResult> ContractCallNoPayment<SA, OriginalResult>where
SA: CallTypeApi + 'static,
impl<SA, OriginalResult> ContractCallNoPayment<SA, OriginalResult>where
SA: CallTypeApi + 'static,
pub fn new<N: Into<ManagedBuffer<SA>>>( to: ManagedAddress<SA>, endpoint_name: N ) -> Self
sourcepub fn with_egld_transfer(
self,
egld_amount: BigUint<SA>
) -> ContractCallWithEgld<SA, OriginalResult>
pub fn with_egld_transfer( self, egld_amount: BigUint<SA> ) -> ContractCallWithEgld<SA, OriginalResult>
Sets payment to be EGLD transfer.
sourcepub fn with_esdt_transfer<P: Into<EsdtTokenPayment<SA>>>(
self,
payment: P
) -> ContractCallWithMultiEsdt<SA, OriginalResult>
pub fn with_esdt_transfer<P: Into<EsdtTokenPayment<SA>>>( self, payment: P ) -> ContractCallWithMultiEsdt<SA, OriginalResult>
Adds a single ESDT token transfer to a contract call.
Can be called multiple times on the same call.
pub fn add_esdt_token_transfer( self, payment_token: TokenIdentifier<SA>, payment_nonce: u64, payment_amount: BigUint<SA> ) -> ContractCallWithMultiEsdt<SA, OriginalResult>
👎Deprecated since 0.39.0: Replace by
contract_call.with_esdt_transfer((payment_token, payment_nonce, payment_amount)).
The tuple argument will get automatically converted to EsdtTokenPayment.sourcepub fn with_multi_token_transfer(
self,
payments: ManagedVec<SA, EsdtTokenPayment<SA>>
) -> ContractCallWithMultiEsdt<SA, OriginalResult>
pub fn with_multi_token_transfer( self, payments: ManagedVec<SA, EsdtTokenPayment<SA>> ) -> ContractCallWithMultiEsdt<SA, OriginalResult>
Sets payment to be a (potentially) multi-token transfer.
sourcepub fn with_any_payment(
self,
payment: EgldOrMultiEsdtPayment<SA>
) -> ContractCallWithAnyPayment<SA, OriginalResult>
pub fn with_any_payment( self, payment: EgldOrMultiEsdtPayment<SA> ) -> ContractCallWithAnyPayment<SA, OriginalResult>
Sets payment to be a (potentially) multi-token transfer.
sourcepub fn with_egld_or_single_esdt_transfer<P: Into<EgldOrEsdtTokenPayment<SA>>>(
self,
payment: P
) -> ContractCallWithEgldOrSingleEsdt<SA, OriginalResult>
pub fn with_egld_or_single_esdt_transfer<P: Into<EgldOrEsdtTokenPayment<SA>>>( self, payment: P ) -> ContractCallWithEgldOrSingleEsdt<SA, OriginalResult>
Sets payment to be either EGLD or a single ESDT transfer, as determined at runtime.
pub fn with_egld_or_single_esdt_token_transfer( self, payment_token: EgldOrEsdtTokenIdentifier<SA>, payment_nonce: u64, payment_amount: BigUint<SA> ) -> ContractCallWithEgldOrSingleEsdt<SA, OriginalResult>
👎Deprecated since 0.39.0: Replace by
contract_call.with_egld_or_single_esdt_transfer((payment_token, payment_nonce, payment_amount)). pub fn into_function_call(self) -> FunctionCall<SA>
Trait Implementations§
source§impl<SA, OriginalResult> ContractCall<SA> for ContractCallNoPayment<SA, OriginalResult>where
SA: CallTypeApi + 'static,
OriginalResult: TopEncodeMulti,
impl<SA, OriginalResult> ContractCall<SA> for ContractCallNoPayment<SA, OriginalResult>where
SA: CallTypeApi + 'static,
OriginalResult: TopEncodeMulti,
type OriginalResult = OriginalResult
source§fn transfer_execute(self)
fn transfer_execute(self)
Immediately launches a transfer-execute call. Read more
source§fn argument<T: TopEncodeMulti>(self, arg: &T) -> Self
fn argument<T: TopEncodeMulti>(self, arg: &T) -> Self
Serializes and pushes a value to the arguments buffer. Read more
source§fn push_raw_argument<RawArg: Into<ManagedBuffer<SA>>>(
&mut self,
raw_arg: RawArg
)
fn push_raw_argument<RawArg: Into<ManagedBuffer<SA>>>( &mut self, raw_arg: RawArg )
For cases where we build the contract call by hand. Read more
source§fn with_raw_arguments(self, raw_argument_buffer: ManagedArgBuffer<SA>) -> Self
fn with_raw_arguments(self, raw_argument_buffer: ManagedArgBuffer<SA>) -> Self
For cases where we build the contract call by hand.
source§fn with_gas_limit(self, gas_limit: u64) -> Self
fn with_gas_limit(self, gas_limit: u64) -> Self
Sets an explicit gas limit to the call.
fn into_call_data_string(self) -> ManagedBuffer<SA>
source§fn async_call(self) -> AsyncCall<SA>
fn async_call(self) -> AsyncCall<SA>
Converts to a legacy async call.
source§fn async_call_promise(self) -> AsyncCallPromises<SA>
fn async_call_promise(self) -> AsyncCallPromises<SA>
Converts to an async promise.
source§fn execute_on_dest_context<RequestedResult>(self) -> RequestedResultwhere
RequestedResult: TopDecodeMulti,
fn execute_on_dest_context<RequestedResult>(self) -> RequestedResultwhere
RequestedResult: TopDecodeMulti,
Executes immediately, synchronously, and returns contract call result.
Only works if the target contract is in the same shard.
source§fn execute_on_dest_context_with_back_transfers<RequestedResult>(
self
) -> (RequestedResult, BackTransfers<SA>)where
RequestedResult: TopDecodeMulti,
fn execute_on_dest_context_with_back_transfers<RequestedResult>(
self
) -> (RequestedResult, BackTransfers<SA>)where
RequestedResult: TopDecodeMulti,
Executes immediately, synchronously, and returns contract call result.
Only works if the target contract is in the same shard.
source§fn execute_on_dest_context_ignore_result(self)
fn execute_on_dest_context_ignore_result(self)
👎Deprecated since 0.36.1: Redundant method, use
let _: IgnoreValue = contract_call.execute_on_dest_context(...) insteadExecutes immediately, synchronously. Read more
source§fn execute_on_dest_context_readonly<RequestedResult>(self) -> RequestedResultwhere
RequestedResult: TopDecodeMulti,
fn execute_on_dest_context_readonly<RequestedResult>(self) -> RequestedResultwhere
RequestedResult: TopDecodeMulti,
Executes immediately, synchronously, and returns contract call result. Read more
source§fn execute_on_same_context<RequestedResult>(self) -> RequestedResultwhere
RequestedResult: TopDecodeMulti,
fn execute_on_same_context<RequestedResult>(self) -> RequestedResultwhere
RequestedResult: TopDecodeMulti,
Executes immediately, synchronously, and returns contract call result. Read more
Auto Trait Implementations§
impl<SA, OriginalResult> CodecFromSelf for ContractCallNoPayment<SA, OriginalResult>where
OriginalResult: CodecFromSelf,
SA: CodecFromSelf,
impl<SA, OriginalResult> RefUnwindSafe for ContractCallNoPayment<SA, OriginalResult>where
OriginalResult: RefUnwindSafe,
SA: RefUnwindSafe,
<SA as HandleTypeInfo>::ManagedBufferHandle: RefUnwindSafe,
impl<SA, OriginalResult> Send for ContractCallNoPayment<SA, OriginalResult>
impl<SA, OriginalResult> Sync for ContractCallNoPayment<SA, OriginalResult>
impl<SA, OriginalResult> Unpin for ContractCallNoPayment<SA, OriginalResult>
impl<SA, OriginalResult> UnwindSafe for ContractCallNoPayment<SA, OriginalResult>where
OriginalResult: UnwindSafe,
SA: UnwindSafe,
<SA as HandleTypeInfo>::ManagedBufferHandle: 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