pub enum FuelVmInstruction {
    GetStorageKey,
    Gtf {
        index: Value,
        tx_field_id: u64,
    },
    Log {
        log_val: Value,
        log_ty: Type,
        log_id: Value,
    },
    ReadRegister(Register),
    Revert(Value),
    Smo {
        recipient_and_message: Value,
        message_size: Value,
        output_index: Value,
        coins: Value,
    },
    StateClear {
        key: Value,
        number_of_slots: Value,
    },
    StateLoadQuadWord {
        load_val: Value,
        key: Value,
        number_of_slots: Value,
    },
    StateLoadWord(Value),
    StateStoreQuadWord {
        stored_val: Value,
        key: Value,
        number_of_slots: Value,
    },
    StateStoreWord {
        stored_val: Value,
        key: Value,
    },
}

Variants§

§

GetStorageKey

Generate a unique integer value

§

Gtf

Fields

§index: Value
§tx_field_id: u64
§

Log

Fields

§log_val: Value
§log_ty: Type
§log_id: Value

Logs a value along with an identifier.

§

ReadRegister(Register)

Reads a special register in the VM.

§

Revert(Value)

Revert VM execution.

§

Smo

Fields

§recipient_and_message: Value
§message_size: Value
§output_index: Value
§coins: Value
  • Sends a message to an output via the smo FuelVM instruction. The first operand must be a struct with the first field being a B256 representing the recipient. The rest of the struct is the message data being sent.
  • Assumes the existence of an OutputMessage at output_index
  • message_size, output_index, and coins must be of type U64.
§

StateClear

Fields

§key: Value
§number_of_slots: Value

Clears number_of_slots storage slots (b256 each) starting at key key.

§

StateLoadQuadWord

Fields

§load_val: Value
§key: Value
§number_of_slots: Value

Reads number_of_slots slots (b256 each) from storage starting at key key and stores them in memory starting at address load_val.

§

StateLoadWord(Value)

Reads and returns single word from a storage slot.

§

StateStoreQuadWord

Fields

§stored_val: Value
§key: Value
§number_of_slots: Value

Stores number_of_slots slots (b256 each) starting at address stored_val in memory into storage starting at key key. key must be a b256.

§

StateStoreWord

Fields

§stored_val: Value
§key: Value

Writes a single word to a storage slot. key must be a b256 and the type of stored_val must be a u64.

Trait Implementations§

source§

impl Clone for FuelVmInstruction

source§

fn clone(&self) -> FuelVmInstruction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FuelVmInstruction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl DebugWithContext for FuelVmInstruction

source§

fn fmt_with_context<'a, 'c>( &'a self, formatter: &mut Formatter<'_>, context: &'c Context ) -> Result

source§

fn with_context<'a, 'c>( &'a self, context: &'c Context ) -> WithContext<'a, 'c, Self>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Downcast for Twhere T: Any,

source§

fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
source§

impl<T> DowncastSync for Twhere T: Any + Send + Sync,

source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send + 'static>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> StorageAsMut for T

§

fn storage<Type>(&mut self) -> StorageMut<'_, Self, Type>where Type: Mappable,

§

fn storage_as_mut<Type>(&mut self) -> StorageMut<'_, Self, Type>where Type: Mappable,

§

impl<T> StorageAsRef for T

§

fn storage<Type>(&self) -> StorageRef<'_, Self, Type>where Type: Mappable,

§

fn storage_as_ref<Type>(&self) -> StorageRef<'_, Self, Type>where Type: Mappable,

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V