From d399d581ca8a035df4f6845cf4f4c0a585338a75 Mon Sep 17 00:00:00 2001 From: rymnc <43716372+rymnc@users.noreply.github.com> Date: Mon, 2 Dec 2024 17:59:50 +0530 Subject: [PATCH] test(bal): use movi instead? --- fuel-zkvm-primitives-utils/src/vm/contract.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fuel-zkvm-primitives-utils/src/vm/contract.rs b/fuel-zkvm-primitives-utils/src/vm/contract.rs index 2db9ec6..1af2f26 100644 --- a/fuel-zkvm-primitives-utils/src/vm/contract.rs +++ b/fuel-zkvm-primitives-utils/src/vm/contract.rs @@ -1,7 +1,6 @@ use crate::vm::base::AsRepr; -use fuel_core_types::fuel_asm::{op, GTFArgs, Instruction, RegId}; +use fuel_core_types::fuel_asm::{op, Instruction, RegId}; use fuel_core_types::fuel_tx::Word; -use fuel_core_types::fuel_types::bytes::WORD_SIZE; use fuel_core_types::fuel_types::Bytes32; use fuels::prelude::AssetId; use fuels::prelude::ContractId; @@ -172,10 +171,9 @@ impl ContractInstruction { } fn bal() -> Vec { - let word_size = WORD_SIZE.try_into().unwrap(); vec![ - op::gtf_args(0x11, 0x00, GTFArgs::ScriptData), - op::addi(0x12, 0x11, word_size), + op::movi(0x11, 0), + op::addi(0x12, 0x11, AssetId::LEN.try_into().unwrap()), op::bal(0x10, 0x12, 0x11), op::jmpb(RegId::ZERO, 0), ]