pub struct VmApiImpl {}
Expand description

The reference to the API implementation based on Arwen hooks. It continas no data, can be embedded at no cost. Cloning it is a no-op.

Trait Implementations§

source§

impl BigFloatApi for VmApiImpl

source§

fn bf_from_parts( &self, integral_part_value: i32, fractional_part_value: i32, exponent_value: i32 ) -> Self::BigFloatHandle

source§

fn bf_from_frac( &self, numerator_value: i64, denominator_value: i64 ) -> Self::BigFloatHandle

source§

fn bf_from_sci( &self, significand_value: i64, exponent_value: i64 ) -> Self::ManagedBufferHandle

source§

fn bf_add( &self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle, y: Self::BigFloatHandle )

source§

fn bf_sub( &self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle, y: Self::BigFloatHandle )

source§

fn bf_mul( &self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle, y: Self::BigFloatHandle )

source§

fn bf_div( &self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle, y: Self::BigFloatHandle )

source§

fn bf_neg(&self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle)

source§

fn bf_abs(&self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle)

source§

fn bf_cmp( &self, x: Self::ManagedBufferHandle, y: Self::ManagedBufferHandle ) -> Ordering

source§

fn bf_sign(&self, x: Self::ManagedBufferHandle) -> Sign

source§

fn bf_clone(&self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle)

source§

fn bf_sqrt(&self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle)

source§

fn bf_pow(&self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle, exp: i32)

source§

fn bf_floor(&self, dest: Self::BigIntHandle, x: Self::BigFloatHandle)

source§

fn bf_ceil(&self, dest: Self::BigIntHandle, x: Self::BigFloatHandle)

source§

fn bf_trunc(&self, dest: Self::BigIntHandle, x: Self::BigFloatHandle)

source§

fn bf_is_bi(&self, x: Self::BigFloatHandle) -> bool

source§

fn bf_set_i64(&self, dest: Self::BigFloatHandle, value: i64)

source§

fn bf_set_bi(&self, dest: Self::BigFloatHandle, x: Self::BigIntHandle)

source§

fn bf_get_const_e(&self, dest: Self::BigFloatHandle)

source§

fn bf_get_const_pi(&self, dest: Self::BigFloatHandle)

source§

fn bf_new_zero(&self) -> Self::BigFloatHandle

source§

impl BigIntApi for VmApiImpl

source§

fn bi_new(&self, value: i64) -> Self::BigIntHandle

source§

fn bi_set_int64(&self, destination: Self::BigIntHandle, value: i64)

source§

fn bi_unsigned_byte_length(&self, x: Self::BigIntHandle) -> usize

source§

fn bi_get_unsigned_bytes(&self, handle: Self::BigIntHandle) -> BoxedBytes

source§

fn bi_set_unsigned_bytes(&self, destination: Self::BigIntHandle, bytes: &[u8])

source§

fn bi_signed_byte_length(&self, x: Self::BigIntHandle) -> usize

source§

fn bi_get_signed_bytes(&self, handle: Self::BigIntHandle) -> BoxedBytes

source§

fn bi_set_signed_bytes(&self, destination: Self::BigIntHandle, bytes: &[u8])

source§

fn bi_to_i64(&self, reference: Self::BigIntHandle) -> Option<i64>

source§

fn bi_add( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle )

source§

fn bi_sub( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle )

source§

fn bi_sub_unsigned( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle )

source§

fn bi_mul( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle )

source§

fn bi_t_div( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle )

source§

fn bi_t_mod( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle )

source§

fn bi_abs(&self, dest: Self::BigIntHandle, x: Self::BigIntHandle)

source§

fn bi_neg(&self, dest: Self::BigIntHandle, x: Self::BigIntHandle)

source§

fn bi_sign(&self, x: Self::BigIntHandle) -> Sign

source§

fn bi_cmp(&self, x: Self::BigIntHandle, y: Self::BigIntHandle) -> Ordering

source§

fn bi_sqrt(&self, dest: Self::BigIntHandle, x: Self::BigIntHandle)

source§

fn bi_pow( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle )

source§

fn bi_log2(&self, x: Self::BigIntHandle) -> u32

source§

fn bi_and( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle )

source§

fn bi_or( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle )

source§

