pub struct ContractCallWithEgldOrSingleEsdt<SA, OriginalResult>where
SA: CallTypeApi + 'static,{
pub payment: EgldOrEsdtTokenPayment<SA>,
/* private fields */
}
👎Deprecated since 0.49.0: Please use the unified transaction syntax instead.
Expand description
Holds data for calling another contract, with a single payment, either EGLD or a single ESDT token.
Gets created when chaining method with_egld_or_single_esdt_transfer
.
Fields§
§payment: EgldOrEsdtTokenPayment<SA>
👎Deprecated since 0.49.0: Please use the unified transaction syntax instead.
Implementations§
Source§impl<SA, OriginalResult> ContractCallWithEgldOrSingleEsdt<SA, OriginalResult>where
SA: CallTypeApi + 'static,
OriginalResult: TopEncodeMulti,
impl<SA, OriginalResult> ContractCallWithEgldOrSingleEsdt<SA, OriginalResult>where
SA: CallTypeApi + 'static,
OriginalResult: TopEncodeMulti,
Sourcepub fn new<N>(
to: ManagedAddress<SA>,
endpoint_name: N,
token_identifier: EgldOrEsdtTokenIdentifier<SA>,
token_nonce: u64,
amount: BigUint<SA>,
) -> ContractCallWithEgldOrSingleEsdt<SA, OriginalResult>where
N: Into<ManagedBuffer<SA>>,
pub fn new<N>(
to: ManagedAddress<SA>,
endpoint_name: N,
token_identifier: EgldOrEsdtTokenIdentifier<SA>,
token_nonce: u64,
amount: BigUint<SA>,
) -> ContractCallWithEgldOrSingleEsdt<SA, OriginalResult>where
N: Into<ManagedBuffer<SA>>,
Creates a new instance directly.
The constructor is mostly for hand-written proxies,
the usual way of constructing this object is via the builder methods of other contract call types,
especially with_egld_or_single_esdt_transfer
.
Trait Implementations§
Source§impl<SA, OriginalResult> ContractCall<SA> for ContractCallWithEgldOrSingleEsdt<SA, OriginalResult>where
SA: CallTypeApi + 'static,
OriginalResult: TopEncodeMulti,
impl<SA, OriginalResult> ContractCall<SA> for ContractCallWithEgldOrSingleEsdt<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 ContractCallWithEgldOrSingleEsdt<SA, OriginalResult>where
SA: CallTypeApi + 'static,
OriginalResult: TopEncodeMulti,
impl<SA, OriginalResult> ContractCallBase<SA> for ContractCallWithEgldOrSingleEsdt<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<OriginalResult> IntoBlockchainCall for ContractCallWithEgldOrSingleEsdt<StaticApi, OriginalResult>where
OriginalResult: TopEncodeMulti,
impl<OriginalResult> IntoBlockchainCall for ContractCallWithEgldOrSingleEsdt<StaticApi, 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) -> Self::BlockchainCall
fn into_blockchain_call(self) -> Self::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 ContractCallWithEgldOrSingleEsdt<SA, OriginalResult>where
<SA as HandleTypeInfo>::ManagedBufferHandle: Freeze,
<SA as HandleTypeInfo>::BigIntHandle: Freeze,
impl<SA, OriginalResult> RefUnwindSafe for ContractCallWithEgldOrSingleEsdt<SA, OriginalResult>where
SA: RefUnwindSafe,
OriginalResult: RefUnwindSafe,
<SA as HandleTypeInfo>::ManagedBufferHandle: RefUnwindSafe,
<SA as HandleTypeInfo>::BigIntHandle: RefUnwindSafe,
impl<SA, OriginalResult> Send for ContractCallWithEgldOrSingleEsdt<SA, OriginalResult>where
SA: Send,
OriginalResult: Send,
<SA as HandleTypeInfo>::ManagedBufferHandle: Send,
<SA as HandleTypeInfo>::BigIntHandle: Send,
impl<SA, OriginalResult> Sync for ContractCallWithEgldOrSingleEsdt<SA, OriginalResult>where
SA: Sync,
OriginalResult: Sync,
<SA as HandleTypeInfo>::ManagedBufferHandle: Sync,
<SA as HandleTypeInfo>::BigIntHandle: Sync,
impl<SA, OriginalResult> Unpin for ContractCallWithEgldOrSingleEsdt<SA, OriginalResult>where
SA: Unpin,
OriginalResult: Unpin,
<SA as HandleTypeInfo>::ManagedBufferHandle: Unpin,
<SA as HandleTypeInfo>::BigIntHandle: Unpin,
impl<SA, OriginalResult> UnwindSafe for ContractCallWithEgldOrSingleEsdt<SA, OriginalResult>where
SA: UnwindSafe,
OriginalResult: UnwindSafe,
<SA as HandleTypeInfo>::ManagedBufferHandle: UnwindSafe,
<SA as HandleTypeInfo>::BigIntHandle: 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> 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