Struct elrond_wasm::api::uncallable::UncallableApi [−][src]
pub struct UncallableApi;
Expand description
Dummy type with no implementation. Provides context in ABI generators.
Trait Implementations
fn get_block_random_seed_legacy(&self) -> Box<[u8; 48]>ⓘ
fn get_prev_block_random_seed_legacy(&self) -> Box<[u8; 48]>ⓘ
fn get_current_esdt_nft_nonce(
&self,
_address: &ManagedAddress<Self>,
_token: &TokenIdentifier<Self>
) -> u64
fn get_esdt_balance(
&self,
_address: &ManagedAddress<Self>,
_token: &TokenIdentifier<Self>,
_nonce: u64
) -> BigUint<Self>
fn get_esdt_token_data(
&self,
_address: &ManagedAddress<Self>,
_token: &TokenIdentifier<Self>,
_nonce: u64
) -> EsdtTokenData<Self>
Retrieves local roles for the token, by reading protected storage. TODO: rewrite using managed types Read more
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). Read more
Retrieves the ESDT call value from the VM. Will return 0 in case of an EGLD transfer (cannot have both EGLD and ESDT transfer simultaneously). Read more
Returns the call value token identifier of the current call. The identifier is wrapped in a TokenIdentifier object, to hide underlying logic. Read more
Returns the nonce of the received ESDT token. Will return 0 in case of EGLD or fungible ESDT transfer. Read more
Returns the ESDT token type. Will return “Fungible” for EGLD. Read more
Will return the EGLD call value, but also fail with an error if ESDT is sent. Especially used in the auto-generated call value processing. Read more
Will return the ESDT call value, but also fail with an error if EGLD or the wrong ESDT token is sent. Especially used in the auto-generated call value processing. Read more
Returns both the call value (either EGLD or ESDT) 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. Read more
Note: the signature is minimum 2 bytes in length, the second byte encodes the length of the remaining signature bytes. Read more
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
)
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
)
fn ec_double(
&self,
_x_result_handle: Handle,
_y_result_handle: Handle,
_ec_handle: Handle,
_x_point_handle: Handle,
_y_point_handle: Handle
)
fn ec_is_on_curve(
&self,
_ec_handle: Handle,
_x_point_handle: Handle,
_y_point_handle: Handle
) -> bool
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]
)
fn ec_scalar_base_mult(
&self,
_x_result_handle: Handle,
_y_result_handle: Handle,
_ec_handle: Handle,
_data: &[u8]
)
fn ec_marshal(
&self,
_ec_handle: Handle,
_x_pair_handle: Handle,
_y_pair_handle: Handle
) -> BoxedBytes
fn ec_marshal_compressed(
&self,
_ec_handle: Handle,
_x_pair_handle: Handle,
_y_pair_handle: Handle
) -> BoxedBytes
fn ec_unmarshal(
&self,
_x_result_handle: Handle,
_y_result_handle: Handle,
_ec_handle: Handle,
_data: &[u8]
)
fn ec_unmarshal_compressed(
&self,
_x_result_handle: Handle,
_y_result_handle: Handle,
_ec_handle: Handle,
_data: &[u8]
)
fn ec_generate_key(
&self,
_x_pub_key_handle: Handle,
_y_pub_key_handle: Handle,
_ec_handle: Handle
) -> BoxedBytes
The legacy Arwen hook for saving event logs. It does the same, but only accepts 32-byte topics. Only kept for backwards compatibility. Read more
fn mb_load_slice(
&self,
_source_handle: Handle,
_starting_position: usize,
_dest_slice: &mut [u8]
) -> Result<(), InvalidSliceError>
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.
fn mb_copy_slice(
&self,
_source_handle: Handle,
_starting_pos: usize,
_slice_len: usize,
_dest_handle: Handle
) -> Result<(), InvalidSliceError>
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.
fn mb_set_slice(
&self,
_dest_handle: Handle,
_starting_position: usize,
_source_slice: &[u8]
) -> Result<(), InvalidSliceError>
fn direct_egld<D>(
&self,
_to: &ManagedAddress<Self>,
_amount: &BigUint<Self>,
_data: D
) where
D: Into<ManagedBuffer<Self>>,
fn direct_egld<D>(
&self,
_to: &ManagedAddress<Self>,
_amount: &BigUint<Self>,
_data: D
) where
D: Into<ManagedBuffer<Self>>,
Sends EGLD to a given address, directly. Used especially for sending EGLD to regular accounts. Read more
fn direct_egld_execute(
&self,
_to: &ManagedAddress<Self>,
_amount: &BigUint<Self>,
_gas_limit: u64,
_endpoint_name: &ManagedBuffer<Self>,
_arg_buffer: &ManagedArgBuffer<Self>
) -> Result<(), &'static [u8]>
fn direct_egld_execute(
&self,
_to: &ManagedAddress<Self>,
_amount: &BigUint<Self>,
_gas_limit: u64,
_endpoint_name: &ManagedBuffer<Self>,
_arg_buffer: &ManagedArgBuffer<Self>
) -> Result<(), &'static [u8]>
Sends EGLD to an address (optionally) and executes like an async call, but without callback.
fn direct_esdt_execute(
&self,
_to: &ManagedAddress<Self>,
_token: &TokenIdentifier<Self>,
_amount: &BigUint<Self>,
_gas: u64,
_endpoint_name: &ManagedBuffer<Self>,
_arg_buffer: &ManagedArgBuffer<Self>
) -> Result<(), &'static [u8]>
fn direct_esdt_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 ESDT to an address and executes like an async call, but without callback.
fn direct_esdt_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]>
fn direct_esdt_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 ESDT NFT to an address and executes like an async call, but without callback.
fn direct_multi_esdt_transfer_execute(
&self,
_to: &ManagedAddress<Self>,
_payments: &ManagedVec<Self, EsdtTokenPayment<Self>>,
_gas_limit: u64,
_endpoint_name: &ManagedBuffer<Self>,
_arg_buffer: &ManagedArgBuffer<Self>
) -> Result<(), &'static [u8]>
fn async_call_raw(
&self,
_to: &ManagedAddress<Self>,
_amount: &BigUint<Self>,
_endpoint_name: &ManagedBuffer<Self>,
_arg_buffer: &ManagedArgBuffer<Self>
) -> !
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
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>>)
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 Read more
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>>)
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 Read more
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>
)
fn upgrade_contract(
&self,
_sc_address: &ManagedAddress<Self>,
_gas: u64,
_amount: &BigUint<Self>,
_code: &ManagedBuffer<Self>,
_code_metadata: CodeMetadata,
_arg_buffer: &ManagedArgBuffer<Self>
)
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 Read more
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>>
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.
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),
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). Read more
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>>
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>>
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>>
Used to store data between async call and callback.
Used to store data between async call and callback.
fn call_local_esdt_built_in_function(
&self,
_gas: u64,
_function_name: &ManagedBuffer<Self>,
_arg_buffer: &ManagedArgBuffer<Self>
) -> ManagedVec<Self, ManagedBuffer<Self>>
fn call_local_esdt_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. Read more
fn with_lockable_static_buffer<R, F: FnOnce(&mut LockableStaticBuffer) -> R>(
&self,
_f: F
) -> R
Auto Trait Implementations
impl RefUnwindSafe for UncallableApi
impl Send for UncallableApi
impl Sync for UncallableApi
impl Unpin for UncallableApi
impl UnwindSafe for UncallableApi
Blanket Implementations
Mutably borrows from an owned value. Read more