Struct elrond_wasm::api::uncallable::UncallableApi[][src]

pub struct UncallableApi;
Expand description

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

Trait Implementations

impl Clone for UncallableApi[src]

fn clone(&self) -> UncallableApi[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl ErrorApi for UncallableApi[src]

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

impl SendApi for UncallableApi[src]

type AmountType = BigUintUncallable

The type of the payment arguments. Not named BigUint to avoid name collisions in types that implement multiple API traits. Read more

type ProxyBigInt = BigIntUncallable

Not used by SendApi, but forwarded to the proxy traits.

type ProxyStorage = Self

Not used by SendApi, but forwarded to the proxy traits.

fn get_sc_address(&self) -> Address[src]

Required for ESDTNFTTransfer. Same as the implementation from BlockchainApi. Read more

fn direct_egld(&self, _to: &Address, _amount: &BigUintUncallable, _data: &[u8])[src]

Sends EGLD to a given address, directly. Used especially for sending EGLD to regular accounts. Read more

fn direct_egld_execute(
    &self,
    _to: &Address,
    _amount: &BigUintUncallable,
    _gas_limit: u64,
    _function: &[u8],
    _arg_buffer: &ArgBuffer
) -> Result<(), &'static [u8]>
[src]

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

fn direct_esdt_execute(
    &self,
    _to: &Address,
    _token: &[u8],
    _amount: &BigUintUncallable,
    _gas: u64,
    _function: &[u8],
    _arg_buffer: &ArgBuffer
) -> Result<(), &'static [u8]>
[src]

Sends ESDT to an address and executes like an async call, but without callback.

fn direct_esdt_nft_execute(
    &self,
    _to: &Address,
    _token: &[u8],
    _nonce: u64,
    _amount: &BigUintUncallable,
    _gas_limit: u64,
    _function: &[u8],
    _arg_buffer: &ArgBuffer
) -> Result<(), &'static [u8]>
[src]

Sends ESDT NFT to an address and executes like an async call, but without callback.

fn async_call_raw(
    &self,
    _to: &Address,
    _amount: &BigUintUncallable,
    _data: &[u8]
) -> !
[src]

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: &BigUintUncallable,
    _code: &BoxedBytes,
    _code_metadata: CodeMetadata,
    _arg_buffer: &ArgBuffer
) -> Address
[src]

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 Read more

fn execute_on_dest_context_raw(
    &self,
    _gas: u64,
    _address: &Address,
    _value: &BigUintUncallable,
    _function: &[u8],
    _arg_buffer: &ArgBuffer
) -> Vec<BoxedBytes>
[src]

Same shard, in-line execution of another contract.

fn execute_on_dest_context_raw_custom_result_range<F>(
    &self,
    _gas: u64,
    _address: &Address,
    _value: &BigUintUncallable,
    _function: &[u8],
    _arg_buffer: &ArgBuffer,
    _range_closure: F
) -> Vec<BoxedBytes> where
    F: FnOnce(usize, usize) -> (usize, usize), 
[src]

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,
    _address: &Address,
    _value: &BigUintUncallable,
    _function: &[u8],
    _arg_buffer: &ArgBuffer
) -> Vec<BoxedBytes>
[src]

fn execute_on_same_context_raw(
    &self,
    _gas: u64,
    _address: &Address,
    _value: &BigUintUncallable,
    _function: &[u8],
    _arg_buffer: &ArgBuffer
)
[src]

fn storage_store_tx_hash_key(&self, _data: &[u8])[src]

Used to store data between async call and callback.

fn storage_load_tx_hash_key(&self) -> BoxedBytes[src]

Used to store data between async call and callback.

fn call_local_esdt_built_in_function(
    &self,
    _gas: u64,
    _function: &[u8],
    _arg_buffer: &ArgBuffer
)
[src]

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 direct_esdt_via_transf_exec(
    &self,
    to: &Address,
    token: &[u8],
    amount: &Self::AmountType,
    data: &[u8]
) -> Result<(), &'static [u8]>
[src]

Sends an ESDT token to a given address, directly. Used especially for sending ESDT to regular accounts. Read more

