Struct elrond_wasm::contract_base::SendWrapper[][src]

pub struct SendWrapper<A> where
    A: SendApi + ManagedTypeApi + StorageReadApi + BlockchainApi
{ /* fields omitted */ }
Expand description

API that groups methods that either send EGLD or ESDT, or that call other contracts.

Implementations

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

Sends either EGLD, ESDT or NFT to the target address, depending on the token identifier and nonce

Performs a simple ESDT/NFT transfer, but via async call.
As with any async call, this immediately terminates the execution of the current call.
So only use as the last call in your endpoint.
If you want to perform multiple transfers, use self.send().transfer_multiple_esdt_via_async_call() instead.
Note that EGLD can NOT be transfered with this function.

Sends a synchronous call to change a smart contract address.

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.

Allows synchronous minting of ESDT/SFT (depending on nonce). Execution is resumed afterwards. Note that the SC must have the ESDTLocalMint or ESDTNftAddQuantity roles set, or this will fail with “action is not allowed” For SFTs, you must use self.send().esdt_nft_create() before adding additional quantity. This function cannot be used for NFTs.

Allows synchronous burning of ESDT/SFT/NFT (depending on nonce). Execution is resumed afterwards. Note that the SC must have the ESDTLocalBurn or ESDTNftBurn roles set, or this will fail with “action is not allowed”

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. Must have ESDTNftCreate role set, or this will fail with “action is not allowed”. Returns the nonce of the newly created NFT.

Sends thr NFTs to the buyer address and calculates and sends the required royalties to the NFT creator. Returns the payment amount left after sending royalties.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.