fn bi_xor( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: Self::BigIntHandle )

source§

fn bi_shr(&self, dest: Self::BigIntHandle, x: Self::BigIntHandle, bits: usize)

source§

fn bi_shl(&self, dest: Self::BigIntHandle, x: Self::BigIntHandle, bits: usize)

source§

fn bi_to_string( &self, bi_handle: Self::BigIntHandle, result_handle: Self::ManagedBufferHandle )

source§

fn bi_new_zero(&self) -> Self::BigIntHandle

source§

impl BlockchainApi for VmApiImpl

source§

impl BlockchainApiImpl for VmApiImpl

source§

fn get_caller_legacy(&self) -> Address

source§

fn load_caller_managed(&self, dest: Self::ManagedBufferHandle)

source§

fn get_sc_address_legacy(&self) -> Address

source§

fn load_sc_address_managed(&self, dest: Self::ManagedBufferHandle)

source§

fn get_owner_address_legacy(&self) -> Address

source§

fn load_owner_address_managed(&self, dest: Self::ManagedBufferHandle)

source§

fn get_shard_of_address_legacy(&self, address: &Address) -> u32

source§

fn get_shard_of_address(&self, address_handle: Self::ManagedBufferHandle) -> u32

source§

fn is_smart_contract_legacy(&self, address: &Address) -> bool

source§

fn is_smart_contract(&self, address_handle: Self::ManagedBufferHandle) -> bool

source§

fn load_balance_legacy(&self, dest: Self::BigIntHandle, address: &Address)

source§

fn load_balance( &self, dest: Self::BigIntHandle, address_handle: Self::ManagedBufferHandle )

source§

fn get_state_root_hash_legacy(&self) -> H256

source§

fn load_state_root_hash_managed(&self, dest: Self::ManagedBufferHandle)

source§

fn get_tx_hash_legacy(&self) -> H256

source§

fn load_tx_hash_managed(&self, dest: Self::ManagedBufferHandle)

source§

fn get_gas_left(&self) -> u64

source§

fn get_block_timestamp(&self) -> u64

source§

fn get_block_nonce(&self) -> u64

source§

fn get_block_round(&self) -> u64

source§

fn get_block_epoch(&self) -> u64

source§

fn get_block_random_seed_legacy(&self) -> Box<[u8; 48]>

source§

fn load_block_random_seed_managed(&self, dest: Self::ManagedBufferHandle)

source§

fn get_prev_block_timestamp(&self) -> u64

source§

fn get_prev_block_nonce(&self) -> u64

source§

fn get_prev_block_round(&self) -> u64

source§

fn get_prev_block_epoch(&self) -> u64

source§

fn get_prev_block_random_seed_legacy(&self) -> Box<[u8; 48]>

source§

fn load_prev_block_random_seed_managed(&self, dest: Self::ManagedBufferHandle)

source§

fn get_current_dct_nft_nonce( &self, address_handle: Self::ManagedBufferHandle, token_id_handle: Self::ManagedBufferHandle ) -> u64

source§

fn load_dct_balance( &self, address_handle: Self::ManagedBufferHandle, token_id_handle: Self::ManagedBufferHandle, nonce: u64, dest: Self::BigIntHandle )

source§

fn load_dct_token_data_unmanaged<M: ManagedTypeApi>( &self, m_address: &ManagedAddress<M>, token: &TokenIdentifier<M>, nonce: u64 ) -> DctTokenData<M>

👎Deprecated since 0.31.0: Only used for limited backwards compatibility tests. Never use! Use load_dct_token_data instead.
source§

fn load_dct_token_data<M: ManagedTypeApi>( &self, address: &ManagedAddress<M>, token: &TokenIdentifier<M>, nonce: u64 ) -> DctTokenData<M>

source§

fn check_dct_frozen( &self, address_handle: Self::ManagedBufferHandle, token_id_handle: Self::ManagedBufferHandle, nonce: u64 ) -> bool

source§

fn check_dct_paused(&self, token_id_handle: Self::ManagedBufferHandle) -> bool

source§

fn check_dct_limited_transfer( &self, token_id_handle: Self::ManagedBufferHandle ) -> bool

source§

fn load_dct_local_roles( &self, token_id_handle: Self::ManagedBufferHandle ) -> DctLocalRoleFlags

