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,
},
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
.
StateLoadQuadWord
Read a quad word from a storage slot. Type of load_val
must be a B256 ptr.
StateLoadWord(Value)
Read a single word from a storage slot.
StateStoreQuadWord
Write a value to a storage slot. Key must be a B256, type of stored_val
must be a
Uint(256) ptr.
StateStoreWord
Write a value to a storage slot. Key must be a B256, type of stored_val
must be a
Uint(64) value.
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