pub type DebugApi = TxContextRef;

Aliased Type§

struct DebugApi(/* private fields */);

Implementations§

source§

impl DebugApi

source

pub fn insert_new_managed_buffer( &self, value: Vec<u8> ) -> <Self as HandleTypeInfo>::ManagedBufferHandle

source

pub fn insert_new_managed_buffer_old( &self, value: Vec<u8> ) -> ManagedBuffer<Self>

source

pub fn mb_handle_to_value( &self, mb_handle: <Self as HandleTypeInfo>::ManagedBufferHandle ) -> Vec<u8>

source

pub fn address_handle_to_value( &self, address_handle: <Self as HandleTypeInfo>::ManagedBufferHandle ) -> Address

source

pub fn insert_new_big_uint( &self, value: BigUint ) -> <Self as HandleTypeInfo>::BigIntHandle

source

pub fn set_big_uint( &self, handle: <Self as HandleTypeInfo>::BigIntHandle, value: BigUint )

source

pub fn insert_new_big_uint_old(&self, value: BigUint) -> BigUint<Self>

source

pub fn insert_new_big_uint_zero(&self) -> <Self as HandleTypeInfo>::BigIntHandle

source

pub fn big_uint_handle_to_value( &self, bu_handle: <Self as HandleTypeInfo>::BigIntHandle ) -> BigUint

Trait Implementations§

source§

impl BigFloatApi for DebugApi

source§

fn bf_from_parts( &self, integral_part: i32, fractional_part: i32, exponent: i32 ) -> Self::ManagedBufferHandle

source§

fn bf_from_frac(&self, numerator: i64, denominator: i64) -> Self::BigFloatHandle

source§

fn bf_from_sci(&self, significand: i64, exponent: i64) -> Self::BigFloatHandle

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_abs(&self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle)

source§

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

source§

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

source§

fn bf_sign(&self, x: Self::BigFloatHandle) -> 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, bi: Self::BigIntHandle)

source§

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

source§

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

source§

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

source§

impl BigIntApi for DebugApi

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, handle: Self::BigIntHandle) -> usize

source§

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

source§

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

source§

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

source§

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

source§

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

source§

fn bi_to_i64(&self, handle: 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, x: Self::BigIntHandle, str_handle: Self::ManagedBufferHandle )

source§

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

source§

impl BlockchainApi for DebugApi

source§

impl BlockchainApiImpl for DebugApi

source§

fn get_caller_legacy(&self) -> Address

source§

fn get_sc_address_legacy(&self) -> Address

source§

fn get_owner_address_legacy(&self) -> Address

source§

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

source§

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

source§

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

source§

fn get_state_root_hash_legacy(&self) -> H256

source§

fn get_tx_hash_legacy(&self) -> H256

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 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 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<M: ManagedTypeApi>( &self, address: &ManagedAddress<M>, token: &TokenIdentifier<M>, nonce: u64 ) -> DctTokenData<M>

source§

fn load_dct_token_data_unmanaged<M: ManagedTypeApi>( &self, _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 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§

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

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(&self, address_handle: Self::ManagedBufferHandle) -> u32

source§

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

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 load_tx_hash_managed(&self, dest: Self::ManagedBufferHandle)

source§

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

source§

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

source§

impl CallValueApi for DebugApi

source§

impl CallValueApiImpl for DebugApi

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_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_num_transfers(&self) -> usize

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§

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

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

impl CryptoApi for DebugApi

source§

impl CryptoApiImpl for DebugApi

source§

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

source§

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

source§

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

source§

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

source§

impl EllipticCurveApi for DebugApi

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_handle: 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 DebugApi

source§

impl EndpointArgumentApiImpl for DebugApi

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_i64(&self, arg_index: i32) -> i64

source§

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

source§

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

source§

fn endpoint_init(&self)

source§

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

source§

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

source§

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

source§

impl EndpointFinishApi for DebugApi

source§

impl EndpointFinishApiImpl for DebugApi

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_i64(&self, value: i64)

source§

fn finish_u64(&self, value: u64)

source§

impl ErrorApi for DebugApi

source§

impl ErrorApiImpl for DebugApi

source§

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

source§

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

source§

impl HandleTypeInfo for DebugApi

source§

impl LogApi for DebugApi

source§

impl LogApiImpl for DebugApi

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 DebugApi

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_position: 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, value: &[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 DebugApi

source§

impl ManagedTypeApiImpl for DebugApi

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl PartialEq for DebugApi

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 DebugApi

source§

impl PrintApiImpl for DebugApi

§

type Buffer = ManagedBufferCachedBuilder<TxContextRef>

Buffer used for printing only.
source§

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

source§

impl SendApi for DebugApi

source§

impl SendApiImpl for DebugApi

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_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_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 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 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 create_async_call_raw( &self, to: Self::ManagedBufferHandle, amount: Self::BigIntHandle, endpoint_name_handle: Self::ManagedBufferHandle, arg_buffer_handle: Self::ManagedBufferHandle, success_callback: &'static str, error_callback: &'static str, _gas: u64, _extra_gas_for_callback: u64, callback_closure_handle: Self::ManagedBufferHandle )

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_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 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_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 execute_on_dest_context_raw<M: ManagedTypeApi>( &self, _gas: u64, to: &ManagedAddress<M>, value: &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_same_context_raw<M: ManagedTypeApi>( &self, _gas: u64, _to: &ManagedAddress<M>, _value: &BigUint<M>, _endpoint_name: &ManagedBuffer<M>, _arg_buffer: &ManagedArgBuffer<M> ) -> 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 clean_return_data(&self)

source§

fn delete_from_return_data(&self, index: usize)

source§

fn transfer_value_legacy<M>( &self, _to: &Address, _amount: &BigUint<M>, _data: &BoxedBytes )
where M: ManagedTypeApi,

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_legacy<M: ManagedTypeApi>( &self, _to: &Address, _token: &TokenIdentifier<M>, _amount: &BigUint<M>, _gas: u64, _endpoint_name: &BoxedBytes, _arg_buffer: &ArgBuffer ) -> Result<(), &'static [u8]>

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_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_legacy<M: ManagedTypeApi>( &self, _to: &Address, _amount: &BigUint<M>, _endpoint_name: &BoxedBytes, _arg_buffer: &ArgBuffer ) -> !

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_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_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_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_legacy<M: ManagedTypeApi>( &self, _gas: u64, _to: &Address, _value: &BigUint<M>, _endpoint_name: &BoxedBytes, _arg_buffer: &ArgBuffer ) -> ManagedVec<M, ManagedBuffer<M>>

source§

fn execute_on_same_context_raw_legacy<M: ManagedTypeApi>( &self, _gas: u64, _to: &Address, _value: &BigUint<M>, _endpoint_name: &BoxedBytes, _arg_buffer: &ArgBuffer ) -> ManagedVec<M, ManagedBuffer<M>>

source§

fn execute_on_dest_context_readonly_raw_legacy<M: ManagedTypeApi>( &self, _gas: u64, _address: &Address, _endpoint_name: &BoxedBytes, _arg_buffer: &ArgBuffer ) -> ManagedVec<M, ManagedBuffer<M>>

source§

impl StaticVarApi for DebugApi

source§

impl StaticVarApiImpl for DebugApi

source§

impl StorageReadApi for DebugApi

source§

impl StorageReadApiImpl for DebugApi

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 DebugApi

source§

impl StorageWriteApiImpl for DebugApi

source§

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

source§

fn storage_store_big_uint_raw(&self, key: &[u8], 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 DebugApi

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 DebugApi

source§

impl Eq for DebugApi

source§

impl StorageMapperApi for DebugApi