[][src]Module elrond_wasm::types

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. It keeps argument lengths separately from the argument data itself. Argument data is concatenated into a single byte buffer.

AsyncCallError
BorrowedMutStorage

Contains a value taken from storage and a reference to the api. The value can be changed and will be saved back to storage when the lifetime of the BorrowedMutStorage expires. Optimization: will only save back to storage if the value is referenced with deref_mut(), because only in such way can it be changed.

BoxedBytes

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

CodeMetadata

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

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
MultiResult1
MultiResult2
MultiResult3
MultiResult4
MultiResult5
MultiResult6
MultiResult7
MultiResult8
MultiResult9
MultiResult10
MultiResult11
MultiResult12
MultiResult13
MultiResult14
MultiResult15
MultiResult16
MultiResultVec

Structure that allows returning a variable number of results from a smart contract.

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.

VarArgs

Structure that allows taking a variable number of arguments in a smart contract function.

Enums

AsyncCallResult
OptionalArg

A smart contract argument that can be provided or not. If arguments stop before this argument, None will be returned.

OptionalResult
SCResult

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