Enum sway_ir::instruction::FuelVmInstruction
source · 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
Log
Logs a value along with an identifier.
ReadRegister(Register)
Reads a special register in the VM.
Revert(Value)
Revert VM execution.
Smo
- Sends a message to an output via the
smo
FuelVM instruction. The first operand must be a struct with the first field being aB256
representing the recipient. The rest of the struct is the message data being sent. - Assumes the existence of an
OutputMessage
atoutput_index
message_size
,output_index
, andcoins
must be of typeU64
.
StateClear
Clears number_of_slots
storage slots (b256
each) starting at key key
.
StateLoadQuadWord
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
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
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
impl Clone for FuelVmInstruction
source§fn clone(&self) -> FuelVmInstruction
fn clone(&self) -> FuelVmInstruction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more