multiversx_sc_snippets::imports

Struct ContractCallWithAnyPayment

Source
pub struct ContractCallWithAnyPayment<SA, OriginalResult>
where SA: CallTypeApi + 'static,
{ pub basic: ContractCallNoPayment<SA, OriginalResult>, pub payment: EgldOrMultiEsdtPayment<SA>, }
๐Ÿ‘ŽDeprecated since 0.49.0: Please use the unified transaction syntax instead.
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>
๐Ÿ‘ŽDeprecated since 0.49.0: Please use the unified transaction syntax instead.
ยงpayment: EgldOrMultiEsdtPayment<SA>
๐Ÿ‘ŽDeprecated since 0.49.0: Please use the unified transaction syntax instead.

Implementationsยง

Sourceยง

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

Source

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

Creates a new instance directly.

Trait Implementationsยง

Sourceยง

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

Sourceยง

fn transfer_execute(self)

Immediately launches a transfer-execute call. Read more
Sourceยง

fn argument<T>(self, arg: &T) -> Self
where 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>>,

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, ) -> 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>

Converts to an async promise.
Sourceยง

fn execute_on_dest_context<RequestedResult>(self) -> RequestedResult
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_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)

๐Ÿ‘Ž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) -> RequestedResult
where RequestedResult: TopDecodeMulti,

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

fn execute_on_same_context<RequestedResult>(self) -> RequestedResult
where RequestedResult: TopDecodeMulti,

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

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

Sourceยง

type OriginalResult = OriginalResult

๐Ÿ‘ŽDeprecated since 0.49.0: Please use the unified transaction syntax instead.

Auto Trait Implementationsยง

ยง

impl<SA, OriginalResult> Freeze for ContractCallWithAnyPayment<SA, OriginalResult>

ยง

impl<SA, OriginalResult> RefUnwindSafe for ContractCallWithAnyPayment<SA, OriginalResult>

ยง

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

ยง

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

ยง

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

ยง

impl<SA, OriginalResult> UnwindSafe for ContractCallWithAnyPayment<SA, OriginalResult>

Blanket Implementationsยง

Sourceยง

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

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Sourceยง

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

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Sourceยง

impl<T> BorrowMut<T> for T
where 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> Instrument for T

Sourceยง

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Sourceยง

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Sourceยง

impl<T> InterpretableFrom<T> for T

Sourceยง

fn interpret_from(from: T, _context: &InterpreterContext) -> T

Sourceยง

impl<T, U> Into<U> for T
where 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> IntoEither for T

Sourceยง

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 more
Sourceยง

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Sourceยง

impl<CC> IntoVMQuery for CC
where CC: ContractCall<VMHooksApi<StaticApiBackend>>,

Sourceยง

impl<T> ReconstructableFrom<T> for T

Sourceยง

impl<T> Same for T

Sourceยง

type Output = T

Should always be Self
Sourceยง

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

Sourceยง

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 T
where U: TryFrom<T>,

Sourceยง

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.
Sourceยง

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Sourceยง

fn vzip(self) -> V

Sourceยง

impl<T> WithSubscriber for T

Sourceยง

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

impl<T> ErasedDestructor for T
where T: 'static,

Sourceยง

impl<T> MaybeSendSync for T