Module elrond_wasm::types

source ·

Modules

Structs

Will be renamed to AsyncCall and AsyncCall to AsyncCallLegacy when the promises end up on the mainnet.
Object that encodes full async callback data.
Similar object to CallbackClosure, but only used for deserializing from storage the callback data with the old async call mechanism.
Helps the callback macro expansion to perform callback name matching more efficiently. The current implementation hashes by callback name length, but in principle further optimizations are possible.
Holds metadata for calling another contract, without payments.
Holds data for calling another contract, with EGLD payment only.
Holds data for calling another contract, with a single payment, either EGLD or a single ESDT token.
Specialized type for handling either EGLD or ESDT token identifiers.
Thin wrapper around EsdtTokenPayment, which has different I/O behaviour:
A byte buffer managed by an external API.
Nested decode buffer based on a managed buffer. Uses the load/copy slice API to extract pieces of the managed buffer for deserialization.
A list of items that lives inside a managed buffer. Items can be either stored there in full (e.g. u32), or just via handle (e.g. BigUint<M>).
A very efficient optional managed type.
A very efficient reference to a managed type, with copy semantics.
Smart contract error that can concatenate multiple message pieces. The message is kept as a managed buffer in the VM.
A list of items that lives inside a managed buffer. Items can be either stored there in full (e.g. u32), or just via handle (e.g. BigUint<M>).
A multi-value container, that keeps raw values as ManagedBuffer It allows encoding and decoding of multi-values.
Argument or result that is made up of the argument count, followed by the arguments themselves. Think of it as a VarArgs preceded by the count. Unlike MultiValueManagedVec it deserializes eagerly.
A special type of array that initially holds the values from 0 to N If array[i] == i, then the default value (0) is stored instead
Contains a smart contract execution error message.
Specialized type for handling token identifiers. It wraps a BoxedBytes with the full ASCII name of the token. EGLD is stored as an empty name.

Enums

Used internally between the callback and callback_selector methods. It is likely to be removed in the future.
Message hash type for the verifyCustomSecp256k1 CryptoApi function
Standard way of signalling that an operation was interrupted early, before running out of gas. An endpoint that performs a longer operation can check from time to time if it is running low on gas and can decide to save its state and exit, so that it can continue the same operation later.
Default way to optionally return an error from a smart contract endpoint.

Traits

Defines a contract call object, which is the basis for all calls to other contracts.
Commonalities between all managed types.
Types that implement this trait can be items inside a ManagedVec. All these types need a payload, i.e a representation that gets stored in the underlying managed buffer. Not all data needs to be stored as payload, for instance for most managed types the payload is just the handle, whereas the mai ndata is kept by the VM.
Any type that implements this trait can be used to signal errors when returning from a SC endpoint.

Functions

Syntactical sugar to help macros to generate code easier. Unlike calling CallbackClosure::<SA, R>::new, here types can be inferred from the context.
Syntactical sugar to help macros to generate code easier. Unlike calling ContractDeploy::<SA>::new, here types can be inferred from the context.

Type Definitions

IgnoreVarArgsDeprecated
Structure that allows taking a variable number of arguments, but does nothing with them, not even deserialization.
ManagedVarArgsDeprecated
MultiArg2Deprecated
MultiArg3Deprecated
MultiArg4Deprecated
MultiArg5Deprecated
MultiArg6Deprecated
MultiArg7Deprecated
MultiArg8Deprecated
MultiArg9Deprecated
MultiArg10Deprecated
MultiArg11Deprecated
MultiArg12Deprecated
MultiArg13Deprecated
MultiArg14Deprecated
MultiArg15Deprecated
MultiArg16Deprecated
MultiResult2Deprecated
MultiResult3Deprecated
MultiResult4Deprecated
MultiResult5Deprecated
MultiResult6Deprecated
MultiResult7Deprecated
MultiResult8Deprecated
MultiResult9Deprecated
MultiResult10Deprecated
MultiResult11Deprecated
MultiResult12Deprecated
MultiResult13Deprecated
MultiResult14Deprecated
MultiResult15Deprecated
MultiResult16Deprecated
OptionalArgDeprecated
A smart contract argument or result that can be missing.
OptionalResultDeprecated
It is just an alias for OptionalArg. In general we use OptionalArg for arguments and OptionalResult for results, but it is the same implementation for both.