pub trait CallValueApiImpl: ErrorApiImpl + ManagedTypeApiImpl + Sized {
    // Required methods
    fn check_not_payable(&self);
    fn load_moax_value(&self, dest_handle: Self::BigIntHandle);
    fn dct_num_transfers(&self) -> usize;
    fn load_single_dct_value(&self, dest_handle: Self::BigIntHandle);
    fn token(&self) -> Option<Self::ManagedBufferHandle>;
    fn dct_token_nonce(&self) -> u64;
    fn dct_token_type(&self) -> DctTokenType;
    fn dct_value_by_index(&self, index: usize) -> Self::BigIntHandle;
    fn token_by_index(&self, index: usize) -> Self::ManagedBufferHandle;
    fn dct_token_nonce_by_index(&self, index: usize) -> u64;
    fn dct_token_type_by_index(&self, index: usize) -> DctTokenType;

    // Provided method
    fn load_all_dct_transfers(&self, dest_handle: Self::ManagedBufferHandle) { ... }
}

Required Methods§

source

fn check_not_payable(&self)

source

fn load_moax_value(&self, dest_handle: Self::BigIntHandle)

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

source

fn dct_num_transfers(&self) -> usize

source

fn load_single_dct_value(&self, dest_handle: Self::BigIntHandle)

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

source

fn token(&self) -> Option<Self::ManagedBufferHandle>

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

source

fn dct_token_nonce(&self) -> u64

Returns the nonce of the received DCT token. Will return 0 in case of MOAX or fungible DCT transfer.

source

fn dct_token_type(&self) -> DctTokenType

Returns the DCT token type. Will return “Fungible” for MOAX.

source

fn dct_value_by_index(&self, index: usize) -> Self::BigIntHandle

source

fn token_by_index(&self, index: usize) -> Self::ManagedBufferHandle

source

fn dct_token_nonce_by_index(&self, index: usize) -> u64

source

fn dct_token_type_by_index(&self, index: usize) -> DctTokenType

Provided Methods§

source

fn load_all_dct_transfers(&self, dest_handle: Self::ManagedBufferHandle)

Loads all DCT call values into a managed vec. Overwrites destination.

Object Safety§

This trait is not object safe.

Implementors§