multiversx_sc::types

Type Alias MultiEsdtPayment

Source
pub type MultiEsdtPayment<Api> = ManagedVec<Api, EsdtTokenPayment<Api>>;
Expand description

Alias for a list of payments.

Aliased Type§

struct MultiEsdtPayment<Api> { /* private fields */ }

Implementations§

Source§

impl<M: ManagedTypeApi> MultiEsdtPayment<M>

Source

pub fn as_multi_egld_or_esdt_payment(&self) -> &MultiEgldOrEsdtPayment<M>

Zero-cost conversion that loosens the EGLD restriction.

It is always safe to do, since the 2 types are guaranteed to have the same layout.

Source

pub fn into_multi_egld_or_esdt_payment(self) -> MultiEgldOrEsdtPayment<M>

Zero-cost conversion that loosens the EGLD restriction.

It is always safe to do, since the 2 types are guaranteed to have the same layout.

Trait Implementations§

Source§

impl<M: ManagedTypeApi> From<()> for MultiEsdtPayment<M>

Source§

fn from(_value: ()) -> Self

Converts to this type from the input type.
Source§

impl<M: ManagedTypeApi> From<(TokenIdentifier<M>, u64, BigUint<M>)> for MultiEsdtPayment<M>

Source§

fn from(value: (TokenIdentifier<M>, u64, BigUint<M>)) -> Self

Converts to this type from the input type.
Source§

impl<M: ManagedTypeApi> From<EsdtTokenPayment<M>> for MultiEsdtPayment<M>

Source§

fn from(value: EsdtTokenPayment<M>) -> Self

Converts to this type from the input type.
Source§

impl<Env> TxPayment<Env> for &MultiEsdtPayment<Env::Api>
where Env: TxEnv,

Source§

fn is_no_payment(&self, _env: &Env) -> bool

Returns true if payment indicates transfer of either non-zero EGLD or ESDT amounts.
Source§

fn perform_transfer_execute( self, _env: &Env, to: &ManagedAddress<Env::Api>, gas_limit: u64, fc: FunctionCall<Env::Api>, )

Transfer-execute calls have different APIs for different payments types. This method selects between them.
Source§

fn with_normalized<From, To, F, R>( self, env: &Env, from: &From, to: To, fc: FunctionCall<Env::Api>, f: F, ) -> R
where From: TxFrom<Env>, To: TxToSpecified<Env>, F: FnOnce(&ManagedAddress<Env::Api>, &BigUint<Env::Api>, FunctionCall<Env::Api>) -> R,

Converts an ESDT call to a built-in function call, if necessary.
Source§

fn into_full_payment_data(self, _env: &Env) -> FullPaymentData<Env::Api>

Payment data to be used by the testing framework. Will be refactored.
Source§

impl<Env> TxPayment<Env> for MultiEsdtPayment<Env::Api>
where Env: TxEnv,

Source§

fn is_no_payment(&self, _env: &Env) -> bool

Returns true if payment indicates transfer of either non-zero EGLD or ESDT amounts.
Source§

fn perform_transfer_execute( self, env: &Env, to: &ManagedAddress<Env::Api>, gas_limit: u64, fc: FunctionCall<Env::Api>, )

Transfer-execute calls have different APIs for different payments types. This method selects between them.
Source§

fn with_normalized<From, To, F, R>( self, env: &Env, from: &From, to: To, fc: FunctionCall<Env::Api>, f: F, ) -> R
where From: TxFrom<Env>, To: TxToSpecified<Env>, F: FnOnce(&ManagedAddress<Env::Api>, &BigUint<Env::Api>, FunctionCall<Env::Api>) -> R,

Converts an ESDT call to a built-in function call, if necessary.
Source§

fn into_full_payment_data(self, _env: &Env) -> FullPaymentData<Env::Api>

Payment data to be used by the testing framework. Will be refactored.
Source§

impl<Env> TxPaymentMultiEsdt<Env> for &MultiEsdtPayment<Env::Api>
where Env: TxEnv,

Source§

impl<Env> TxPaymentMultiEsdt<Env> for MultiEsdtPayment<Env::Api>
where Env: TxEnv,