fn direct(
    &self,
    to: &Address,
    token: &TokenIdentifier,
    amount: &Self::AmountType,
    data: &[u8]
)
[src]

Sends either EGLD or an ESDT token to the target address, depending on what token identifier was specified. Read more

fn transfer_tokens(
    &self,
    token: &TokenIdentifier,
    nonce: u64,
    amount: &Self::AmountType,
    to: &Address
)
[src]

Sends ESDT tokens to the target address. Handles any type of ESDT. Note: this does not work with EGLD, use only with ESDT. Read more

fn direct_esdt_via_async_call(
    &self,
    to: &Address,
    esdt_token_name: &[u8],
    amount: &Self::AmountType,
    data: &[u8]
) -> !
[src]

Performs a simple ESDT transfer, but via async call. This is the preferred way to send ESDT. Read more

fn direct_via_async_call(
    &self,
    to: &Address,
    token: &TokenIdentifier,
    amount: &Self::AmountType,
    data: &[u8]
)
[src]

Sends either EGLD or an ESDT token to the target address, depending on what token identifier was specified. In case of ESDT it performs an async call. Read more

fn async_call(&self, async_call: AsyncCall<Self>) -> ![src]

Sends an asynchronous call to another contract, with either EGLD or ESDT value. The token argument decides which one it will be. Calling this method immediately terminates tx execution. Read more

fn esdt_local_mint(&self, gas: u64, token: &[u8], amount: &Self::AmountType)[src]

Allows synchronous minting of ESDT tokens. Execution is resumed afterwards.

fn esdt_local_burn(&self, gas: u64, token: &[u8], amount: &Self::AmountType)[src]

Allows synchronous burning of ESDT tokens. Execution is resumed afterwards.

fn esdt_nft_create<T: TopEncode>(
    &self,
    gas: u64,
    token: &[u8],
    amount: &Self::AmountType,
    name: &BoxedBytes,
    royalties: &Self::AmountType,
    hash: &BoxedBytes,
    attributes: &T,
    uris: &[BoxedBytes]
)
[src]

Creates a new NFT token of a certain type (determined by token_identifier).
attributes can be any serializable custom struct.
This is a built-in function, so the smart contract execution is resumed after. Read more

fn esdt_nft_add_quantity(
    &self,
    gas: u64,
    token: &[u8],
    nonce: u64,
    amount: &Self::AmountType
)
[src]

Adds quantity for an Non-Fungible Token. (which makes it a Semi-Fungible Token by definition)
This is a built-in function, so the smart contract execution is resumed after. Read more

fn esdt_nft_burn(
    &self,
    gas: u64,
    token: &[u8],
    nonce: u64,
    amount: &Self::AmountType
)
[src]

The reverse operation of esdt_nft_add_quantity, this locally decreases This is a built-in function, so the smart contract execution is resumed after. Read more

fn burn_tokens(
    &self,
    token: &TokenIdentifier,
    nonce: u64,
    amount: &Self::AmountType,
    gas: u64
)
[src]

Burns ESDT tokens. Handles any type of ESDT. Note: this does not work with EGLD, use only with ESDT. Read more

fn direct_esdt_nft_via_async_call(
    &self,
    from: &Address,
    to: &Address,
    token: &[u8],
    nonce: u64,
    amount: &Self::AmountType,
    data: &[u8]
)
[src]

Performs a simple ESDT NFT transfer, but via async call. This is the preferred way to send ESDT. Note: call is done to the SC itself, so from should be the SCs own address Read more

fn direct_esdt_nft_via_transfer_exec(
    &self,
    to: &Address,
    token: &[u8],
    nonce: u64,
    amount: &Self::AmountType,
    data: &[u8]
) -> Result<(), &'static [u8]>
[src]

Sends an ESDT NFT to a given address, directly. Used especially for sending ESDT to regular accounts. Read more

impl StorageReadApi for UncallableApi[src]

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

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

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

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

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

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

impl StorageWriteApi for UncallableApi[src]

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

fn storage_store_big_uint_raw(&self, _key: &[u8], _handle: i32)[src]

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

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

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.