Trait dharitri_wasm::api::CallValueApiImpl
source · 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§
fn check_not_payable(&self)
sourcefn load_moax_value(&self, dest_handle: Self::BigIntHandle)
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).
fn dct_num_transfers(&self) -> usize
sourcefn load_single_dct_value(&self, dest_handle: Self::BigIntHandle)
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).
sourcefn token(&self) -> Option<Self::ManagedBufferHandle>
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.
sourcefn dct_token_nonce(&self) -> u64
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.
sourcefn dct_token_type(&self) -> DctTokenType
fn dct_token_type(&self) -> DctTokenType
Returns the DCT token type. Will return “Fungible” for MOAX.
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 Methods§
sourcefn load_all_dct_transfers(&self, dest_handle: Self::ManagedBufferHandle)
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.