Struct elrond_wasm::contract_base::CallValueWrapper[][src]

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

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.

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). Warning, not tested with multi transfer, use all_esdt_transfers instead!

Returns the call value token identifier of the current call. The identifier is wrapped in a TokenIdentifier object, to hide underlying logic.

A note on implementation: even though the underlying api returns an empty name for EGLD, but the EGLD TokenIdentifier is serialized as EGLD. Warning, not tested with multi transfer, use all_esdt_transfers instead!

Returns the nonce of the received ESDT token. Will return 0 in case of EGLD or fungible ESDT transfer. Warning, not tested with multi transfer, use all_esdt_transfers instead!

Returns the ESDT token type. Will return “Fungible” for EGLD. Warning, not tested with multi transfer, use all_esdt_transfers instead!

Returns both the call value (either EGLD or ESDT) and the token identifier. Especially used in the `#[payable(“*”)] auto-generated snippets. The method might seem redundant, but there is such a hook in Arwen that might be used in this scenario in the future. TODO: replace with multi transfer handling everywhere

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

Performs the conversion.

Performs the conversion.

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.