pub struct CallValueWrapper<A>where
    A: CallValueApi + ErrorApi + ManagedTypeApi,
{ /* private fields */ }

Implementations§

Retrieves the EGLD call value from the VM. Will return 0 in case of an ESDT transfer (cannot have both EGLD and ESDT transfer simultaneously).

Returns all ESDT transfers that accompany this SC call. Will return 0 results if nothing was transfered, or just EGLD. Fully managed underlying types, very efficient.

Verify and casts the received multi ESDT transfer in to an array.

Can be used to extract all payments in one line like this:

let [payment_a, payment_b, payment_c] = self.call_value().multi_esdt();.

Expects precisely one ESDT token transfer, fungible or not.

Will return the received ESDT payment.

The amount cannot be 0, since that would not qualify as an ESDT transfer.

Expects precisely one fungible ESDT token transfer.

Returns the token ID and the amount for fungible ESDT transfers.

The amount cannot be 0, since that would not qualify as an ESDT transfer.

Retrieves the ESDT call value from the VM. Will return 0 in case of an EGLD transfer (cannot have both EGLD and ESDT transfer simultaneously).

Accepts and returns either an EGLD payment, or a single ESDT token.

Will halt execution if more than one ESDT transfer was received.

In case no transfer of value happen, it will return a payment of 0 EGLD.

Accepts and returns either an EGLD payment, or a single fungible ESDT token.

Will halt execution if more than one ESDT transfer was received, or if the received ESDT is non- or semi-fungible.

Works similar to egld_or_single_esdt, but checks the nonce to be 0 and returns a tuple of just token identifier and amount, for convenience.

In case no transfer of value happen, it will return a payment of 0 EGLD.

Trait Implementations§

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.