pub struct UncallableApi;
Expand description

Dummy type with no implementation. Provides context in ABI generators.

Trait Implementations§

source§

impl BigIntApi for UncallableApi

source§

fn bi_new(&self, _value: i64) -> Handle

source§

fn bi_unsigned_byte_length(&self, _x: Handle) -> usize

source§

fn bi_get_unsigned_bytes(&self, _reference: Handle) -> BoxedBytes

source§

fn bi_set_unsigned_bytes(&self, _destination: Handle, _bytes: &[u8])

source§

fn bi_signed_byte_length(&self, _x: Handle) -> usize

source§

fn bi_get_signed_bytes(&self, _reference: Handle) -> BoxedBytes

source§

fn bi_set_signed_bytes(&self, _destination: Handle, _bytes: &[u8])

source§

fn bi_to_i64(&self, _reference: Handle) -> Option<i64>

source§

fn bi_add(&self, _dest: Handle, _x: Handle, _y: Handle)

source§

fn bi_sub(&self, _dest: Handle, _x: Handle, _y: Handle)

source§

fn bi_sub_unsigned(&self, _dest: Handle, _x: Handle, _y: Handle)

source§

fn bi_mul(&self, _dest: Handle, _x: Handle, _y: Handle)

source§

fn bi_t_div(&self, _dest: Handle, _x: Handle, _y: Handle)

source§

fn bi_t_mod(&self, _dest: Handle, _x: Handle, _y: Handle)

source§

fn bi_abs(&self, _dest: Handle, _x: Handle)

source§

fn bi_neg(&self, _dest: Handle, _x: Handle)

source§

fn bi_sign(&self, _x: Handle) -> Sign

source§

fn bi_cmp(&self, _x: Handle, _y: Handle) -> Ordering

source§

fn bi_sqrt(&self, _dest: Handle, _x: Handle)

source§

fn bi_pow(&self, _dest: Handle, _x: Handle, _y: Handle)

source§

fn bi_log2(&self, _x: Handle) -> u32

source§

fn bi_and(&self, _dest: Handle, _x: Handle, _y: Handle)

source§

fn bi_or(&self, _dest: Handle, _x: Handle, _y: Handle)

source§

fn bi_xor(&self, _dest: Handle, _x: Handle, _y: Handle)

source§

fn bi_shr(&self, _dest: Handle, _x: Handle, _bits: usize)

source§

fn bi_shl(&self, _dest: Handle, _x: Handle, _bits: usize)

source§

fn bi_new_zero(&self) -> Handle

source§

impl BlockchainApi for UncallableApi

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 get_caller_legacy(&self) -> Address

source§

fn get_balance_legacy(&self, _address: &Address) -> BigUint<Self>

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: &Address, _token: &TokenIdentifier<Self> ) -> u64

source§

fn get_dct_balance( &self, _address: &ManagedAddress<Self>, _token: &TokenIdentifier<Self>, _nonce: u64 ) -> BigUint<Self>

source§

fn get_dct_token_data( &self, _address: &ManagedAddress<Self>, _token: &TokenIdentifier<Self>, _nonce: u64 ) -> DctTokenData<Self>

source§

fn get_caller(&self) -> ManagedAddress<Self>

source§

fn get_sc_address(&self) -> ManagedAddress<Self>

source§

fn get_owner_address(&self) -> ManagedAddress<Self>

source§

fn get_shard_of_address(&self, address: &ManagedAddress<Self>) -> u32

source§

fn is_smart_contract(&self, address: &ManagedAddress<Self>) -> bool

source§

fn get_balance(&self, address: &ManagedAddress<Self>) -> BigUint<Self>

source§

fn get_state_root_hash(&self) -> ManagedByteArray<Self, 32>

source§

fn get_tx_hash(&self) -> ManagedByteArray<Self, 32>

source§

fn get_block_random_seed(&self) -> ManagedByteArray<Self, 48>

source§

fn get_prev_block_random_seed(&self) -> ManagedByteArray<Self, 48>

source§

impl CallValueApi for UncallableApi

source§

fn check_not_payable(&self)

source§

fn moax_value(&self) -> BigUint<Self>

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_value(&self) -> BigUint<Self>

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) -> TokenIdentifier<Self>

Returns the call value token identifier of the current call. The identifier is wrapped in a TokenIdentifier object, to hide underlying logic. Read more
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) -> BigUint<Self>

source§

fn token_by_index(&self, _index: usize) -> TokenIdentifier<Self>

source§

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

source§

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

source§

fn require_moax(&self) -> BigUint<Self>

Will return the MOAX call value, but also fail with an error if DCT is sent. Especially used in the auto-generated call value processing.
source§

fn require_dct(&self, token: &[u8]) -> BigUint<Self>

