Struct elrond_wasm_node::ArwenApiImpl[][src]

pub struct ArwenApiImpl {}
Expand description

The reference to the API implementation based on Arwen hooks. It continas no data, can be embedded at no cost. Cloning it is a no-op.

Trait Implementations

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

Retrieves validator rewards, as set by the protocol. TODO: move to the storage API, once BigUint gets refactored Read more

Retrieves local roles for the token, by reading protected storage.

The type of the payment arguments. Not named BigUint to avoid name collisions in types that implement multiple API traits. 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

Should be no-op. The API implementation is zero-sized.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Abstracts the lower-level storage functionality.

Abstracts the call value handling at the beginning of a function call.

Abstracts the sending of EGLD & ESDT transactions, as well as async calls.

Gateway into the lower-level storage functionality. Storage related annotations make use of this. Using it directly is not recommended. Read more

Gateway into the call value retrieval functionality. The payment annotations should normally be the ones to handle this, but the developer is also given direct access to the API. Read more

Gateway to the functionality related to sending transactions from the current contract.

Gateway blockchain info related to the current transaction and to accounts.

Stateless crypto functions provided by the Arwen VM.

Gateway into the lower-level event log functionality. Gets called in auto-generated Using it directly is not recommended. TODO: consider moving to ContractPrivateApi. Read more

Currently for some auto-generated code involving callbacks. Please avoid using it directly. TODO: find a way to hide this API. Read more

Note: the signature is minimum 2 bytes in length, the second byte encodes the length of the remaining signature bytes. Read more

Interface to only be used by code generated by the macros. The smart contract code doesn’t have access to these methods directly.

Interface to only be used by code generated by the macros. The smart contract code doesn’t have access to these methods directly.

Interface to only be used by code generated by the macros. The smart contract code doesn’t have access to these methods directly.

Saves an event log.

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

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

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

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

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

To be used internally by the SendApi implementation. Do not use directly from contracts. It might be removed from this trait at some point or reworked. Read more

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

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

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

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

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

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

Same shard, in-line execution of another contract.

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

Used to store data between async call and callback.

Used to store data between async call and callback.

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

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

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

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

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

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

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

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

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

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

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 resulting type after obtaining ownership.

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

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

recently added

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

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.