multiversx_sc_wasm_adapter::api

Struct VmApiImpl

Source
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 BigFloatApiImpl 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 BigIntApiImpl 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_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_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) -> i32

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§

fn bi_sub_unsigned( &self, dest: Self::BigIntHandle, x: Self::BigIntHandle, y: 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 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 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 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_esdt_nft_nonce( &self, address_handle: Self::ManagedBufferHandle, token_id_handle: Self::ManagedBufferHandle, ) -> u64

Source§

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

Source§

fn managed_get_esdt_token_data( &self, address_handle: RawHandle, token_id_handle: RawHandle, nonce: u64, value_handle: RawHandle, properties_handle: RawHandle, hash_handle: RawHandle, name_handle: RawHandle, attributes_handle: RawHandle, creator_handle: RawHandle, royalties_handle: RawHandle, uris_handle: RawHandle, )

Source§

fn managed_get_back_transfers( &self, esdt_transfer_value_handle: RawHandle, call_value_handle: RawHandle, )

Source§

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

Source§

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

Source§

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

Source§

fn load_esdt_local_roles( &self, token_id_handle: Self::ManagedBufferHandle, ) -> EsdtLocalRoleFlags

Source§

fn managed_is_builtin_function( &self, function_name_handle: Self::ManagedBufferHandle, ) -> bool

Source§

fn managed_get_code_metadata( &self, address_handle: Self::ManagedBufferHandle, response_handle: Self::ManagedBufferHandle, )

Source§

impl CallValueApi for VmApiImpl

Source§

impl CallValueApiImpl for VmApiImpl

Source§

fn check_not_payable(&self)

Source§

fn load_egld_value(&self, dest: Self::BigIntHandle)

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).
Source§

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

Loads all ESDT call values into a managed vec. Overwrites destination.
Source§

fn esdt_num_transfers(&self) -> usize

Gets the total number of ESDT transfers (Fungible/SFT/NFT). Read more
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_managed( &self, result_handle: Self::ManagedBufferHandle, data_handle: Self::ManagedBufferHandle, )

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Note: the signature is minimum 2 bytes in length, the second byte encodes the length of the remaining signature bytes.
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_managed( &self, r: Self::ManagedBufferHandle, s: Self::ManagedBufferHandle, dest_sig_handle: Self::ManagedBufferHandle, )

Source§

fn verify_secp256r1_managed( &self, key: Self::ManagedBufferHandle, message: Self::ManagedBufferHandle, signature: Self::ManagedBufferHandle, )

Source§

fn verify_bls_signature_share_managed( &self, key: Self::ManagedBufferHandle, message: Self::ManagedBufferHandle, signature: Self::ManagedBufferHandle, )

Source§

fn verify_bls_aggregated_signature_managed( &self, key: Self::ManagedBufferHandle, message: Self::ManagedBufferHandle, signature: Self::ManagedBufferHandle, )

Source§

impl EllipticCurveApiImpl for VmApiImpl

Source§

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

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§

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

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

Source§

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

Saves an event log.
Source§

impl ManagedBufferApiImpl 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_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 ManagedMapApiImpl for VmApiImpl

Source§

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

Requests a new handle from the VM.
Source§

fn mm_get( &self, map_handle: Self::ManagedMapHandle, key_handle: Self::ManagedBufferHandle, out_value_handle: Self::ManagedBufferHandle, )

Source§

fn mm_put( &self, map_handle: Self::ManagedMapHandle, key_handle: Self::ManagedBufferHandle, out_value_handle: Self::ManagedBufferHandle, )

Source§

fn mm_remove( &self, map_handle: Self::ManagedMapHandle, key_handle: Self::ManagedBufferHandle, out_value_handle: Self::ManagedBufferHandle, )

Source§

fn mm_contains( &self, map_handle: Self::ManagedMapHandle, key_handle: Self::ManagedBufferHandle, ) -> bool

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§

fn get_token_ticker_len(&self, token_id_len: usize) -> usize

Source§

impl PartialEq for VmApiImpl

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

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

Source§

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_execute( &self, to_handle: RawHandle, amount_handle: RawHandle, gas_limit: u64, endpoint_name_handle: RawHandle, arg_buffer_handle: RawHandle, ) -> Result<(), &'static [u8]>

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

fn multi_transfer_esdt_nft_execute( &self, to_handle: RawHandle, payments_handle: RawHandle, gas_limit: u64, endpoint_name_handle: RawHandle, arg_buffer_handle: RawHandle, ) -> Result<(), &'static [u8]>

Source§

fn async_call_raw( &self, to_handle: RawHandle, egld_value_handle: RawHandle, endpoint_name_handle: RawHandle, arg_buffer_handle: RawHandle, ) -> !

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

fn create_async_call_raw( &self, to_handle: RawHandle, egld_value_handle: RawHandle, endpoint_name_handle: RawHandle, arg_buffer_handle: RawHandle, success_callback: &'static str, error_callback: &'static str, gas: u64, extra_gas_for_callback: u64, callback_closure_handle: RawHandle, )

Source§

fn deploy_contract( &self, gas: u64, egld_value_handle: RawHandle, code_handle: RawHandle, code_metadata_handle: RawHandle, arg_buffer_handle: RawHandle, new_address_handle: RawHandle, result_handle: RawHandle, )

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_from_source_contract( &self, gas: u64, egld_value_handle: RawHandle, source_contract_address_handle: RawHandle, code_metadata_handle: RawHandle, arg_buffer_handle: RawHandle, new_address_handle: RawHandle, result_handle: RawHandle, )

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 upgrade_from_source_contract( &self, sc_address_handle: RawHandle, gas: u64, egld_value_handle: RawHandle, source_contract_address_handle: RawHandle, code_metadata_handle: RawHandle, arg_buffer_handle: RawHandle, )

Source§

fn upgrade_contract( &self, sc_address_handle: RawHandle, gas: u64, egld_value_handle: RawHandle, code_handle: RawHandle, code_metadata_handle: RawHandle, arg_buffer_handle: RawHandle, )

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 execute_on_dest_context_raw( &self, gas: u64, to_handle: RawHandle, egld_value_handle: RawHandle, endpoint_name_handle: RawHandle, arg_buffer_handle: RawHandle, result_handle: RawHandle, )

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

fn execute_on_same_context_raw( &self, gas: u64, to_handle: RawHandle, egld_value_handle: RawHandle, endpoint_name_handle: RawHandle, arg_buffer_handle: RawHandle, result_handle: RawHandle, )

Source§

fn execute_on_dest_context_readonly_raw( &self, gas: u64, to_handle: RawHandle, endpoint_name_handle: RawHandle, arg_buffer_handle: RawHandle, result_handle: RawHandle, )

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§

impl StorageWriteApi for VmApiImpl

Source§

impl StorageWriteApiImpl for VmApiImpl

Source§

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

Source§

impl VMApi for VmApiImpl

Source§

fn external_view_init_override() -> bool

Slightly hacky way of overriding the constructor for external view contracts. Read more
Source§

fn init_static()

Source§

impl CallTypeApi for VmApiImpl

Source§

impl Eq for VmApiImpl

Source§

impl StorageMapperApi for VmApiImpl

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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,

Source§

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>,

Source§

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>,

Source§

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.