pub struct ContractCallWithEgld<SA, OriginalResult>where
SA: CallTypeApi + 'static,{
pub basic: ContractCallNoPayment<SA, OriginalResult>,
pub egld_payment: BigUint<SA>,
}👎Deprecated since 0.49.0: Please use the unified transaction syntax instead.
Expand description
Holds data for calling another contract, with EGLD payment only.
Gets created when chaining method with_egld_transfer.
If the payment is zero, it bevahes exactly like ContractCallNoPayment.
It also represents the normalized form of any contract call, since ESDT transfers (the only payment not available here) get converted to builtin function calls in normalized form.
Fields§
§basic: ContractCallNoPayment<SA, OriginalResult>👎Deprecated since 0.49.0: Please use the unified transaction syntax instead.
§egld_payment: BigUint<SA>👎Deprecated since 0.49.0: Please use the unified transaction syntax instead.
Implementations§
source§impl<SA, OriginalResult> ContractCallWithEgld<SA, OriginalResult>where
SA: CallTypeApi + 'static,
impl<SA, OriginalResult> ContractCallWithEgld<SA, OriginalResult>where
SA: CallTypeApi + 'static,
sourcepub fn convert_to_esdt_transfer_call(
self,
payments: ManagedVec<SA, EsdtTokenPayment<SA>>,
) -> ContractCallWithEgld<SA, OriginalResult>
pub fn convert_to_esdt_transfer_call( self, payments: ManagedVec<SA, EsdtTokenPayment<SA>>, ) -> ContractCallWithEgld<SA, OriginalResult>
If this is an ESDT call, it converts it to a regular call to ESDTTransfer.
Async calls require this step, but not transfer_esdt_execute.
source§impl<SA, OriginalResult> ContractCallWithEgld<SA, OriginalResult>where
SA: CallTypeApi + 'static,
impl<SA, OriginalResult> ContractCallWithEgld<SA, OriginalResult>where
SA: CallTypeApi + 'static,
pub fn resolve_gas_limit(&self) -> u64
pub fn get_back_transfers( &self, ) -> (BigUint<SA>, ManagedVec<SA, EsdtTokenPayment<SA>>)
pub fn to_call_data_string(&self) -> ManagedBuffer<SA>
source§impl<SA, OriginalResult> ContractCallWithEgld<SA, OriginalResult>where
SA: CallTypeApi + 'static,
impl<SA, OriginalResult> ContractCallWithEgld<SA, OriginalResult>where
SA: CallTypeApi + 'static,
sourcepub fn new<N>(
to: ManagedAddress<SA>,
endpoint_name: N,
egld_payment: BigUint<SA>,
) -> ContractCallWithEgld<SA, OriginalResult>where
N: Into<ManagedBuffer<SA>>,
pub fn new<N>(
to: ManagedAddress<SA>,
endpoint_name: N,
egld_payment: BigUint<SA>,
) -> ContractCallWithEgld<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_transfer.
Trait Implementations§
source§impl<SA, OriginalResult> ContractCall<SA> for ContractCallWithEgld<SA, OriginalResult>where
SA: CallTypeApi + 'static,
OriginalResult: TopEncodeMulti,
impl<SA, OriginalResult> ContractCall<SA> for ContractCallWithEgld<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 ContractCallWithEgld<SA, OriginalResult>where
SA: CallTypeApi + 'static,
OriginalResult: TopEncodeMulti,
impl<SA, OriginalResult> ContractCallBase<SA> for ContractCallWithEgld<SA, OriginalResult>where
SA: CallTypeApi + 'static,
OriginalResult: TopEncodeMulti,
§type OriginalResult = OriginalResult
type OriginalResult = OriginalResult
👎Deprecated since 0.49.0: Please use the unified transaction syntax instead.
source§impl<OriginalResult> IntoBlockchainCall for ContractCallWithEgld<VMHooksApi<StaticApiBackend>, OriginalResult>where
OriginalResult: TopEncodeMulti,
impl<OriginalResult> IntoBlockchainCall for ContractCallWithEgld<VMHooksApi<StaticApiBackend>, OriginalResult>where
OriginalResult: TopEncodeMulti,
§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,
) -> <ContractCallWithEgld<VMHooksApi<StaticApiBackend>, OriginalResult> as IntoBlockchainCall>::BlockchainCall
fn into_blockchain_call( self, ) -> <ContractCallWithEgld<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 ContractCallWithEgld<SA, OriginalResult>where
<SA as HandleTypeInfo>::BigIntHandle: Freeze,
<SA as HandleTypeInfo>::ManagedBufferHandle: Freeze,
impl<SA, OriginalResult> RefUnwindSafe for ContractCallWithEgld<SA, OriginalResult>where
SA: RefUnwindSafe,
OriginalResult: RefUnwindSafe,
<SA as HandleTypeInfo>::BigIntHandle: RefUnwindSafe,
<SA as HandleTypeInfo>::ManagedBufferHandle: RefUnwindSafe,
impl<SA, OriginalResult> Send for ContractCallWithEgld<SA, OriginalResult>where
SA: Send,
OriginalResult: Send,
<SA as HandleTypeInfo>::BigIntHandle: Send,
<SA as HandleTypeInfo>::ManagedBufferHandle: Send,
impl<SA, OriginalResult> Sync for ContractCallWithEgld<SA, OriginalResult>where
SA: Sync,
OriginalResult: Sync,
<SA as HandleTypeInfo>::BigIntHandle: Sync,
<SA as HandleTypeInfo>::ManagedBufferHandle: Sync,
impl<SA, OriginalResult> Unpin for ContractCallWithEgld<SA, OriginalResult>where
SA: Unpin,
OriginalResult: Unpin,
<SA as HandleTypeInfo>::BigIntHandle: Unpin,
<SA as HandleTypeInfo>::ManagedBufferHandle: Unpin,
impl<SA, OriginalResult> UnwindSafe for ContractCallWithEgld<SA, OriginalResult>where
SA: UnwindSafe,
OriginalResult: UnwindSafe,
<SA as HandleTypeInfo>::BigIntHandle: 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