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 */
}
👎Deprecated since 0.49.0: 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>
👎Deprecated since 0.49.0: Please use the unified transaction syntax instead.
§function_call: FunctionCall<SA>
👎Deprecated since 0.49.0: Please use the unified transaction syntax instead.
§explicit_gas_limit: u64
👎Deprecated since 0.49.0: Please 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>(
to: ManagedAddress<SA>,
endpoint_name: N,
) -> ContractCallNoPayment<SA, OriginalResult>where
N: Into<ManagedBuffer<SA>>,
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>(
self,
payment: P,
) -> ContractCallWithMultiEsdt<SA, OriginalResult>where
P: Into<EsdtTokenPayment<SA>>,
pub fn with_esdt_transfer<P>(
self,
payment: P,
) -> ContractCallWithMultiEsdt<SA, OriginalResult>where
P: Into<EsdtTokenPayment<SA>>,
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>(
self,
payment: P,
) -> ContractCallWithEgldOrSingleEsdt<SA, OriginalResult>where
P: Into<EgldOrEsdtTokenPayment<SA>>,
pub fn with_egld_or_single_esdt_transfer<P>(
self,
payment: P,
) -> ContractCallWithEgldOrSingleEsdt<SA, OriginalResult>where
P: Into<EgldOrEsdtTokenPayment<SA>>,
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>
pub fn tx(self) -> Tx<TxScEnv<SA>, (), (), (), (), 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,
Source§fn transfer_execute(self)
fn transfer_execute(self)
Immediately launches a transfer-execute call. Read more
Source§fn argument<T>(self, arg: &T) -> Selfwhere
T: TopEncodeMulti,
fn argument<T>(self, arg: &T) -> Selfwhere
T: TopEncodeMulti,
Serializes and pushes a value to the arguments buffer. Read more
Source§fn push_raw_argument<RawArg>(&mut self, raw_arg: RawArg)where
RawArg: Into<ManagedBuffer<SA>>,
fn push_raw_argument<RawArg>(&mut self, raw_arg: RawArg)where
RawArg: Into<ManagedBuffer<SA>>,
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,
) -> Tx<TxScEnv<SA>, (), ManagedAddress<SA>, Egld<BigUint<SA>>, (), FunctionCall<SA>, Option<CallbackClosure<SA>>>
fn async_call( self, ) -> Tx<TxScEnv<SA>, (), ManagedAddress<SA>, Egld<BigUint<SA>>, (), FunctionCall<SA>, Option<CallbackClosure<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
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
👎Deprecated since 0.49.0: Please use the unified transaction syntax instead.
Source§impl<Api, R> From<ContractCallNoPayment<Api, R>> for FunctionCall<Api>where
Api: CallTypeApi,
impl<Api, R> From<ContractCallNoPayment<Api, R>> for FunctionCall<Api>where
Api: CallTypeApi,
Source§fn from(ccnp: ContractCallNoPayment<Api, R>) -> FunctionCall<Api>
fn from(ccnp: ContractCallNoPayment<Api, R>) -> FunctionCall<Api>
Converts to this type from the input type.
Source§impl<OriginalResult> IntoBlockchainCall for ContractCallNoPayment<VMHooksApi<StaticApiBackend>, OriginalResult>where
OriginalResult: TopEncodeMulti,
impl<OriginalResult> IntoBlockchainCall for ContractCallNoPayment<VMHooksApi<StaticApiBackend>, OriginalResult>where
OriginalResult: TopEncodeMulti,
Source§type BlockchainCall = TypedScCall<OriginalResult>
type BlockchainCall = TypedScCall<OriginalResult>
👎Deprecated since 0.42.0: The recommended syntax is a variation of
sc_call
or sc_deploy
with a scenario step built from the ContractCall.Source§fn into_blockchain_call(
self,
) -> <ContractCallNoPayment<VMHooksApi<StaticApiBackend>, OriginalResult> as IntoBlockchainCall>::BlockchainCall
fn into_blockchain_call( self, ) -> <ContractCallNoPayment<VMHooksApi<StaticApiBackend>, OriginalResult> as IntoBlockchainCall>::BlockchainCall
👎Deprecated since 0.42.0: The recommended syntax is a variation of
sc_call
or sc_deploy
with a scenario step built from the ContractCall.Auto Trait Implementations§
impl<SA, OriginalResult> Freeze for ContractCallNoPayment<SA, OriginalResult>
impl<SA, OriginalResult> RefUnwindSafe for ContractCallNoPayment<SA, OriginalResult>where
SA: RefUnwindSafe,
OriginalResult: 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
SA: UnwindSafe,
OriginalResult: 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> InterpretableFrom<T> for T
impl<T> InterpretableFrom<T> for T
fn interpret_from(from: T, _context: &InterpreterContext) -> T
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>
Converts
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>
Converts
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