Skip to main content

Module abi

Module abi 

Source

Structs§

AbiAttribute
A single key-value attribute from a contract response.
AbiEvent
An event emitted by a contract response.
AbiResponse
CBOR-native representation of a cosmwasm execute/instantiate/external_event Response. Only carries the fields the host actually needs; skips messages and sub-messages.
AbiResultPayload
The inner payload returned by every ABI handler, CBOR-encoded inside HostAbiResponse.payload.
HostAbiError
Error object returned by the host ABI envelope.
HostAbiResponse
Top-level response envelope used by host ABI exports.

Constants§

ERR_HANDLER_PANIC
ERR_INVALID_CBOR
ERR_INVALID_POINTER
ERR_SERIALIZATION_FAILED
HOST_ABI_MANIFEST_FIELD
HOST_ABI_VERSION
HOST_ABI_WIRE_FORMAT
HOST_ABI_WIRE_FORMAT_MANIFEST_FIELD

Functions§

alloc
Allocates len bytes in wasm linear memory and returns pointer.
cbor_from_slice
Deserialize CBOR bytes into a value.
cbor_to_vec
Serialize a value to CBOR bytes.
dispatch
Reads input bytes, invokes a handler, and returns an encoded ABI response.
dispatch_response
Converts handler output (or failure) into HostAbiResponse.
encode_response
Serializes HostAbiResponse to CBOR and writes it into wasm memory.
free
Frees memory previously allocated via alloc.
pack_ptr_len
Packs (ptr, len) into a single u64 where the high 32 bits hold length.
read_memory
Reads a byte slice from wasm linear memory.
unpack_ptr_len
Unpacks a pointer/length pair produced by pack_ptr_len.
write_memory
Writes bytes into wasm linear memory and returns a packed pointer/length pair.