List of all items

Structs

The Address type, a struct wrapper around the inner b256 value.

An AssetId is used for interacting with an asset on the network.

Stores two b256s in contiguous memory.

A type used to represent raw bytes.

The ContractId type, a struct wrapper around the inner b256 value.

A struct representing the call parameters of a function call.

A persistent storage type to store a collection of tightly packed bytes.

A persistent key-value pair mapping struct.

A persistent vector struct.

A UTF-8 encoded growable string.

The 128-bit unsigned integer type.

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

The EvmAddress type, a struct wrapper around the inner b256 value.

Enums

The error type used when an Identity cannot be determined.

The error type used when the ec_recover function fails.

The Identity type: either an Address or a ContractId.

The input type for a transaction.

A type that represents an optional value, either Some(val) or None.

The output type for a transaction.

Result is a type that represents either success (Ok) or failure (Err).

Errors pertaining to the StorageMap struct.

A transaction type.

The error type used for U128 type errors.

Traits

A common trait for the ability to explicitly duplicate an object.

Used to do value-to-value conversions.

Used to do value-to-value conversions.

Used to attempt to do value-to-value conversions.

Calculates the binary log.

Trait for exponential functions.

Calculates the log with a given base.

Calculates a number to a given power.

Calculates the square root.

A general way to persistently store heap types.

Constants

The default Sub Id for assets.

A b256 of zero value.

A u256 of zero value.

A revert with this value signals that it was caused by a failing call to std::assert::assert_eq.

A revert with this value signals that it was caused by a failing call to std::assert::assert_ne.

A revert with this value signals that it was caused by a failing call to std::assert::assert.

A revert with this value signals that it was caused by a failing call to std::revert::require.

A revert with this value signals that it was caused by a failing call to std::asset::transfer_to_address.

Functions

Allocates zeroed memory on the heap.

Allocates zeroed memory on the heap in individual bytes.

Reallocates the given area of memory.

Reallocates the given area of memory in individual bytes.

Asserts that the given condition will always be true during runtime.

Asserts that the given values v1 & v2 will always be equal during runtime.

Asserts that the given values v1 & v2 will never be equal during runtime.

Burn amount coins of the current contract’s sub_id. This function burns them from the balance of the current contract.

Mint amount coins of the current contract’s sub_id. The newly minted assets are owned by the current contract.

Mint amount coins of the current contract’s asset_id and transfer them to to by calling transfer().

Transfer amount coins of the type asset_id and send them to to.

Get the owner of the inputs (of type Input::Coin or Input::Message) to a

If the caller is internal, returns the contract ID of the caller.

Returns true if the caller is external (i.e. a script).

Get the Identity (i.e. Address or ContractId) from which a call was made.

Get the current predicate’s address when called in an internal context.

Get the header hash of the block at height block_height

Get the current block height.

Get the TAI64 timestamp of the current block.

Get the TAI64 timestamp of a block at a given block_height.

Get the called arguments from the current call frame.

Get the called method name from the current call frame.

Get the code size in bytes (padded to word alignment) from the current call frame.

Get the first parameter from the current call frame.

Get the value of ContractId from any call frame on the stack.

Get a pointer to the previous (relative to the frame_pointer parameter) call frame using offsets from a pointer.

Get the asset_id of coins being sent from the current call frame.

Get the second parameter from the current call frame.

Get the balance of coin asset_id for the contract at ‘target’.

Get the amount of units of call_frames::msg_asset_id() being sent.

Get the balance of coin asset_id for the current contract.

Recover the public key derived from the private key used to sign a message.

Recover the address derived from the private key used to sign a message.

Recover the address derived from the private key used to sign a message.

Recover the public key derived from the private key used to sign a message.

Verifies that a public key derived from the private key was used to sign a message.

Get the root of the bytecode of the contract at ‘contract_id’.

Allows overflowing operations to occur without a FuelVM panic.

Allows unsafe math operations to occur without a FuelVM panic.

Enables the default panic-on-overflow behavior in the FuelVM.

Enables the default panic-on-unsafe-math behavior in the FuelVM.

Sets the flag register to the given value.

Returns the KECCAK-256 hash of param.

Returns the SHA-2-256 hash of param.

Returns the SHA-2-256 hash of param.

Gets amount field from input at index.

Gets the AssetId of the input at index.

Gets owner field from input at index if it’s a coin.

Gets the transaction inputs count.

Gets the data of the input message at index.

Gets the length of the input message at index.

Gets the nonce of input message at index.

Gets the recipient of the input message at index.

Gets the sender of the input message at index.

Gets the pointer of the input at index.

Gets the predicate from the input at index.

Gets the predicate data from the input at index.

Gets the predicate data length from the input at index.

Gets the predicate data pointer from the input at index.

Gets the predicate length from the input at index.

Gets the predicate pointer from the input at index.

Gets the type of the input at index.

Gets the witness index from the input at index.

Returns whether a generic type T is a reference type or not.

Returns the size of a generic type T in bytes.

Returns the size of the type of a value in bytes.

Log any stack type.

Call a target contract with a function selector and calldata, provided as Bytes.

Sends a message msg_data to recipient with a coins amount of the base asset.

Sends a message msg_data of type T to recipient with a coins amount of the base asset.

The amount of coins to send to the output at index.

Gets the AssetId of the output if it is a Output::Coin.

Returns the receiver of the output if it is a Output::Coin. Represents the receiver as a b256.

Get the transaction outputs count for either tx_type

Get a pointer to the output at index

Get the type of an output at index.

Get the amount of units of call_frames::msg_asset_id() being sent.

Remaining gas in the context.

Error codes for particular operations.

Flags register.

Memory address of beginning of current call frame.

Remaining gas globally.

Memory address below the current bottom of the heap (points to free memory).

Pointer to the start of the currently-executing code.

Contains overflow & underflow of addition, subtraction, and multiplication.

The program counter. Memory address of the current instruction.

Return value length in bytes.

Return value or pointer.

Memory address on top of current writable stack area (points to free memory).

Memory address of bottom of current writable stack area.

Checks if the given condition is true and if not, logs value and reverts.

Will either panic or revert with a given number depending on the context.

Clear a sequence of storage slots starting at a some key.

Load a raw_slice from storage.

Store a raw_slice from the heap into storage.

Clear a value starting at some slot with an offset.

Reads a value of type T starting at the location specified by slot and offset. If the

Stores a stack value in storage. Will not work for heap values.

Get the script gas limit for the transaction.

Get the Transaction ID of the current transaction.

Get the maturity for the transaction, if it is set.

Get the max fee for the transaction, if it is set.

Get the script bytecode.

Get the hash of the script bytecode.
Reverts if not a transaction-script.

Get the script data, typed.

Get the script data length for the transaction.

Get the transaction script data start pointer.

Get the length of the script for the transaction.

Get the transaction script start pointer.

Get the tip for the transaction, if it is set.

Get the type of the current transaction.

Get the witness data at index.

Get the length of the witness data at index.

Get the witness limit for the transaction, if it is set.

Get a pointer to the witness at index index for the transaction.

Get the transaction witnesses count for the transaction.

Recover the EVM address derived from the private key used to sign a message.