Type Definition multiversx_chain_vm::DebugApi

source ·
pub type DebugApi = TxContextRef;

Implementations§

Trait Implementations§

👎Deprecated since 0.31.0: Only used for limited backwards compatibility tests. Never use! Use load_esdt_token_data instead.
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).
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).
Returns the call value token identifier of the current call. The identifier is wrapped in a TokenIdentifier object, to hide underlying logic.
Returns the nonce of the received ESDT token. Will return 0 in case of EGLD or fungible ESDT transfer.
Returns the ESDT token type. Will return “Fungible” for EGLD.
Loads all ESDT call values into a managed vec. Overwrites destination.
Note: the signature is minimum 2 bytes in length, the second byte encodes the length of the remaining signature bytes.

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.
Requests a new handle from the VM. No longer used extensively.
Requests a new handle from the VM, initialized with some data. No longer used extensively.
TODO: investigate the impact of using Result<(), ()> on the wasm output.
TODO: investigate the impact of using Result<(), ()> on the wasm output.
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Buffer used for printing only.
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 If the deployment fails, Option::None is returned
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
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
Same shard, in-line execution of another contract.
Slightly hacky way of overriding the constructor for external view contracts. Read more