Will return the DCT call value, but also fail with an error if MOAX or the wrong DCT token is sent. Especially used in the auto-generated call value processing.
source§

fn payment_token_pair(&self) -> (BigUint<Self>, TokenIdentifier<Self>)

Returns both the call value (either MOAX or DCT) and the token identifier. Especially used in the `#[payable(“*”)] auto-generated snippets. The method might seem redundant, but there is such a hook in Arwen that might be used in this scenario in the future.
source§

fn get_all_dct_transfers(&self) -> ManagedVec<Self, DctTokenPayment<Self>>

source§

impl Clone for UncallableApi

source§

fn clone(&self) -> UncallableApi

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 UncallableApi

source§

fn sha256(&self, _data: &[u8]) -> H256

source§

fn keccak256(&self, _data: &[u8]) -> H256

source§

fn ripemd160(&self, _data: &[u8]) -> Box<[u8; 20]>

source§

fn verify_bls(&self, _key: &[u8], _message: &[u8], _signature: &[u8]) -> bool

source§

fn verify_ed25519( &self, _key: &[u8], _message: &[u8], _signature: &[u8] ) -> bool

source§

fn verify_secp256k1( &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_custom_secp256k1( &self, _key: &[u8], _message: &[u8], _signature: &[u8], _hash_type: MessageHashType ) -> bool

source§

fn encode_secp256k1_der_signature(&self, _r: &[u8], _s: &[u8]) -> BoxedBytes

source§

impl EllipticCurveApi for UncallableApi

source§

fn ec_create(&self, _name: &[u8]) -> Handle

source§

fn ec_get_values( &self, _ec_handle: Handle, _field_order_handle: Handle, _base_point_order_handle: Handle, _eq_constant_handle: Handle, _x_base_point_handle: Handle, _y_base_point_handle: Handle )

source§

fn ec_curve_length(&self, _ec_handle: Handle) -> u32

source§

fn ec_private_key_byte_length(&self, _ec_handle: Handle) -> u32

source§

fn ec_add( &self, _x_result_handle: Handle, _y_result_handle: Handle, _ec_handle: Handle, _x_first_point: Handle, _y_first_point: Handle, _x_second_point: Handle, _y_second_point: Handle )

source§

fn ec_double( &self, _x_result_handle: Handle, _y_result_handle: Handle, _ec_handle: Handle, _x_point_handle: Handle, _y_point_handle: Handle )

source§

fn ec_is_on_curve( &self, _ec_handle: Handle, _x_point_handle: Handle, _y_point_handle: Handle ) -> bool

source§

fn ec_scalar_mult( &self, _x_result_handle: Handle, _y_result_handle: Handle, _ec_handle: Handle, _x_point_handle: Handle, _y_point_handle: Handle, _data: &[u8] )

source§

fn ec_scalar_base_mult( &self, _x_result_handle: Handle, _y_result_handle: Handle, _ec_handle: Handle, _data: &[u8] )

source§

fn ec_marshal( &self, _ec_handle: Handle, _x_pair_handle: Handle, _y_pair_handle: Handle ) -> BoxedBytes

source§

fn ec_marshal_compressed( &self, _ec_handle: Handle, _x_pair_handle: Handle, _y_pair_handle: Handle ) -> BoxedBytes

source§

fn ec_unmarshal( &self, _x_result_handle: Handle, _y_result_handle: Handle, _ec_handle: Handle, _data: &[u8] )

source§

fn ec_unmarshal_compressed( &self, _x_result_handle: Handle, _y_result_handle: Handle, _ec_handle: Handle, _data: &[u8] )

source§

fn ec_generate_key( &self, _x_pub_key_handle: Handle, _y_pub_key_handle: Handle, _ec_handle: Handle ) -> BoxedBytes

source§

impl EndpointArgumentApi for UncallableApi

source§

fn get_num_arguments(&self) -> i32

source§

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

source§

fn copy_argument_to_slice(&self, _arg_index: i32, _slice: &mut [u8])

source§

fn get_argument_vec_u8(&self, _arg_index: i32) -> Vec<u8>

source§

fn get_argument_big_int_raw(&self, _arg_id: i32) -> Handle

source§

fn get_argument_big_uint_raw(&self, _arg_id: i32) -> Handle

source§

fn get_argument_managed_buffer_raw(&self, _arg_id: i32) -> Handle

source§

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

source§

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

source§

fn check_num_arguments(&self, expected: i32)

source§

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

source§

impl EndpointFinishApi for UncallableApi

source§

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

source§

fn finish_big_int_raw(&self, _handle: Handle)

source§

fn finish_big_uint_raw(&self, _handle: Handle)

source§

fn finish_managed_buffer_raw(&self, _handle: Handle)

source§

fn finish_u64(&self, _value: u64)

source§

fn finish_i64(&self, _value: i64)

source§

impl ErrorApi for UncallableApi

source§

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

source§

fn signal_error_from_buffer(&self, _message_handle: Handle) -> !

source§

impl LogApi for UncallableApi

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: Handle, _data_handle: Handle)

source§

impl ManagedBufferApi for UncallableApi

source§

fn mb_new_empty(&self) -> Handle

source§

fn mb_new_from_bytes(&self, _bytes: &[u8]) -> Handle

source§

fn mb_len(&self, _handle: Handle) -> usize

source§

fn mb_to_boxed_bytes(&self, _handle: Handle) -> BoxedBytes

source§

fn mb_load_slice( &self, _source_handle: Handle, _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: Handle, _starting_pos: usize, _slice_len: usize, _dest_handle: Handle ) -> Result<(), InvalidSliceError>

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

fn mb_copy_to_slice_pad_right(&self, _handle: Handle, _destination: &mut [u8])

source§

fn mb_overwrite(&self, _handle: Handle, _value: &[u8])

source§

fn mb_append(&self, _accumulator_handle: Handle, _data_handle: Handle)

source§

fn mb_append_bytes(&self, _accumulator_handle: Handle, _bytes: &[u8])

source§

fn mb_eq(&self, _handle1: Handle, _handle2: Handle) -> bool

source§

impl ManagedTypeApi for UncallableApi

source§

fn mb_to_big_int_unsigned(&self, _buffer_handle: Handle) -> Handle

source§

fn mb_to_big_int_signed(&self, _buffer_handle: Handle) -> Handle

source§

fn mb_from_big_int_unsigned(&self, _big_int_handle: Handle) -> Handle

source§

fn mb_from_big_int_signed(&self, _big_int_handle: Handle) -> Handle

source§

impl SendApi for UncallableApi

source§

fn direct_moax<D>( &self, _to: &ManagedAddress<Self>, _amount: &BigUint<Self>, _data: D )
where D: ManagedInto<Self, ManagedBuffer<Self>>,

Sends MOAX to a given address, directly. Used especially for sending MOAX to regular accounts.
source§

fn direct_moax_execute( &self, _to: &ManagedAddress<Self>, _amount: &BigUint<Self>, _gas_limit: u64, _endpoint_name: &ManagedBuffer<Self>, _arg_buffer: &ManagedArgBuffer<Self> ) -> Result<(), &'static [u8]>

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

fn direct_dct_execute( &self, _to: &ManagedAddress<Self>, _token: &TokenIdentifier<Self>, _amount: &BigUint<Self>, _gas: u64, _endpoint_name: &ManagedBuffer<Self>, _arg_buffer: &ManagedArgBuffer<Self> ) -> Result<(), &'static [u8]>

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

fn direct_dct_nft_execute( &self, _to: &ManagedAddress<Self>, _token: &TokenIdentifier<Self>, _nonce: u64, _amount: &BigUint<Self>, _gas_limit: u64, _endpoint_name: &ManagedBuffer<Self>, _arg_buffer: &ManagedArgBuffer<Self> ) -> Result<(), &'static [u8]>

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

fn direct_multi_dct_transfer_execute( &self, _to: &ManagedAddress<Self>, _payments: &ManagedVec<Self, DctTokenPayment<Self>>, _gas_limit: u64, _endpoint_name: &ManagedBuffer<Self>, _arg_buffer: &ManagedArgBuffer<Self> ) -> Result<(), &'static [u8]>

source§

fn async_call_raw( &self, _to: &ManagedAddress<Self>, _amount: &BigUint<Self>, _endpoint_name: &ManagedBuffer<Self>, _arg_buffer: &ManagedArgBuffer<Self> ) -> !

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

fn deploy_contract( &self, _gas: u64, _amount: &BigUint<Self>, _code: &ManagedBuffer<Self>, _code_metadata: CodeMetadata, _arg_buffer: &ManagedArgBuffer<Self> ) -> (ManagedAddress<Self>, ManagedVec<Self, ManagedBuffer<Self>>)

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, _amount: &BigUint<Self>, _source_contract_address: &ManagedAddress<Self>, _code_metadata: CodeMetadata, _arg_buffer: &ManagedArgBuffer<Self> ) -> (ManagedAddress<Self>, ManagedVec<Self, ManagedBuffer<Self>>)

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: &ManagedAddress<Self>, _gas: u64, _amount: &BigUint<Self>, _source_contract_address: &ManagedAddress<Self>, _code_metadata: CodeMetadata, _arg_buffer: &ManagedArgBuffer<Self> )

source§

fn upgrade_contract( &self, _sc_address: &ManagedAddress<Self>, _gas: u64, _amount: &BigUint<Self>, _code: &ManagedBuffer<Self>, _code_metadata: CodeMetadata, _arg_buffer: &ManagedArgBuffer<Self> )

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: &ManagedAddress<Self>, _value: &BigUint<Self>, _endpoint_name: &ManagedBuffer<Self>, _arg_buffer: &ManagedArgBuffer<Self> ) -> ManagedVec<Self, ManagedBuffer<Self>>

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

fn execute_on_dest_context_raw_custom_result_range<F>( &self, _gas: u64, _to: &ManagedAddress<Self>, _value: &BigUint<Self>, _endpoint_name: &ManagedBuffer<Self>, _arg_buffer: &ManagedArgBuffer<Self>, _range_closure: F ) -> ManagedVec<Self, ManagedBuffer<Self>>
where F: FnOnce(usize, usize) -> (usize, usize),

Same shard, in-line execution of another contract. Allows the contract to specify which result range to extract as sync call result. This is a workaround to handle nested sync calls. Please do not use this method unless there is absolutely no other option. Will be eliminated after some future Arwen hook redesign. range_closure takes the number of results before, the number of results after, and is expected to return the start index (inclusive) and end index (exclusive).
source§

fn execute_on_dest_context_by_caller_raw( &self, _gas: u64, _to: &ManagedAddress<Self>, _value: &BigUint<Self>, _endpoint_name: &ManagedBuffer<Self>, _arg_buffer: &ManagedArgBuffer<Self> ) -> ManagedVec<Self, ManagedBuffer<Self>>

source§

fn execute_on_same_context_raw( &self, _gas: u64, _to: &ManagedAddress<Self>, _value: &BigUint<Self>, _endpoint_name: &ManagedBuffer<Self>, _arg_buffer: &ManagedArgBuffer<Self> ) -> ManagedVec<Self, ManagedBuffer<Self>>

source§

fn execute_on_dest_context_readonly_raw( &self, _gas: u64, _address: &ManagedAddress<Self>, _endpoint_name: &ManagedBuffer<Self>, _arg_buffer: &ManagedArgBuffer<Self> ) -> ManagedVec<Self, ManagedBuffer<Self>>

source§

fn storage_store_tx_hash_key(&self, _data: &ManagedBuffer<Self>)

Used to store data between async call and callback.
source§

fn storage_load_tx_hash_key(&self) -> ManagedBuffer<Self>

Used to store data between async call and callback.
source§

fn call_local_dct_built_in_function( &self, _gas: u64, _function_name: &ManagedBuffer<Self>, _arg_buffer: &ManagedArgBuffer<Self> ) -> ManagedVec<Self, ManagedBuffer<Self>>

Allows synchronously calling a local function by name. Execution is resumed afterwards. You should never have to call this function directly. Use the other specific methods instead.
source§

impl StorageReadApi for UncallableApi

source§

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

source§

fn storage_load_vec_u8(&self, _key: &[u8]) -> Vec<u8>

source§

fn storage_load_big_uint_raw(&self, _key: &[u8]) -> Handle

source§

fn storage_load_managed_buffer_raw(&self, _key_handle: Handle) -> Handle

source§

fn storage_load_managed_buffer_len(&self, _key_handle: Handle) -> usize

source§

fn storage_load_u64(&self, _key: &[u8]) -> u64

source§

fn storage_load_i64(&self, _key: &[u8]) -> i64

source§

fn storage_load_boxed_bytes(&self, key: &[u8]) -> BoxedBytes

source§

impl StorageWriteApi for UncallableApi

source§

fn storage_store_slice_u8(&self, _key: &[u8], _value: &[u8])

source§

fn storage_store_big_uint_raw(&self, _key: &[u8], _value_handle: Handle)

source§

fn storage_store_managed_buffer_raw( &self, _key_handle: Handle, _value_handle: Handle )

source§

fn storage_store_managed_buffer_clear(&self, _key_handle: Handle)

source§

fn storage_store_u64(&self, _key: &[u8], _value: u64)

source§

fn storage_store_i64(&self, _key: &[u8], _value: i64)

source§

impl TryStaticCast for UncallableApi

source§

fn type_eq<U>() -> bool
where U: TryStaticCast,

source§

fn try_cast<U>(self) -> Option<U>
where U: TryStaticCast,

source§

fn try_cast_ref<U>(&self) -> Option<&U>
where U: TryStaticCast,

source§

impl VMApi for UncallableApi

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> 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<M, F> ManagedFrom<M, F> for F
where M: ManagedTypeApi,

source§

fn managed_from(_: M, t: F) -> F

source§

impl<M, F, T> ManagedInto<M, T> for F
where T: ManagedFrom<M, F>, M: ManagedTypeApi,

source§

fn managed_into(self, api: M) -> T

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.