source§

impl CallValueApi for VmApiImpl

source§

impl CallValueApiImpl for VmApiImpl

source§

fn check_not_payable(&self)

source§

fn load_moax_value(&self, dest: 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 load_all_dct_transfers(&self, dest_handle: Self::ManagedBufferHandle)

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

fn dct_num_transfers(&self) -> usize

source§

fn load_single_dct_value(&self, dest: 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

source§

impl Clone for VmApiImpl

Should be no-op. The API implementation is zero-sized.

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl CryptoApi for VmApiImpl

source§

impl CryptoApiImpl for VmApiImpl

source§

fn sha256_legacy(&self, data: &[u8]) -> [u8; 32]

source§

fn sha256_managed( &self, result_handle: Self::ManagedBufferHandle, data_handle: Self::ManagedBufferHandle )

source§

fn keccak256_legacy(&self, data: &[u8]) -> [u8; 32]

source§

fn keccak256_managed( &self, result_handle: Self::ManagedBufferHandle, data_handle: Self::ManagedBufferHandle )

source§

fn ripemd160_legacy(&self, data: &[u8]) -> [u8; 20]

source§

fn ripemd160_managed( &self, dest: Self::ManagedBufferHandle, data_handle: Self::ManagedBufferHandle )

source§

fn verify_bls_legacy( &self, key: &[u8], message: &[u8], signature: &[u8] ) -> bool

source§

fn verify_bls_managed( &self, key: Self::ManagedBufferHandle, message: Self::ManagedBufferHandle, signature: Self::ManagedBufferHandle ) -> bool

source§

fn verify_ed25519_legacy( &self, key: &[u8], message: &[u8], signature: &[u8] ) -> bool

source§

fn verify_ed25519_managed( &self, key: Self::ManagedBufferHandle, message: Self::ManagedBufferHandle, signature: Self::ManagedBufferHandle ) -> bool

source§

fn verify_secp256k1_legacy( &self, key: &[u8], message: &[u8], signature: &[u8] ) -> bool

Note: the signature is minimum 2 bytes in length, the second byte encodes the length of the remaining signature bytes.
source§

fn verify_secp256k1_managed( &self, key: Self::ManagedBufferHandle, message: Self::ManagedBufferHandle, signature: Self::ManagedBufferHandle ) -> bool

source§

fn verify_custom_secp256k1_legacy( &self, key: &[u8], message: &[u8], signature: &[u8], hash_type: MessageHashType ) -> bool

source§

fn verify_custom_secp256k1_managed( &self, key: Self::ManagedBufferHandle, message: Self::ManagedBufferHandle, signature: Self::ManagedBufferHandle, hash_type: MessageHashType ) -> bool

source§

fn encode_secp256k1_der_signature_legacy( &self, r: &[u8], s: &[u8] ) -> BoxedBytes

source§

fn encode_secp256k1_der_signature_managed( &self, r: Self::ManagedBufferHandle, s: Self::ManagedBufferHandle, dest_sig_handle: Self::ManagedBufferHandle )

source§

impl EllipticCurveApi for VmApiImpl

source§

fn ec_create_from_name_bytes(&self, name: &[u8]) -> Self::ManagedBufferHandle

source§

fn ec_create_from_name_mb( &self, name_handle: Self::ManagedBufferHandle ) -> Self::ManagedBufferHandle

source§

fn ec_get_values( &self, ec_handle: Self::EllipticCurveHandle, field_order_handle: Self::BigIntHandle, base_point_order_handle: Self::BigIntHandle, eq_constant_handle: Self::BigIntHandle, x_base_point_handle: Self::BigIntHandle, y_base_point_handle: Self::BigIntHandle )

source§

fn ec_curve_length(&self, ec_handle: Self::EllipticCurveHandle) -> u32

source§

fn ec_private_key_byte_length( &self, ec_handle: Self::EllipticCurveHandle ) -> u32

source§

fn ec_add( &self, x_result_handle: Self::BigIntHandle, y_result_handle: Self::BigIntHandle, ec_handle: Self::EllipticCurveHandle, x_first_point: Self::BigIntHandle, y_first_point: Self::BigIntHandle, x_second_point: Self::BigIntHandle, y_second_point: Self::BigIntHandle )

source§

fn ec_double( &self, x_result_handle: Self::BigIntHandle, y_result_handle: Self::BigIntHandle, ec_handle: Self::EllipticCurveHandle, x_point_handle: Self::BigIntHandle, y_point_handle: Self::BigIntHandle )

source§

fn ec_is_on_curve( &self, ec_handle: Self::EllipticCurveHandle, x_point_handle: Self::BigIntHandle, y_point_handle: Self::BigIntHandle ) -> bool

source§

fn ec_scalar_mult_legacy( &self, x_result_handle: Self::BigIntHandle, y_result_handle: Self::BigIntHandle, ec_handle: Self::EllipticCurveHandle, x_point_handle: Self::BigIntHandle, y_point_handle: Self::BigIntHandle, data: &[u8] )

source§

fn ec_scalar_mult( &self, x_result_handle: Self::BigIntHandle, y_result_handle: Self::BigIntHandle, ec_handle: Self::EllipticCurveHandle, x_point_handle: Self::BigIntHandle, y_point_handle: Self::BigIntHandle, data: Self::ManagedBufferHandle )

source§

fn ec_scalar_base_mult_legacy( &self, x_result_handle: Self::BigIntHandle, y_result_handle: Self::BigIntHandle, ec_handle: Self::EllipticCurveHandle, data: &[u8] )

source§

fn ec_scalar_base_mult( &self, x_result_handle: Self::BigIntHandle, y_result_handle: Self::BigIntHandle, ec_handle: Self::EllipticCurveHandle, data_handle: Self::ManagedBufferHandle )

source§

fn ec_marshal_legacy( &self, ec_handle: Self::EllipticCurveHandle, x_pair_handle: Self::BigIntHandle, y_pair_handle: Self::BigIntHandle ) -> BoxedBytes

source§

fn ec_marshal( &self, ec_handle: Self::EllipticCurveHandle, x_pair_handle: Self::BigIntHandle, y_pair_handle: Self::BigIntHandle, result_handle: Self::ManagedBufferHandle )

source§

fn ec_marshal_compressed_legacy( &self, ec_handle: Self::EllipticCurveHandle, x_pair_handle: Self::BigIntHandle, y_pair_handle: Self::BigIntHandle ) -> BoxedBytes

source§

fn ec_marshal_compressed( &self, ec_handle: Self::EllipticCurveHandle, x_pair_handle: Self::BigIntHandle, y_pair_handle: Self::BigIntHandle, result_handle: Self::ManagedBufferHandle )

source§

fn ec_unmarshal_legacy( &self, x_result_handle: Self::BigIntHandle, y_result_handle: Self::BigIntHandle, ec_handle: Self::EllipticCurveHandle, data: &[u8] )

source§

fn ec_unmarshal( &self, x_result_handle: Self::BigIntHandle, y_result_handle: Self::BigIntHandle, ec_handle: Self::EllipticCurveHandle, data_handle: Self::ManagedBufferHandle )

source§

fn ec_unmarshal_compressed_legacy( &self, x_result_handle: Self::BigIntHandle, y_result_handle: Self::BigIntHandle, ec_handle: Self::EllipticCurveHandle, data: &[u8] )

source§

fn ec_unmarshal_compressed( &self, x_result_handle: Self::BigIntHandle, y_result_handle: Self::BigIntHandle, ec_handle: Self::EllipticCurveHandle, data_handle: Self::ManagedBufferHandle )

source§

fn ec_generate_key_legacy( &self, x_pub_key_handle: Self::BigIntHandle, y_pub_key_handle: Self::BigIntHandle, ec_handle: Self::EllipticCurveHandle ) -> BoxedBytes

source§

fn ec_generate_key( &self, x_pub_key_handle: Self::BigIntHandle, y_pub_key_handle: Self::BigIntHandle, ec_handle: Self::EllipticCurveHandle, result_handle: Self::ManagedBufferHandle )

source§

impl EndpointArgumentApi for VmApiImpl

source§

impl EndpointArgumentApiImpl for VmApiImpl

Interface to only be used by code generated by the macros. The smart contract code doesn’t have access to these methods directly.

source§

fn get_num_arguments(&self) -> i32

source§

fn get_argument_len(&self, arg_index: i32) -> usize

source§

fn load_argument_managed_buffer( &self, arg_index: i32, dest: Self::ManagedBufferHandle )

source§

fn get_argument_boxed_bytes(&self, arg_index: i32) -> BoxedBytes

source§

fn load_argument_big_int_unsigned( &self, arg_index: i32, dest: Self::ManagedBufferHandle )

source§

fn load_argument_big_int_signed( &self, arg_index: i32, dest: Self::ManagedBufferHandle )

source§

fn get_argument_u64(&self, arg_index: i32) -> u64

source§

fn get_argument_i64(&self, arg_index: i32) -> i64

source§

impl EndpointFinishApi for VmApiImpl

source§

impl EndpointFinishApiImpl for VmApiImpl

Interface to only be used by code generated by the macros. The smart contract code doesn’t have access to these methods directly.

source§

fn finish_slice_u8(&self, slice: &[u8])

source§

fn finish_big_int_raw(&self, handle: Self::BigIntHandle)

source§

fn finish_big_uint_raw(&self, handle: Self::BigIntHandle)

source§

fn finish_managed_buffer_raw(&self, handle: Self::ManagedBufferHandle)

source§

fn finish_u64(&self, value: u64)

source§

fn finish_i64(&self, value: i64)

source§

impl ErrorApi for VmApiImpl

source§

impl ErrorApiImpl for VmApiImpl

source§

fn signal_error(&self, message: &[u8]) -> !

source§

fn signal_error_from_buffer( &self, message_handle: Self::ManagedBufferHandle ) -> !

source§

impl HandleTypeInfo for VmApiImpl

source§

impl LogApi for VmApiImpl

source§

impl LogApiImpl for VmApiImpl

Interface to only be used by code generated by the macros. The smart contract code doesn’t have access to these methods directly.

source§

fn write_event_log(&self, topics_buffer: &ArgBuffer, data: &[u8])

Saves an event log.
source§

fn write_legacy_log(&self, topics: &[[u8; 32]], data: &[u8])

The legacy Arwen hook for saving event logs. It does the same, but only accepts 32-byte topics. Only kept for backwards compatibility.
source§

fn managed_write_log( &self, topics_handle: Self::ManagedBufferHandle, data_handle: Self::ManagedBufferHandle )

source§

impl ManagedBufferApi for VmApiImpl

source§

fn mb_new_empty(&self) -> Self::ManagedBufferHandle

Requests a new handle from the VM. No longer used extensively.
source§

fn mb_new_from_bytes(&self, bytes: &[u8]) -> Self::ManagedBufferHandle

Requests a new handle from the VM, initialized with some data. No longer used extensively.
source§

fn mb_len(&self, handle: Self::ManagedBufferHandle) -> usize

source§

fn mb_to_boxed_bytes(&self, handle: Self::ManagedBufferHandle) -> BoxedBytes

source§

fn mb_load_slice( &self, source_handle: Self::ManagedBufferHandle, starting_position: usize, dest_slice: &mut [u8] ) -> Result<(), InvalidSliceError>

TODO: investigate the impact of using Result<(), ()> on the wasm output.
source§

fn mb_copy_slice( &self, source_handle: Self::ManagedBufferHandle, starting_pos: usize, slice_len: usize, dest_handle: Self::ManagedBufferHandle ) -> Result<(), InvalidSliceError>

TODO: investigate the impact of using Result<(), ()> on the wasm output.
source§

fn mb_copy_to_slice_pad_right( &self, handle: Self::ManagedBufferHandle, destination: &mut [u8] )

source§

fn mb_overwrite(&self, handle: Self::ManagedBufferHandle, bytes: &[u8])

source§

fn mb_set_slice( &self, dest_handle: Self::ManagedBufferHandle, starting_position: usize, source_slice: &[u8] ) -> Result<(), InvalidSliceError>

source§

fn mb_set_random(&self, dest_handle: Self::ManagedBufferHandle, length: usize)

source§

fn mb_append( &self, accumulator_handle: Self::ManagedBufferHandle, data_handle: Self::ManagedBufferHandle )

source§

fn mb_append_bytes( &self, accumulator_handle: Self::ManagedBufferHandle, bytes: &[u8] )

source§

fn mb_eq( &self, handle1: Self::ManagedBufferHandle, handle2: Self::ManagedBufferHandle ) -> bool

source§

fn mb_to_hex( &self, source_handle: Self::ManagedBufferHandle, dest_handle: Self::ManagedBufferHandle )

source§

impl ManagedTypeApi for VmApiImpl

source§

impl ManagedTypeApiImpl for VmApiImpl

source§

fn mb_to_big_int_unsigned( &self, buffer_handle: Self::ManagedBufferHandle, big_int_handle: Self::BigIntHandle )

source§

fn mb_to_big_int_signed( &self, buffer_handle: Self::ManagedBufferHandle, big_int_handle: Self::BigIntHandle )

source§

fn mb_from_big_int_unsigned( &self, big_int_handle: Self::BigIntHandle, buffer_handle: Self::ManagedBufferHandle )

source§

fn mb_from_big_int_signed( &self, big_int_handle: Self::BigIntHandle, buffer_handle: Self::ManagedBufferHandle )

source§

fn mb_to_big_float( &self, buffer_handle: Self::ManagedBufferHandle, big_float_handle: Self::BigFloatHandle )

source§

fn mb_from_big_float( &self, big_float_handle: Self::BigFloatHandle, buffer_handle: Self::ManagedBufferHandle )

source§

fn validate_token_identifier( &self, token_id_handle: Self::ManagedBufferHandle ) -> bool

source§

impl PartialEq for VmApiImpl

source§

fn eq(&self, _: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PrintApi for VmApiImpl

source§

impl PrintApiImpl for VmApiImpl

§

type Buffer = FormatBufferIgnore

Buffer used for printing only.
source§

fn print_buffer(&self, _buffer: Self::Buffer)

source§

impl SendApi for VmApiImpl

source§

impl SendApiImpl for VmApiImpl

source§

fn transfer_value_legacy<M>( &self, to: &Address, amount: &BigUint<M>, data: &BoxedBytes )
where M: ManagedTypeApi,

source§

fn transfer_value_execute<M: ManagedTypeApi>( &self, to: &ManagedAddress<M>, amount: &BigUint<M>, gas_limit: u64, endpoint_name: &ManagedBuffer<M>, arg_buffer: &ManagedArgBuffer<M> ) -> Result<(), &'static [u8]>

Sends MOAX to an address (optionally) and executes like an async call, but without callback.
source§

fn transfer_value_execute_legacy<M: ManagedTypeApi>( &self, to: &Address, amount: &BigUint<M>, gas_limit: u64, endpoint_name: &BoxedBytes, arg_buffer: &ArgBuffer ) -> Result<(), &'static [u8]>

source§

fn transfer_dct_execute<M: ManagedTypeApi>( &self, to: &ManagedAddress<M>, token: &TokenIdentifier<M>, amount: &BigUint<M>, gas_limit: u64, endpoint_name: &ManagedBuffer<M>, arg_buffer: &ManagedArgBuffer<M> ) -> Result<(), &'static [u8]>

Sends DCT to an address and executes like an async call, but without callback.
source§

fn transfer_dct_execute_legacy<M: ManagedTypeApi>( &self, to: &Address, token: &TokenIdentifier<M>, amount: &BigUint<M>, gas_limit: u64, endpoint_name: &BoxedBytes, arg_buffer: &ArgBuffer ) -> Result<(), &'static [u8]>

source§

fn transfer_dct_nft_execute<M: ManagedTypeApi>( &self, to: &ManagedAddress<M>, token: &TokenIdentifier<M>, nonce: u64, amount: &BigUint<M>, gas_limit: u64, endpoint_name: &ManagedBuffer<M>, arg_buffer: &ManagedArgBuffer<M> ) -> Result<(), &'static [u8]>

Sends DCT NFT to an address and executes like an async call, but without callback.
source§

fn transfer_dct_nft_execute_legacy<M: ManagedTypeApi>( &self, to: &Address, token: &TokenIdentifier<M>, nonce: u64, amount: &BigUint<M>, gas_limit: u64, endpoint_name: &BoxedBytes, arg_buffer: &ArgBuffer ) -> Result<(), &'static [u8]>

source§

fn multi_transfer_dct_nft_execute<M: ManagedTypeApi>( &self, to: &ManagedAddress<M>, payments: &ManagedVec<M, DctTokenPayment<M>>, gas_limit: u64, endpoint_name: &ManagedBuffer<M>, arg_buffer: &ManagedArgBuffer<M> ) -> Result<(), &'static [u8]>

source§

fn multi_transfer_dct_nft_execute_legacy<M: ManagedTypeApi>( &self, to: &Address, payments: &[DctTokenPayment<M>], gas_limit: u64, endpoint_name: &BoxedBytes, arg_buffer: &ArgBuffer ) -> Result<(), &'static [u8]>

source§

fn async_call_raw<M: ManagedTypeApi>( &self, to: &ManagedAddress<M>, amount: &BigUint<M>, endpoint_name: &ManagedBuffer<M>, arg_buffer: &ManagedArgBuffer<M> ) -> !

Sends an asynchronous call to another contract. Calling this method immediately terminates tx execution. Using it directly is generally discouraged. Read more
source§

fn async_call_raw_legacy<M: ManagedTypeApi>( &self, to: &Address, amount: &BigUint<M>, endpoint_name: &BoxedBytes, arg_buffer: &ArgBuffer ) -> !

source§

fn create_async_call_raw<M: ManagedTypeApi>( &self, to: &ManagedAddress<M>, amount: &BigUint<M>, endpoint_name: &ManagedBuffer<M>, success: &'static [u8], error: &'static [u8], gas: u64, extra_gas_for_callback: u64, arg_buffer: &ManagedArgBuffer<M> )

source§

fn deploy_contract<M: ManagedTypeApi>( &self, gas: u64, amount: &BigUint<M>, code: &ManagedBuffer<M>, code_metadata: CodeMetadata, arg_buffer: &ManagedArgBuffer<M> ) -> (ManagedAddress<M>, ManagedVec<M, ManagedBuffer<M>>)

Deploys a new contract in the same shard. Unlike async_call_raw, the deployment is synchronous and tx execution continues afterwards. Also unlike async_call_raw, it uses an argument buffer to pass arguments If the deployment fails, Option::None is returned
source§

fn deploy_contract_legacy<M: ManagedTypeApi>( &self, gas: u64, amount: &BigUint<M>, code: &BoxedBytes, code_metadata: CodeMetadata, arg_buffer: &ArgBuffer ) -> (ManagedAddress<M>, ManagedVec<M, ManagedBuffer<M>>)

source§

fn deploy_from_source_contract<M: ManagedTypeApi>( &self, gas: u64, amount: &BigUint<M>, source_contract_address: &ManagedAddress<M>, code_metadata: CodeMetadata, arg_buffer: &ManagedArgBuffer<M> ) -> (ManagedAddress<M>, ManagedVec<M, ManagedBuffer<M>>)

Deploys a new contract in the same shard by re-using the code of an already deployed source contract. The deployment is done synchronously and the new contract’s address is returned. If the deployment fails, Option::None is returned
source§

fn deploy_from_source_contract_legacy<M: ManagedTypeApi>( &self, gas: u64, amount: &BigUint<M>, source_contract_address: &Address, code_metadata: CodeMetadata, arg_buffer: &ArgBuffer ) -> (ManagedAddress<M>, ManagedVec<M, ManagedBuffer<M>>)

source§

fn upgrade_from_source_contract<M: ManagedTypeApi>( &self, sc_address: &ManagedAddress<M>, gas: u64, amount: &BigUint<M>, source_contract_address: &ManagedAddress<M>, code_metadata: CodeMetadata, arg_buffer: &ManagedArgBuffer<M> )

source§

fn upgrade_from_source_contract_legacy<M: ManagedTypeApi>( &self, sc_address: &Address, gas: u64, amount: &BigUint<M>, source_contract_address: &Address, code_metadata: CodeMetadata, arg_buffer: &ArgBuffer )

source§

fn upgrade_contract<M: ManagedTypeApi>( &self, sc_address: &ManagedAddress<M>, gas: u64, amount: &BigUint<M>, code: &ManagedBuffer<M>, code_metadata: CodeMetadata, arg_buffer: &ManagedArgBuffer<M> )

Upgrades a child contract of the currently executing contract. The upgrade is synchronous, and the current transaction will fail if the upgrade fails. The child contract’s new init function will be called with the provided arguments
source§

fn upgrade_contract_legacy<M: ManagedTypeApi>( &self, sc_address: &Address, gas: u64, amount: &BigUint<M>, code: &BoxedBytes, code_metadata: CodeMetadata, arg_buffer: &ArgBuffer )

source§

fn execute_on_dest_context_raw<M: ManagedTypeApi>( &self, gas: u64, to: &ManagedAddress<M>, amount: &BigUint<M>, endpoint_name: &ManagedBuffer<M>, arg_buffer: &ManagedArgBuffer<M> ) -> ManagedVec<M, ManagedBuffer<M>>

Same shard, in-line execution of another contract.
source§

fn execute_on_dest_context_raw_legacy<M: ManagedTypeApi>( &self, gas: u64, to: &Address, amount: &BigUint<M>, endpoint_name: &BoxedBytes, arg_buffer: &ArgBuffer ) -> ManagedVec<M, ManagedBuffer<M>>

source§

fn execute_on_same_context_raw<M: ManagedTypeApi>( &self, gas: u64, to: &ManagedAddress<M>, amount: &BigUint<M>, endpoint_name: &ManagedBuffer<M>, arg_buffer: &ManagedArgBuffer<M> ) -> ManagedVec<M, ManagedBuffer<M>>

source§

fn execute_on_same_context_raw_legacy<M: ManagedTypeApi>( &self, gas: u64, to: &Address, amount: &BigUint<M>, endpoint_name: &BoxedBytes, arg_buffer: &ArgBuffer ) -> ManagedVec<M, ManagedBuffer<M>>

source§

fn execute_on_dest_context_readonly_raw<M: ManagedTypeApi>( &self, gas: u64, to: &ManagedAddress<M>, endpoint_name: &ManagedBuffer<M>, arg_buffer: &ManagedArgBuffer<M> ) -> ManagedVec<M, ManagedBuffer<M>>

source§

fn execute_on_dest_context_readonly_raw_legacy<M: ManagedTypeApi>( &self, gas: u64, to: &Address, endpoint_name: &BoxedBytes, arg_buffer: &ArgBuffer ) -> ManagedVec<M, ManagedBuffer<M>>

source§

fn clean_return_data(&self)

source§

fn delete_from_return_data(&self, index: usize)

source§

impl StaticVarApi for VmApiImpl

source§

impl StaticVarApiImpl for VmApiImpl

source§

impl StorageReadApi for VmApiImpl

source§

impl StorageReadApiImpl for VmApiImpl

source§

fn storage_load_len(&self, key: &[u8]) -> usize

source§

fn storage_load_to_heap(&self, key: &[u8]) -> Box<[u8]>

source§

fn storage_load_big_uint_raw(&self, key: &[u8], dest: Self::ManagedBufferHandle)

source§

fn storage_load_managed_buffer_raw( &self, key_handle: Self::ManagedBufferHandle, dest: Self::ManagedBufferHandle )

source§

fn storage_load_from_address( &self, address_handle: Self::ManagedBufferHandle, key_handle: Self::ManagedBufferHandle, dest: Self::ManagedBufferHandle )

source§

fn storage_read_api_init(&self)

source§

impl StorageWriteApi for VmApiImpl

source§

impl StorageWriteApiImpl for VmApiImpl

source§

fn storage_store_slice_u8(&self, key: &[u8], value: &[u8])

source§

fn storage_store_big_uint_raw( &self, key: &[u8], value_handle: Self::BigIntHandle )

source§

fn storage_store_managed_buffer_raw( &self, key_handle: Self::ManagedBufferHandle, value_handle: Self::ManagedBufferHandle )

source§

fn storage_store_managed_buffer_clear( &self, key_handle: Self::ManagedBufferHandle )

source§

impl VMApi for VmApiImpl

source§

impl CallTypeApi for VmApiImpl

source§

impl Eq for VmApiImpl

source§

impl StorageMapperApi for VmApiImpl

Auto Trait Implementations§

§

impl CodecFromSelf for VmApiImpl

§

impl RefUnwindSafe for VmApiImpl

§

impl Send for VmApiImpl

§

impl Sync for VmApiImpl

§

impl Unpin for VmApiImpl

§

impl UnwindSafe for VmApiImpl

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.