Module elrond_wasm::types[][src]

Structs

Address

An Address is just a H256 with a different name. Has a different ABI name than H256.

ArgBuffer

Helper structure for providing arguments to all SC call functions other than async_call_raw. It keeps argument lengths separately from the argument data itself. Argument data is concatenated into a single byte buffer.

AsyncCall
AsyncCallError
Box

A pointer type for heap allocation.

BoxedBytes

Simple wrapper around a boxed byte slice, but with a lot of optimized methods for manipulating it. The focus is on reducing code size rather improving speed.

CallbackCall
CodeMetadata

Flags concerning smart contract creation and upgrade. Currently always represented as a 2-byte bitfield.

ContractCall

Represents metadata for calling another contract. Can transform into either an async call, transfer call or other types of calls.

EsdtTokenData
H256

Type that holds 32 bytes of data. Data is kept on the heap to keep wasm size low and avoid copies.

MultiArg2
MultiArg3
MultiArg4
MultiArg5
MultiArg6
MultiArg7
MultiArg8
MultiArg9
MultiArg10
MultiArg11
MultiArg12
MultiArg13
MultiArg14
MultiArg15
MultiArg16
MultiArgVec

Structure that allows taking a variable number of arguments or returning a variable number of results in a smart contract endpoint.

Queue

A simple queue struct that is able to push and pop without moving elements. New items are pushed at the end, just like for a regular Vec. When popping, instead of performing a regular Vec remove that would shift items, a start index is moved up 1 position. When serializing, items before the start index are ignored.

SCError

Contains a smart contract execution error message.

SendEgld
SendEsdt
SendToken
TokenIdentifier

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.

TransferEgldExecute
TransferEsdtExecute
TransferExecute
Vec

A contiguous growable array type, written as Vec<T> and pronounced ‘vector’.

Enums

AsyncCallResult
EsdtLocalRole
EsdtTokenType
OperationCompletionStatus

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.

OptionalArg

A smart contract argument or result that can be missing.

SCResult

Default way to optionally return an error from a smart contract endpoint.

Traits

ContractProxy

Functions

new_contract_call

Type Definitions

MultiResult2
MultiResult3
MultiResult4
MultiResult5
MultiResult6
MultiResult7
MultiResult8
MultiResult9
MultiResult10
MultiResult11
MultiResult12
MultiResult13
MultiResult14
MultiResult15
MultiResult16
MultiResultVec

Used for returning a variable number of results from an endpoint, it is synonymous with MultiResult.

OptionalResult

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.

VarArgs

Used for taking a variable number of arguments in an endpoint, it is synonymous with MultiResultVec/MultiArgVec.