Library std


A wrapper around the b256 type to help enhance type-safety.

A library for allocating memory inspired by Rust’s std::alloc.

Functions to assert a given condition.

Functionality for performing common operations with assets.

Functionality for determining who is calling a contract.

A wrapper around two b256 types to support the usage of 64-byte values in Sway,

Functionality for accessing block-related data.

The Bytes type is used when a collection of tightly-packed arbitrary bytes is needed.

Helper functions for accessing data from call frames.

Base asset and zero address constants.

Functionality for accessing context-specific information about the current contract or message.

A wrapper around the b256 type to help enhance type-safety.

Traits for conversions between types.

Helper functions to verify signatures.

Values which signify special types of errors when passed to std::revert::revert.

Functions to work with external contracts.

Functionality for setting and unsetting FuelVM flags to modify behavior related to the $err and $of registers.

Utility functions for cryptographic hashing.

A wrapper type with two variants, Address and ContractId.

Getters for fields on transaction inputs.

Exposes compiler intrinsics as stdlib wrapper functions.

Allows logging of arbitrary stack types, emitted as either Log or Logd receipts.

Utilities to help with low level calls.

Utilities for common math operations.

Helper functions to sign and send messages.

A type for optional values.

Getters for fields on transaction outputs.

Functions to expose 14 of the reserved FuelVM registers for ease of use.

Error handling with the Result type.

Functions to panic or revert with a given error code.

Contract storage utilities.

Transaction field getters.

A 128-bit unsigned integer type.

A vector type for dynamically sized arrays outside of storage.

VM-specific utilities.