pub struct ContractCallWithAnyPayment<SA, OriginalResult>where
    SA: CallTypeApi + 'static,{
    pub basic: ContractCallNoPayment<SA, OriginalResult>,
    pub payment: EgldOrMultiEsdtPayment<SA>,
}
Expand description

Holds data for calling another contract, with any type of payment: none, EGLD, Multi-ESDT.

Gets created when chaining method with_any_payment.

Fields§

§basic: ContractCallNoPayment<SA, OriginalResult>§payment: EgldOrMultiEsdtPayment<SA>

Implementations§

source§

impl<SA, OriginalResult> ContractCallWithAnyPayment<SA, OriginalResult>where SA: CallTypeApi + 'static,

source

pub fn new<N: Into<ManagedBuffer<SA>>>( to: ManagedAddress<SA>, endpoint_name: N, payment: EgldOrMultiEsdtPayment<SA> ) -> Self

Creates a new instance directly.

Trait Implementations§

source§

impl<SA, OriginalResult> ContractCall<SA> for ContractCallWithAnyPayment<SA, OriginalResult>where SA: CallTypeApi + 'static, OriginalResult: TopEncodeMulti,

§

type OriginalResult = OriginalResult

source§

fn transfer_execute(self)

Immediately launches a transfer-execute call. Read more
source§

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

For cases where we build the contract call by hand.
source§

fn with_gas_limit(self, gas_limit: u64) -> Self

Sets an explicit gas limit to the call.
source§

fn into_call_data_string(self) -> ManagedBuffer<SA>

source§

fn async_call(self) -> AsyncCall<SA>

Converts to a legacy async call.
source§

fn async_call_promise(self) -> AsyncCallPromises<SA>

Converts to an async promise.
source§

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_ignore_result(self)

👎Deprecated since 0.36.1: Redundant method, use let _: IgnoreValue = contract_call.execute_on_dest_context(...) instead
Executes immediately, synchronously. Read more
source§

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,

Executes immediately, synchronously, and returns contract call result. Read more

Auto Trait Implementations§

§

impl<SA, OriginalResult> CodecFromSelf for ContractCallWithAnyPayment<SA, OriginalResult>where OriginalResult: CodecFromSelf, SA: CodecFromSelf,

§

impl<SA, OriginalResult> RefUnwindSafe for ContractCallWithAnyPayment<SA, OriginalResult>where OriginalResult: RefUnwindSafe, SA: RefUnwindSafe, <SA as HandleTypeInfo>::BigIntHandle: RefUnwindSafe, <SA as HandleTypeInfo>::ManagedBufferHandle: RefUnwindSafe,

§

impl<SA, OriginalResult> Send for ContractCallWithAnyPayment<SA, OriginalResult>where OriginalResult: Send, SA: Send, <SA as HandleTypeInfo>::BigIntHandle: Send, <SA as HandleTypeInfo>::ManagedBufferHandle: Send,

§

impl<SA, OriginalResult> Sync for ContractCallWithAnyPayment<SA, OriginalResult>where OriginalResult: Sync, SA: Sync, <SA as HandleTypeInfo>::BigIntHandle: Sync, <SA as HandleTypeInfo>::ManagedBufferHandle: Sync,

§

impl<SA, OriginalResult> Unpin for ContractCallWithAnyPayment<SA, OriginalResult>where OriginalResult: Unpin, SA: Unpin, <SA as HandleTypeInfo>::BigIntHandle: Unpin, <SA as HandleTypeInfo>::ManagedBufferHandle: Unpin,

§

impl<SA, OriginalResult> UnwindSafe for ContractCallWithAnyPayment<SA, OriginalResult>where OriginalResult: UnwindSafe, SA: UnwindSafe, <SA as HandleTypeInfo>::BigIntHandle: UnwindSafe, <SA as HandleTypeInfo>::ManagedBufferHandle: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.