Module elrond_wasm::types
source · [−]Modules
Structs
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.
Represents metadata for calling another contract. Can transform into either an async call, transfer call or other types of calls.
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 ManagedMultiValue
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
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 ContractCall::<SA, OriginalResult>::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
Structure that allows taking a variable number of arguments, but does nothing with them, not even deserialization.
A smart contract argument or result that can be missing.
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.