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 */
}Please use the unified transaction syntax instead.
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>Please use the unified transaction syntax instead.
function_call: FunctionCall<SA>Please use the unified transaction syntax instead.
explicit_gas_limit: u64Please use the unified transaction syntax instead.
Implementations§
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: EsdtTokenIdentifier<SA>, payment_nonce: u64, payment_amount: BigUint<SA>, ) -> ContractCallWithMultiEsdt<SA, OriginalResult>
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>
Replace by contract_call.with_egld_or_single_esdt_transfer((payment_token, payment_nonce, payment_amount)).
pub fn into_function_call(self) -> FunctionCall<SA>
pub fn tx(self) -> Tx<TxScEnv<SA>, (), (), (), (), FunctionCall<SA>, ()>
Trait Implementations§
Source§impl<SA, OriginalResult> ContractCallBase<SA> for ContractCallNoPayment<SA, OriginalResult>where
SA: CallTypeApi + 'static,
OriginalResult: TopEncodeMulti,
impl<SA, OriginalResult> ContractCallBase<SA> for ContractCallNoPayment<SA, OriginalResult>where
SA: CallTypeApi + 'static,
OriginalResult: TopEncodeMulti,
Source§type OriginalResult = OriginalResult
type OriginalResult = OriginalResult
Please use the unified transaction syntax instead.
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,
Source§fn transfer_execute(self)
fn transfer_execute(self)
Source§fn argument<T: TopEncodeMulti>(self, arg: &T) -> Self
fn argument<T: TopEncodeMulti>(self, arg: &T) -> Self
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, )
Source§fn with_raw_arguments(self, raw_argument_buffer: ManagedArgBuffer<SA>) -> Self
fn with_raw_arguments(self, raw_argument_buffer: ManagedArgBuffer<SA>) -> Self
Source§fn with_gas_limit(self, gas_limit: u64) -> Self
fn with_gas_limit(self, gas_limit: u64) -> Self
fn into_call_data_string(self) -> ManagedBuffer<SA>
Source§fn async_call(self) -> AsyncCall<SA>
fn async_call(self) -> AsyncCall<SA>
Source§fn async_call_promise(self) -> AsyncCallPromises<SA>
fn async_call_promise(self) -> AsyncCallPromises<SA>
Source§fn execute_on_dest_context<RequestedResult>(self) -> RequestedResultwhere
RequestedResult: TopDecodeMulti,
fn execute_on_dest_context<RequestedResult>(self) -> RequestedResultwhere
RequestedResult: TopDecodeMulti,
Source§fn execute_on_dest_context_with_back_transfers<RequestedResult>(
self,
) -> (RequestedResult, BackTransfersLegacy<SA>)where
RequestedResult: TopDecodeMulti,
fn execute_on_dest_context_with_back_transfers<RequestedResult>(
self,
) -> (RequestedResult, BackTransfersLegacy<SA>)where
RequestedResult: TopDecodeMulti,
Source§fn execute_on_dest_context_ignore_result(self)
fn execute_on_dest_context_ignore_result(self)
Redundant method, use let _: IgnoreValue = contract_call.execute_on_dest_context(...) instead
Source§fn execute_on_dest_context_readonly<RequestedResult>(self) -> RequestedResultwhere
RequestedResult: TopDecodeMulti,
fn execute_on_dest_context_readonly<RequestedResult>(self) -> RequestedResultwhere
RequestedResult: TopDecodeMulti,
Source§fn execute_on_same_context<RequestedResult>(self) -> RequestedResultwhere
RequestedResult: TopDecodeMulti,
fn execute_on_same_context<RequestedResult>(self) -> RequestedResultwhere
RequestedResult: TopDecodeMulti,
Source§impl<Api, R> From<ContractCallNoPayment<Api, R>> for FunctionCall<Api>where
Api: CallTypeApi,
Available on crate feature contract-call-legacy only.
impl<Api, R> From<ContractCallNoPayment<Api, R>> for FunctionCall<Api>where
Api: CallTypeApi,
contract-call-legacy only.