diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba4658a0337..44a14bc836b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -314,6 +314,24 @@ jobs: - name: Cargo Run E2E Tests (Fuel VM) run: cargo run --locked --release --bin test -- --locked + cargo-run-e2e-test-release: + runs-on: ubuntu-latest + needs: get-fuel-core-version + services: + fuel-core: + image: ghcr.io/fuellabs/fuel-core:v${{ needs.get-fuel-core-version.outputs.fuel_core_version }} + ports: + - 4000:4000 + steps: + - uses: actions/checkout@v3 + - name: Install toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.RUST_VERSION }} + - uses: Swatinem/rust-cache@v2 + - name: Cargo Run E2E Tests (Fuel VM) + run: cargo run --locked --release --bin test -- --locked --release + cargo-run-e2e-test-evm: runs-on: ubuntu-latest steps: @@ -349,7 +367,7 @@ jobs: toolchain: ${{ env.RUST_VERSION }} - uses: Swatinem/rust-cache@v2 - name: Build All Tests - run: cargo run --locked -p forc -- build --locked --path ./test/src/sdk-harness + run: cargo run --locked --release -p forc -- build --release --locked --path ./test/src/sdk-harness - name: Cargo Test sway-lib-std run: cargo test --locked --release --manifest-path ./test/src/sdk-harness/Cargo.toml -- --nocapture diff --git a/forc-pkg/src/manifest.rs b/forc-pkg/src/manifest.rs index 27ff28369b2..255b8e57286 100644 --- a/forc-pkg/src/manifest.rs +++ b/forc-pkg/src/manifest.rs @@ -9,7 +9,9 @@ use std::{ path::{Path, PathBuf}, sync::Arc, }; -use sway_core::{fuel_prelude::fuel_tx, language::parsed::TreeType, parse_tree_type, BuildTarget}; +use sway_core::{ + fuel_prelude::fuel_tx, language::parsed::TreeType, parse_tree_type, BuildTarget, OptLevel, +}; use sway_error::handler::Handler; use sway_utils::{ constants, find_nested_manifest_dir, find_parent_manifest_dir, @@ -233,6 +235,7 @@ pub struct BuildProfile { #[serde(default)] pub error_on_warnings: bool, pub reverse_results: bool, + pub optimization_level: OptLevel, #[serde(default)] pub experimental: ExperimentalFlags, } @@ -726,6 +729,7 @@ impl BuildProfile { json_abi_with_callpaths: false, error_on_warnings: false, reverse_results: false, + optimization_level: OptLevel::Opt0, experimental: ExperimentalFlags { new_encoding: false, }, @@ -747,6 +751,7 @@ impl BuildProfile { json_abi_with_callpaths: false, error_on_warnings: false, reverse_results: false, + optimization_level: OptLevel::Opt1, experimental: ExperimentalFlags { new_encoding: false, }, diff --git a/forc-pkg/src/pkg.rs b/forc-pkg/src/pkg.rs index d1bc4c19667..d6436bf21eb 100644 --- a/forc-pkg/src/pkg.rs +++ b/forc-pkg/src/pkg.rs @@ -1564,6 +1564,7 @@ pub fn sway_build_config( .with_include_tests(build_profile.include_tests) .with_time_phases(build_profile.time_phases) .with_metrics(build_profile.metrics_outfile.clone()) + .with_optimization_level(build_profile.optimization_level) .with_experimental(sway_core::ExperimentalFlags { new_encoding: build_profile.experimental.new_encoding, }); diff --git a/sway-core/src/build_config.rs b/sway-core/src/build_config.rs index 85aaf814e2c..d589807a243 100644 --- a/sway-core/src/build_config.rs +++ b/sway-core/src/build_config.rs @@ -32,6 +32,12 @@ pub enum BuildTarget { MidenVM, } +#[derive(Serialize, Deserialize, Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)] +pub enum OptLevel { + Opt0, + Opt1, +} + /// Configuration for the overall build and compilation process. #[derive(Clone)] pub struct BuildConfig { @@ -46,6 +52,7 @@ pub struct BuildConfig { pub(crate) print_finalized_asm: bool, pub(crate) print_ir: bool, pub(crate) include_tests: bool, + pub(crate) optimization_level: OptLevel, pub time_phases: bool, pub metrics_outfile: Option, pub experimental: ExperimentalFlags, @@ -93,6 +100,7 @@ impl BuildConfig { include_tests: false, time_phases: false, metrics_outfile: None, + optimization_level: OptLevel::Opt0, experimental: ExperimentalFlags::default(), } } @@ -146,6 +154,13 @@ impl BuildConfig { } } + pub fn with_optimization_level(self, optimization_level: OptLevel) -> Self { + Self { + optimization_level, + ..self + } + } + /// Whether or not to include test functions in parsing, type-checking and codegen. /// /// This should be set to `true` by invocations like `forc test` or `forc check --tests`. diff --git a/sway-core/src/lib.rs b/sway-core/src/lib.rs index 1cb1288f1bb..37d249e7dfa 100644 --- a/sway-core/src/lib.rs +++ b/sway-core/src/lib.rs @@ -27,7 +27,7 @@ use crate::source_map::SourceMap; pub use asm_generation::from_ir::compile_ir_to_asm; use asm_generation::FinalizedAsm; pub use asm_generation::{CompiledBytecode, FinalizedEntry}; -pub use build_config::{BuildConfig, BuildTarget}; +pub use build_config::{BuildConfig, BuildTarget, OptLevel}; use control_flow_analysis::ControlFlowGraph; use metadata::MetadataManager; use query_engine::{ModuleCacheKey, ModulePath, ProgramsCacheEntry}; @@ -40,9 +40,10 @@ use std::sync::Arc; use sway_ast::AttributeDecl; use sway_error::handler::{ErrorEmitted, Handler}; use sway_ir::{ - create_o1_pass_group, register_known_passes, Context, Kind, Module, PassManager, - ARGDEMOTION_NAME, CONSTDEMOTION_NAME, DCE_NAME, MEM2REG_NAME, MEMCPYOPT_NAME, - MISCDEMOTION_NAME, MODULEPRINTER_NAME, RETDEMOTION_NAME, SIMPLIFYCFG_NAME, SROA_NAME, + create_o1_pass_group, register_known_passes, Context, Kind, Module, PassGroup, PassManager, + ARGDEMOTION_NAME, CONSTDEMOTION_NAME, DCE_NAME, INLINE_MODULE_NAME, MEM2REG_NAME, + MEMCPYOPT_NAME, MISCDEMOTION_NAME, MODULEPRINTER_NAME, RETDEMOTION_NAME, SIMPLIFYCFG_NAME, + SROA_NAME, }; use sway_types::constants::DOC_COMMENT_ATTRIBUTE_NAME; use sway_types::SourceEngine; @@ -804,7 +805,17 @@ pub(crate) fn compile_ast_to_ir_to_asm( // Initialize the pass manager and register known passes. let mut pass_mgr = PassManager::default(); register_known_passes(&mut pass_mgr); - let mut pass_group = create_o1_pass_group(); + let mut pass_group = PassGroup::default(); + + match build_config.optimization_level { + OptLevel::Opt1 => { + pass_group.append_group(create_o1_pass_group()); + } + OptLevel::Opt0 => { + // Inlining is necessary until #4899 is resolved. + pass_group.append_pass(INLINE_MODULE_NAME); + } + } // Target specific transforms should be moved into something more configured. if build_config.build_target == BuildTarget::Fuel { @@ -823,9 +834,15 @@ pub(crate) fn compile_ast_to_ir_to_asm( // Run a DCE and simplify-cfg to clean up any obsolete instructions. pass_group.append_pass(DCE_NAME); pass_group.append_pass(SIMPLIFYCFG_NAME); - pass_group.append_pass(SROA_NAME); - pass_group.append_pass(MEM2REG_NAME); - pass_group.append_pass(DCE_NAME); + + match build_config.optimization_level { + OptLevel::Opt1 => { + pass_group.append_pass(SROA_NAME); + pass_group.append_pass(MEM2REG_NAME); + pass_group.append_pass(DCE_NAME); + } + OptLevel::Opt0 => {} + } } if build_config.print_ir { diff --git a/test/src/e2e_vm_tests/harness.rs b/test/src/e2e_vm_tests/harness.rs index c372461d5c3..39a7017bd0c 100644 --- a/test/src/e2e_vm_tests/harness.rs +++ b/test/src/e2e_vm_tests/harness.rs @@ -1,5 +1,6 @@ use anyhow::{anyhow, bail, Result}; use colored::Colorize; +use forc::cli::shared::BuildProfile; use forc_client::{ cmd::{Deploy as DeployCommand, Run as RunCommand}, op::{deploy, run}, @@ -72,6 +73,10 @@ pub(crate) async fn deploy_contract(file_name: &str, run_config: &RunConfig) -> }, signing_key: Some(SecretKey::from_str(SECRET_KEY).unwrap()), default_salt: true, + build_profile: BuildProfile { + release: run_config.release, + ..Default::default() + }, ..Default::default() }) .await @@ -252,6 +257,7 @@ pub(crate) async fn compile_to_bytes(file_name: &str, run_config: &RunConfig) -> let manifest_dir = env!("CARGO_MANIFEST_DIR"); let build_opts = forc_pkg::BuildOpts { build_target: run_config.build_target, + release: run_config.release, pkg: forc_pkg::PkgOpts { path: Some(format!( "{manifest_dir}/src/e2e_vm_tests/test_programs/{file_name}", diff --git a/test/src/e2e_vm_tests/mod.rs b/test/src/e2e_vm_tests/mod.rs index f8a983d95b6..3133bce78f7 100644 --- a/test/src/e2e_vm_tests/mod.rs +++ b/test/src/e2e_vm_tests/mod.rs @@ -10,6 +10,7 @@ use anyhow::{anyhow, bail, Result}; use assert_matches::assert_matches; use colored::*; use core::fmt; +use forc_pkg::BuildProfile; use fuel_vm::fuel_tx; use fuel_vm::prelude::*; use regex::Regex; @@ -68,6 +69,7 @@ struct TestDescription { validate_abi: bool, validate_storage_slots: bool, supported_targets: HashSet, + unsupported_profiles: Vec<&'static str>, checker: filecheck::Checker, } @@ -539,6 +541,12 @@ pub async fn run(filter_config: &FilterConfig, run_config: &RunConfig) -> Result if filter_config.first_only && !tests.is_empty() { tests = vec![tests.remove(0)]; } + let cur_profile = if run_config.release { + BuildProfile::RELEASE + } else { + BuildProfile::DEBUG + }; + tests.retain(|t| !t.unsupported_profiles.contains(&cur_profile)); // Run tests let context = TestContext { @@ -866,6 +874,15 @@ fn parse_test_toml(path: &Path) -> Result { .map(get_test_abi_from_value) .collect::>>()?; + // Check for not supported build profiles. Default is empty. + let unsupported_profiles = toml_content + .get("unsupported_profiles") + .map(|v| v.as_array().cloned().unwrap_or_default()) + .unwrap_or_default() + .iter() + .map(get_build_profile_from_value) + .collect::>>()?; + let supported_targets = HashSet::from_iter(if supported_targets.is_empty() { vec![BuildTarget::Fuel] } else { @@ -883,6 +900,7 @@ fn parse_test_toml(path: &Path) -> Result { validate_abi, validate_storage_slots, supported_targets, + unsupported_profiles, checker, }) } @@ -897,6 +915,17 @@ fn get_test_abi_from_value(value: &toml::Value) -> Result { } } +fn get_build_profile_from_value(value: &toml::Value) -> Result<&'static str> { + match value.as_str() { + Some(profile) => match profile { + BuildProfile::DEBUG => Ok(BuildProfile::DEBUG), + BuildProfile::RELEASE => Ok(BuildProfile::RELEASE), + _ => Err(anyhow!(format!("Unknown build profile"))), + }, + None => Err(anyhow!("Invalid TOML value")), + } +} + fn get_expected_result(toml_content: &toml::Value) -> Result { fn get_action_value(action: &toml::Value, expected_value: &toml::Value) -> Result { match (action.as_str(), expected_value) { diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/arith_overflow/u8_add_overflow/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/arith_overflow/u8_add_overflow/test.toml index 2f3b260911b..6e3fea8875a 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/arith_overflow/u8_add_overflow/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_fail/arith_overflow/u8_add_overflow/test.toml @@ -1,3 +1,3 @@ -category = "run" +category = "disabled" expected_result = { action = "revert", value = 0 } validate_abi = false diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/arith_overflow/u8_mul_overflow/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/arith_overflow/u8_mul_overflow/test.toml index 2f3b260911b..6e3fea8875a 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/arith_overflow/u8_mul_overflow/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_fail/arith_overflow/u8_mul_overflow/test.toml @@ -1,3 +1,3 @@ -category = "run" +category = "disabled" expected_result = { action = "revert", value = 0 } validate_abi = false diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/configurable_consts/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/configurable_consts/test.toml index 916523ab45f..86763df8984 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/configurable_consts/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/configurable_consts/test.toml @@ -2,3 +2,4 @@ category = "run" expected_result = { action = "return", value = 0 } validate_abi = true expected_warnings = 2 +unsupported_profiles = ["debug"] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/references/referencing_local_vars_and_values/src/main.sw b/test/src/e2e_vm_tests/test_programs/should_pass/language/references/referencing_local_vars_and_values/src/main.sw index f94d3073609..14ca9e43f2e 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/references/referencing_local_vars_and_values/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/references/referencing_local_vars_and_values/src/main.sw @@ -109,7 +109,7 @@ fn reference_local_reference_var_and_value_not_inlined() } #[inline(always)] -fn reference_zero_sized_local_var_and_value(is_inlined: bool) +fn reference_zero_sized_local_var_and_value() where T: Eq + New + ZeroSize { assert(__size_of::() == 0); @@ -127,21 +127,6 @@ fn reference_zero_sized_local_var_and_value(is_inlined: bool) let r_val_ptr = asm(r: r_val) { r: raw_ptr }; let r_dummy_ptr = asm(r: r_dummy) { r: raw_ptr }; - // If there is no inlining and mixing with other test functions, - // since the size of `T` is zero, means allocates zero memory, - // both created values will be on the same memory location. - // The dummy value will also be on the same location. - // In case of inlining with other test functions we can get - // the two variables position separately from each other, intermixed - // with the locals coming from other functions. - // Note that we rely on the optimization which will remove the local - // variables for the references. This assumption is fine, - // the test should never be flaky. - if (!is_inlined) { - assert(r_x_1_ptr == r_val_ptr); - assert(r_x_1_ptr == r_dummy_ptr); - } - assert(r_x_1_ptr == r_x_2_ptr); let r_x_1_ptr_val = r_x_1_ptr.read::(); @@ -164,7 +149,7 @@ fn reference_zero_sized_local_var_and_value(is_inlined: bool) fn reference_zero_sized_local_var_and_value_not_inlined() where T: Eq + New + ZeroSize { - reference_zero_sized_local_var_and_value::(false) + reference_zero_sized_local_var_and_value::() } #[inline(never)] @@ -186,8 +171,8 @@ fn test_all_inlined() { reference_local_var_and_value::(); reference_local_var_and_value::(); - reference_zero_sized_local_var_and_value::(true); - reference_zero_sized_local_var_and_value::<[u64;0]>(true); + reference_zero_sized_local_var_and_value::(); + reference_zero_sized_local_var_and_value::<[u64;0]>(); reference_local_reference_var_and_value::<()>(); reference_local_reference_var_and_value::(); diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/u256/u256_abi/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/u256/u256_abi/test.toml index 5857e81b302..d2a868bd8aa 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/u256/u256_abi/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/u256/u256_abi/test.toml @@ -1,3 +1,4 @@ category = "run" expected_result = { action = "return_data", value = "0000000000000000000000000000000000000000000000000000000000000001" } validate_abi = true +unsupported_profiles = ["debug"] diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/array_of_structs_caller/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/array_of_structs_caller/test.toml index 853d71ea545..7e1704675f7 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/array_of_structs_caller/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/array_of_structs_caller/test.toml @@ -1,3 +1,4 @@ category = "run_on_node" expected_result = { action = "result", value = 1 } contracts = ["should_pass/test_contracts/array_of_structs_contract"] +unsupported_profiles = ["debug"] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/asset_ops_test/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/asset_ops_test/test.toml index c5bf35a1c74..344b39978d8 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/asset_ops_test/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/asset_ops_test/test.toml @@ -1,3 +1,4 @@ category = "run_on_node" expected_result = { action = "result", value = 1 } contracts = ["should_pass/test_contracts/balance_test_contract", "should_pass/test_contracts/test_fuel_coin_contract"] +unsupported_profiles = ["debug"] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/bal_opcode/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/bal_opcode/test.toml index 044cb74c7da..4f5d0c8d484 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/bal_opcode/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/bal_opcode/test.toml @@ -1,3 +1,4 @@ category = "run_on_node" expected_result = { action = "result", value = 1 } contracts = ["should_pass/test_contracts/balance_test_contract"] +unsupported_profiles = ["debug"] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_abi_with_tuples/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_abi_with_tuples/test.toml index af526e80a7f..6813119dff6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_abi_with_tuples/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_abi_with_tuples/test.toml @@ -1,3 +1,4 @@ category = "run_on_node" expected_result = { action = "result", value = 1 } contracts = ["should_pass/test_contracts/abi_with_tuples_contract"] +unsupported_profiles = ["debug"] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_basic_storage/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_basic_storage/test.toml index 6afc375bd5a..e917ac146de 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_basic_storage/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_basic_storage/test.toml @@ -1,3 +1,4 @@ category = "run_on_node" expected_result = { action = "result", value = 4242 } contracts = ["should_pass/test_contracts/basic_storage"] +unsupported_profiles = ["debug"] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_contract_with_type_aliases/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_contract_with_type_aliases/test.toml index 07186a0038f..48f8a744c9d 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_contract_with_type_aliases/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_contract_with_type_aliases/test.toml @@ -1,3 +1,4 @@ category = "run_on_node" expected_result = { action = "result", value = 0 } contracts = ["should_pass/test_contracts/contract_with_type_aliases"] +unsupported_profiles = ["debug"] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_increment_contract/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_increment_contract/test.toml index 4e73dff4cd8..f20244c28b3 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_increment_contract/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_increment_contract/test.toml @@ -1,3 +1,4 @@ category = "run_on_node" expected_result = { action = "result", value = 1 } contracts = ["should_pass/test_contracts/increment_contract"] +unsupported_profiles = ["debug"] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_storage_enum/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_storage_enum/test.toml index c13a44ada2a..838cfe3151c 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_storage_enum/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_storage_enum/test.toml @@ -1,3 +1,4 @@ category = "run_on_node" expected_result = { action = "result", value = 171 } contracts = ["should_pass/test_contracts/storage_enum_contract"] +unsupported_profiles = ["debug"] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_auth_test/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_auth_test/test.toml index 258d74ac5fa..a1a48726421 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_auth_test/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_auth_test/test.toml @@ -1,3 +1,4 @@ category = "run_on_node" expected_result = { action = "result", value = 1 } contracts = ["should_pass/test_contracts/auth_testing_contract"] +unsupported_profiles = ["debug"] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_context_test/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_context_test/test.toml index 093bb1be264..fe4f2c19865 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_context_test/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_context_test/test.toml @@ -1,3 +1,4 @@ category = "run_on_node" expected_result = { action = "result", value = 1 } contracts = ["should_pass/test_contracts/context_testing_contract"] +unsupported_profiles = ["debug"] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/nested_struct_args_caller/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/nested_struct_args_caller/test.toml index cfce04e542b..90a8632cd73 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/nested_struct_args_caller/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/nested_struct_args_caller/test.toml @@ -1,3 +1,4 @@ category = "run_on_node" expected_result = { action = "result", value = 1 } contracts = ["should_pass/test_contracts/nested_struct_args_contract"] +unsupported_profiles = ["debug"] \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/storage_access_caller/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/storage_access_caller/test.toml index c64e79bfb32..2633688329b 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/storage_access_caller/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/storage_access_caller/test.toml @@ -1,3 +1,4 @@ category = "run_on_node" expected_result = { action = "result", value = 1 } contracts = ["should_pass/test_contracts/storage_access_contract"] +unsupported_profiles = ["debug"] \ No newline at end of file diff --git a/test/src/main.rs b/test/src/main.rs index 2274b8d2446..2a56aeadc6d 100644 --- a/test/src/main.rs +++ b/test/src/main.rs @@ -39,6 +39,10 @@ struct Cli { #[arg(long, env = "SWAY_TEST_VERBOSE")] verbose: bool, + /// Compile sway code in release mode + #[arg(long)] + release: bool, + /// Intended for use in `CI` to ensure test lock files are up to date #[arg(long)] locked: bool, @@ -67,6 +71,7 @@ pub struct RunConfig { pub build_target: BuildTarget, pub locked: bool, pub verbose: bool, + pub release: bool, pub experimental: ExperimentalFlags, } @@ -94,6 +99,7 @@ async fn main() -> Result<()> { let run_config = RunConfig { locked: cli.locked, verbose: cli.verbose, + release: cli.release, build_target, experimental: sway_core::ExperimentalFlags { new_encoding: cli.experimental_new_encoding, diff --git a/test/src/sdk-harness/test_projects/abi_impl_methods_callable/mod.rs b/test/src/sdk-harness/test_projects/abi_impl_methods_callable/mod.rs index ee55fd9c649..628b7f86168 100644 --- a/test/src/sdk-harness/test_projects/abi_impl_methods_callable/mod.rs +++ b/test/src/sdk-harness/test_projects/abi_impl_methods_callable/mod.rs @@ -3,13 +3,13 @@ use fuels::prelude::*; abigen!(Contract( name = "AbiImplMethodsCallable", - abi = "test_projects/abi_impl_methods_callable/out/debug/abi_impl_methods_callable-abi.json" + abi = "test_projects/abi_impl_methods_callable/out/release/abi_impl_methods_callable-abi.json" )); async fn get_abi_impl_methods_callable_instance() -> AbiImplMethodsCallable { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/abi_impl_methods_callable/out/debug/abi_impl_methods_callable.bin", + "test_projects/abi_impl_methods_callable/out/release/abi_impl_methods_callable.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/asset_ops/mod.rs b/test/src/sdk-harness/test_projects/asset_ops/mod.rs index 6a9aa88352b..374d0590f6e 100644 --- a/test/src/sdk-harness/test_projects/asset_ops/mod.rs +++ b/test/src/sdk-harness/test_projects/asset_ops/mod.rs @@ -10,7 +10,7 @@ use std::str::FromStr; abigen!(Contract( name = "TestFuelCoinContract", - abi = "test_projects/asset_ops/out/debug/asset_ops-abi.json" + abi = "test_projects/asset_ops/out/release/asset_ops-abi.json" )); #[tokio::test] @@ -505,7 +505,7 @@ async fn get_fuelcoin_instance( wallet: WalletUnlocked, ) -> (TestFuelCoinContract, ContractId) { let fuelcontract_id = Contract::load_from( - "test_projects/asset_ops/out/debug/asset_ops.bin", + "test_projects/asset_ops/out/release/asset_ops.bin", LoadConfiguration::default(), ) .unwrap() @@ -524,7 +524,7 @@ async fn get_fuelcoin_instance( async fn get_balance_contract_id(wallet: WalletUnlocked) -> ContractId { let balance_id = Contract::load_from( - "test_artifacts/balance_contract/out/debug/balance_contract.bin", + "test_artifacts/balance_contract/out/release/balance_contract.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/auth/mod.rs b/test/src/sdk-harness/test_projects/auth/mod.rs index f12bf989383..4f6d38e9184 100644 --- a/test/src/sdk-harness/test_projects/auth/mod.rs +++ b/test/src/sdk-harness/test_projects/auth/mod.rs @@ -11,15 +11,15 @@ use std::str::FromStr; abigen!( Contract( name = "AuthContract", - abi = "test_artifacts/auth_testing_contract/out/debug/auth_testing_contract-abi.json" + abi = "test_artifacts/auth_testing_contract/out/release/auth_testing_contract-abi.json" ), Contract( name = "AuthCallerContract", - abi = "test_artifacts/auth_caller_contract/out/debug/auth_caller_contract-abi.json" + abi = "test_artifacts/auth_caller_contract/out/release/auth_caller_contract-abi.json" ), Predicate( name = "AuthPredicate", - abi = "test_artifacts/auth_predicate/out/debug/auth_predicate-abi.json" + abi = "test_artifacts/auth_predicate/out/release/auth_predicate-abi.json" ), ); @@ -74,7 +74,7 @@ async fn get_contracts() -> ( let wallet = launch_provider_and_get_wallet().await.unwrap(); let id_1 = Contract::load_from( - "test_artifacts/auth_testing_contract/out/debug/auth_testing_contract.bin", + "test_artifacts/auth_testing_contract/out/release/auth_testing_contract.bin", LoadConfiguration::default(), ) .unwrap() @@ -83,7 +83,7 @@ async fn get_contracts() -> ( .unwrap(); let id_2 = Contract::load_from( - "test_artifacts/auth_caller_contract/out/debug/auth_caller_contract.bin", + "test_artifacts/auth_caller_contract/out/release/auth_caller_contract.bin", LoadConfiguration::default(), ) .unwrap() @@ -129,7 +129,7 @@ async fn can_get_predicate_id() { let predicate_bech32_address = Bech32Address::from(predicate_address); let predicate_data = AuthPredicateEncoder::encode_data(predicate_bech32_address); let predicate: Predicate = - Predicate::load_from("test_artifacts/auth_predicate/out/debug/auth_predicate.bin") + Predicate::load_from("test_artifacts/auth_predicate/out/release/auth_predicate.bin") .unwrap() .with_provider(first_wallet.try_provider().unwrap().clone()) .with_data(predicate_data); @@ -203,7 +203,7 @@ async fn when_incorrect_predicate_address_passed() { Address::from_str(hex_predicate_address).expect("failed to create Address from string"); let predicate_data = AuthPredicateEncoder::encode_data(Bech32Address::from(predicate_address)); let predicate: Predicate = - Predicate::load_from("test_artifacts/auth_predicate/out/debug/auth_predicate.bin") + Predicate::load_from("test_artifacts/auth_predicate/out/release/auth_predicate.bin") .unwrap() .with_provider(first_wallet.try_provider().unwrap().clone()) .with_data(predicate_data); diff --git a/test/src/sdk-harness/test_projects/block/mod.rs b/test/src/sdk-harness/test_projects/block/mod.rs index e9fcc24b8eb..be09fc77653 100644 --- a/test/src/sdk-harness/test_projects/block/mod.rs +++ b/test/src/sdk-harness/test_projects/block/mod.rs @@ -4,14 +4,14 @@ use tokio::time::{sleep, Duration}; abigen!(Contract( name = "BlockTestContract", - abi = "test_projects/block/out/debug/block-abi.json" + abi = "test_projects/block/out/release/block-abi.json" )); async fn get_block_instance() -> (BlockTestContract, ContractId, Provider) { let wallet = launch_provider_and_get_wallet().await.unwrap(); let provider = wallet.provider().unwrap(); let id = Contract::load_from( - "test_projects/block/out/debug/block.bin", + "test_projects/block/out/release/block.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/call_frames/mod.rs b/test/src/sdk-harness/test_projects/call_frames/mod.rs index 4b85f7db4aa..cea9b7c7df0 100644 --- a/test/src/sdk-harness/test_projects/call_frames/mod.rs +++ b/test/src/sdk-harness/test_projects/call_frames/mod.rs @@ -5,13 +5,13 @@ use sha2::{Digest, Sha256}; abigen!(Contract( name = "CallFramesTestContract", - abi = "test_projects/call_frames/out/debug/call_frames-abi.json" + abi = "test_projects/call_frames/out/release/call_frames-abi.json" )); async fn get_call_frames_instance() -> (CallFramesTestContract, ContractId) { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/call_frames/out/debug/call_frames.bin", + "test_projects/call_frames/out/release/call_frames.bin", LoadConfiguration::default(), ) .unwrap(); diff --git a/test/src/sdk-harness/test_projects/configurables_in_contract/mod.rs b/test/src/sdk-harness/test_projects/configurables_in_contract/mod.rs index 53523a26de5..685f1584ed6 100644 --- a/test/src/sdk-harness/test_projects/configurables_in_contract/mod.rs +++ b/test/src/sdk-harness/test_projects/configurables_in_contract/mod.rs @@ -5,13 +5,13 @@ async fn contract_uses_default_configurables() -> Result<()> { abigen!(Contract( name = "MyContract", abi = - "test_projects/configurables_in_contract/out/debug/configurables_in_contract-abi.json" + "test_projects/configurables_in_contract/out/release/configurables_in_contract-abi.json" )); let wallet = launch_provider_and_get_wallet().await.unwrap(); let contract_id = Contract::load_from( - "test_projects/configurables_in_contract/out/debug/configurables_in_contract.bin", + "test_projects/configurables_in_contract/out/release/configurables_in_contract.bin", LoadConfiguration::default(), ) .unwrap() @@ -48,7 +48,7 @@ async fn contract_configurables() -> Result<()> { abigen!(Contract( name = "MyContract", abi = - "test_projects/configurables_in_contract/out/debug/configurables_in_contract-abi.json" + "test_projects/configurables_in_contract/out/release/configurables_in_contract-abi.json" )); let wallet = launch_provider_and_get_wallet().await.unwrap(); @@ -66,7 +66,7 @@ async fn contract_configurables() -> Result<()> { .with_ENUM(new_enum.clone()); let contract_id = Contract::load_from( - "test_projects/configurables_in_contract/out/debug/configurables_in_contract.bin", + "test_projects/configurables_in_contract/out/release/configurables_in_contract.bin", LoadConfiguration::default().with_configurables(configurables), )? .deploy(&wallet, TxPolicies::default()) diff --git a/test/src/sdk-harness/test_projects/configurables_in_script/mod.rs b/test/src/sdk-harness/test_projects/configurables_in_script/mod.rs index 271ef7ec7a7..e05aeabf0d6 100644 --- a/test/src/sdk-harness/test_projects/configurables_in_script/mod.rs +++ b/test/src/sdk-harness/test_projects/configurables_in_script/mod.rs @@ -4,11 +4,11 @@ use fuels::{prelude::*, types::SizedAsciiString}; async fn script_uses_default_configurables() -> Result<()> { abigen!(Script( name = "MyScript", - abi = "test_projects/configurables_in_script/out/debug/configurables_in_script-abi.json" + abi = "test_projects/configurables_in_script/out/release/configurables_in_script-abi.json" )); let wallet = launch_provider_and_get_wallet().await.unwrap(); - let bin_path = "test_projects/configurables_in_script/out/debug/configurables_in_script.bin"; + let bin_path = "test_projects/configurables_in_script/out/release/configurables_in_script.bin"; let instance = MyScript::new(wallet, bin_path); let response = instance.main().call().await?; @@ -34,11 +34,11 @@ async fn script_uses_default_configurables() -> Result<()> { async fn script_configurables() -> Result<()> { abigen!(Script( name = "MyScript", - abi = "test_projects/configurables_in_script/out/debug/configurables_in_script-abi.json" + abi = "test_projects/configurables_in_script/out/release/configurables_in_script-abi.json" )); let wallet = launch_provider_and_get_wallet().await.unwrap(); - let bin_path = "test_projects/configurables_in_script/out/debug/configurables_in_script.bin"; + let bin_path = "test_projects/configurables_in_script/out/release/configurables_in_script.bin"; let instance = MyScript::new(wallet, bin_path); let new_str: SizedAsciiString<4> = "FUEL".try_into()?; diff --git a/test/src/sdk-harness/test_projects/context/mod.rs b/test/src/sdk-harness/test_projects/context/mod.rs index a3148fe687e..c0abf2692d0 100644 --- a/test/src/sdk-harness/test_projects/context/mod.rs +++ b/test/src/sdk-harness/test_projects/context/mod.rs @@ -10,15 +10,15 @@ use fuels::{ abigen!( Contract( name = "TestContextContract", - abi = "test_projects/context/out/debug/context-abi.json", + abi = "test_projects/context/out/release/context-abi.json", ), Contract( name = "TestContextCallerContract", - abi = "test_artifacts/context_caller_contract/out/debug/context_caller_contract-abi.json", + abi = "test_artifacts/context_caller_contract/out/release/context_caller_contract-abi.json", ), Contract( name = "FuelCoin", - abi = "test_projects/asset_ops/out/debug/asset_ops-abi.json" + abi = "test_projects/asset_ops/out/release/asset_ops-abi.json" ) ); @@ -30,7 +30,7 @@ async fn get_contracts() -> ( ) { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id_1 = Contract::load_from( - "test_projects/context/out/debug/context.bin", + "test_projects/context/out/release/context.bin", LoadConfiguration::default(), ) .unwrap() @@ -38,7 +38,7 @@ async fn get_contracts() -> ( .await .unwrap(); let id_2 = Contract::load_from( - "test_artifacts/context_caller_contract/out/debug/context_caller_contract.bin", + "test_artifacts/context_caller_contract/out/release/context_caller_contract.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/contract_bytecode/mod.rs b/test/src/sdk-harness/test_projects/contract_bytecode/mod.rs index b3625529da1..8fec8bd2fce 100644 --- a/test/src/sdk-harness/test_projects/contract_bytecode/mod.rs +++ b/test/src/sdk-harness/test_projects/contract_bytecode/mod.rs @@ -3,7 +3,7 @@ use fuels::{accounts::wallet::WalletUnlocked, prelude::*, types::Bits256}; abigen!(Contract( name = "ContractBytecodeTest", - abi = "test_projects/contract_bytecode/out/debug/contract_bytecode-abi.json" + abi = "test_projects/contract_bytecode/out/release/contract_bytecode-abi.json" )); #[tokio::test] @@ -22,7 +22,7 @@ async fn can_get_bytecode_root() { .value; let contract_bytecode = - std::fs::read("test_projects/contract_bytecode/out/debug/contract_bytecode.bin").unwrap(); + std::fs::read("test_projects/contract_bytecode/out/release/contract_bytecode.bin").unwrap(); let expected_bytecode_root = Bits256(*FuelsTxContract::root_from_code(contract_bytecode)); assert_eq!(expected_bytecode_root, bytecode_root); @@ -32,7 +32,7 @@ async fn get_test_contract_instance( wallet: WalletUnlocked, ) -> (ContractBytecodeTest, Bech32ContractId) { let id = Contract::load_from( - "test_projects/contract_bytecode/out/debug/contract_bytecode.bin", + "test_projects/contract_bytecode/out/release/contract_bytecode.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/ec_recover/mod.rs b/test/src/sdk-harness/test_projects/ec_recover/mod.rs index 80bac234f69..8e9775ce5a5 100644 --- a/test/src/sdk-harness/test_projects/ec_recover/mod.rs +++ b/test/src/sdk-harness/test_projects/ec_recover/mod.rs @@ -8,7 +8,7 @@ use rand::{rngs::StdRng, Rng, SeedableRng}; abigen!(Contract( name = "EcRecoverContract", - abi = "test_projects/ec_recover/out/debug/ec_recover-abi.json" + abi = "test_projects/ec_recover/out/release/ec_recover-abi.json" )); async fn setup_env() -> Result<( @@ -43,7 +43,7 @@ async fn setup_env() -> Result<( wallet.set_provider(provider); let contract_id = Contract::load_from( - "test_projects/ec_recover/out/debug/ec_recover.bin", + "test_projects/ec_recover/out/release/ec_recover.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/ec_recover_and_match_predicate/mod.rs b/test/src/sdk-harness/test_projects/ec_recover_and_match_predicate/mod.rs index c69e7f39555..d692549bdc6 100644 --- a/test/src/sdk-harness/test_projects/ec_recover_and_match_predicate/mod.rs +++ b/test/src/sdk-harness/test_projects/ec_recover_and_match_predicate/mod.rs @@ -7,7 +7,7 @@ use fuels::{ abigen!( Predicate( name = "TestPredicate", - abi = "test_projects/ec_recover_and_match_predicate/out/debug/ec_recover_and_match_predicate-abi.json" + abi = "test_projects/ec_recover_and_match_predicate/out/release/ec_recover_and_match_predicate-abi.json" ) ); @@ -73,7 +73,7 @@ async fn ec_recover_and_match_predicate_test() -> Result<()> { let predicate_data = TestPredicateEncoder::encode_data(signatures); let code_path = - "test_projects/ec_recover_and_match_predicate/out/debug/ec_recover_and_match_predicate.bin"; + "test_projects/ec_recover_and_match_predicate/out/release/ec_recover_and_match_predicate.bin"; let predicate = Predicate::load_from(code_path)? .with_data(predicate_data) diff --git a/test/src/sdk-harness/test_projects/evm/mod.rs b/test/src/sdk-harness/test_projects/evm/mod.rs index bec86a0a98f..0f99eaa4355 100644 --- a/test/src/sdk-harness/test_projects/evm/mod.rs +++ b/test/src/sdk-harness/test_projects/evm/mod.rs @@ -6,13 +6,13 @@ use fuels::{ abigen!(Contract( name = "EvmTestContract", - abi = "test_projects/evm/out/debug/evm-abi.json" + abi = "test_projects/evm/out/release/evm-abi.json" )); async fn get_evm_test_instance() -> (EvmTestContract, ContractId) { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/evm/out/debug/evm.bin", + "test_projects/evm/out/release/evm.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/evm_ec_recover/mod.rs b/test/src/sdk-harness/test_projects/evm_ec_recover/mod.rs index 6e4efba47d7..b16778fc403 100644 --- a/test/src/sdk-harness/test_projects/evm_ec_recover/mod.rs +++ b/test/src/sdk-harness/test_projects/evm_ec_recover/mod.rs @@ -13,7 +13,7 @@ use sha3::{Digest, Keccak256}; abigen!(Contract( name = "EvmEcRecoverContract", - abi = "test_projects/evm_ec_recover/out/debug/evm_ec_recover-abi.json" + abi = "test_projects/evm_ec_recover/out/release/evm_ec_recover-abi.json" )); fn keccak_hash(data: B) -> Bytes32 @@ -68,7 +68,7 @@ async fn setup_env() -> Result<( wallet.set_provider(provider); let contract_id = Contract::load_from( - "test_projects/evm_ec_recover/out/debug/evm_ec_recover.bin", + "test_projects/evm_ec_recover/out/release/evm_ec_recover.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/exponentiation/mod.rs b/test/src/sdk-harness/test_projects/exponentiation/mod.rs index 65d1662754d..f7a27908f80 100644 --- a/test/src/sdk-harness/test_projects/exponentiation/mod.rs +++ b/test/src/sdk-harness/test_projects/exponentiation/mod.rs @@ -4,7 +4,7 @@ use fuels::types::ContractId; abigen!(Contract( name = "TestPowContract", - abi = "test_artifacts/pow/out/debug/pow-abi.json" + abi = "test_artifacts/pow/out/release/pow-abi.json" )); #[tokio::test] @@ -105,7 +105,7 @@ async fn get_pow_test_instance( wallet: WalletUnlocked, ) -> (TestPowContract, ContractId) { let pow_id = Contract::load_from( - "test_artifacts/pow/out/debug/pow.bin", + "test_artifacts/pow/out/release/pow.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/generics_in_abi/mod.rs b/test/src/sdk-harness/test_projects/generics_in_abi/mod.rs index 7ec23c63b39..3e7ab3e6d52 100644 --- a/test/src/sdk-harness/test_projects/generics_in_abi/mod.rs +++ b/test/src/sdk-harness/test_projects/generics_in_abi/mod.rs @@ -2,13 +2,13 @@ use fuels::{accounts::wallet::WalletUnlocked, prelude::*, types::Bits256}; abigen!(Contract( name = "GenericsInAbiTestContract", - abi = "test_projects/generics_in_abi/out/debug/generics_in_abi-abi.json" + abi = "test_projects/generics_in_abi/out/release/generics_in_abi-abi.json" )); async fn get_generics_in_abi_instance() -> (GenericsInAbiTestContract, ContractId) { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/generics_in_abi/out/debug/generics_in_abi.bin", + "test_projects/generics_in_abi/out/release/generics_in_abi.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/hashing/mod.rs b/test/src/sdk-harness/test_projects/hashing/mod.rs index 1772411e53c..cf2668d6bb1 100644 --- a/test/src/sdk-harness/test_projects/hashing/mod.rs +++ b/test/src/sdk-harness/test_projects/hashing/mod.rs @@ -9,7 +9,7 @@ use sha3::Keccak256; abigen!(Contract( name = "HashingTestContract", - abi = "test_projects/hashing/out/debug/hashing-abi.json" + abi = "test_projects/hashing/out/release/hashing-abi.json" )); enum Hash { @@ -146,7 +146,7 @@ async fn get_hashing_instance() -> (HashingTestContract, Contrac let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/hashing/out/debug/hashing.bin", + "test_projects/hashing/out/release/hashing.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/logging/mod.rs b/test/src/sdk-harness/test_projects/logging/mod.rs index aac9caec1e5..3398eb4ead3 100644 --- a/test/src/sdk-harness/test_projects/logging/mod.rs +++ b/test/src/sdk-harness/test_projects/logging/mod.rs @@ -4,11 +4,11 @@ use fuels::prelude::*; async fn run_valid() -> Result<()> { abigen!(Script( name = "Logging", - abi = "test_projects/logging/out/debug/logging-abi.json", + abi = "test_projects/logging/out/release/logging-abi.json", )); let wallet = launch_provider_and_get_wallet().await.unwrap(); - let bin_path = "test_projects/logging/out/debug/logging.bin"; + let bin_path = "test_projects/logging/out/release/logging.bin"; let instance = Logging::new(wallet.clone(), bin_path); let response = instance.main().call().await?; diff --git a/test/src/sdk-harness/test_projects/low_level_call/mod.rs b/test/src/sdk-harness/test_projects/low_level_call/mod.rs index d91cb6f8208..598e727f93e 100644 --- a/test/src/sdk-harness/test_projects/low_level_call/mod.rs +++ b/test/src/sdk-harness/test_projects/low_level_call/mod.rs @@ -23,11 +23,11 @@ abigen!( Contract( name = "TestContract", abi = - "test_artifacts/low_level_callee_contract/out/debug/low_level_callee_contract-abi.json" + "test_artifacts/low_level_callee_contract/out/release/low_level_callee_contract-abi.json" ), Script( name = "TestScript", - abi = "test_projects/low_level_call/out/debug/low_level_call-abi.json" + abi = "test_projects/low_level_call/out/release/low_level_call-abi.json" ) ); @@ -41,7 +41,7 @@ async fn low_level_call( // Build the script instance let script_instance = TestScript::new( wallet, - "test_projects/low_level_call/out/debug/low_level_call.bin", + "test_projects/low_level_call/out/release/low_level_call.bin", ); // Add the contract being called to the inputs and outputs @@ -85,7 +85,7 @@ async fn get_contract_instance() -> (TestContract, ContractId, W let wallet = wallets.pop().unwrap(); let id = Contract::load_from( - "test_artifacts/low_level_callee_contract/out/debug/low_level_callee_contract.bin", + "test_artifacts/low_level_callee_contract/out/release/low_level_callee_contract.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/low_level_call_bytes/mod.rs b/test/src/sdk-harness/test_projects/low_level_call_bytes/mod.rs index 301bb28ac2a..98115300a3c 100644 --- a/test/src/sdk-harness/test_projects/low_level_call_bytes/mod.rs +++ b/test/src/sdk-harness/test_projects/low_level_call_bytes/mod.rs @@ -23,11 +23,11 @@ abigen!( Contract( name = "TestContract", abi = - "test_artifacts/low_level_callee_contract/out/debug/low_level_callee_contract-abi.json" + "test_artifacts/low_level_callee_contract/out/release/low_level_callee_contract-abi.json" ), Script( name = "TestScript", - abi = "test_projects/low_level_call_bytes/out/debug/low_level_call_bytes-abi.json" + abi = "test_projects/low_level_call_bytes/out/release/low_level_call_bytes-abi.json" ) ); @@ -41,7 +41,7 @@ async fn low_level_call( // Build the script instance let script_instance = TestScript::new( wallet, - "test_projects/low_level_call_bytes/out/debug/low_level_call_bytes.bin", + "test_projects/low_level_call_bytes/out/release/low_level_call_bytes.bin", ); // Add the contract being called to the inputs and outputs @@ -90,7 +90,7 @@ async fn get_contract_instance() -> (TestContract, ContractId, W let wallet = wallets.pop().unwrap(); let id = Contract::load_from( - "test_artifacts/low_level_callee_contract/out/debug/low_level_callee_contract.bin", + "test_artifacts/low_level_callee_contract/out/release/low_level_callee_contract.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/messages/mod.rs b/test/src/sdk-harness/test_projects/messages/mod.rs index 33c75604c80..28b6445443c 100644 --- a/test/src/sdk-harness/test_projects/messages/mod.rs +++ b/test/src/sdk-harness/test_projects/messages/mod.rs @@ -2,7 +2,7 @@ use fuels::{accounts::wallet::WalletUnlocked, prelude::*, types::Bits256}; abigen!(Contract( name = "TestMessagesContract", - abi = "test_projects/messages/out/debug/messages-abi.json" + abi = "test_projects/messages/out/release/messages-abi.json" )); async fn get_messages_contract_instance() -> ( @@ -24,7 +24,7 @@ async fn get_messages_contract_instance() -> ( .await .unwrap(); let messages_contract_id = Contract::load_from( - "test_projects/messages/out/debug/messages.bin", + "test_projects/messages/out/release/messages.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/methods/mod.rs b/test/src/sdk-harness/test_projects/methods/mod.rs index 5466d48a79c..f9efa7ba847 100644 --- a/test/src/sdk-harness/test_projects/methods/mod.rs +++ b/test/src/sdk-harness/test_projects/methods/mod.rs @@ -2,7 +2,7 @@ use fuels::{accounts::wallet::WalletUnlocked, prelude::*}; abigen!(Contract( name = "MethodsContract", - abi = "test_artifacts/methods_contract/out/debug/methods_contract-abi.json", + abi = "test_artifacts/methods_contract/out/release/methods_contract-abi.json", )); #[tokio::test] @@ -22,7 +22,7 @@ async fn run_methods_test() { async fn get_methods_instance(wallet: WalletUnlocked) -> MethodsContract { let id = Contract::load_from( - "test_artifacts/methods_contract/out/debug/methods_contract.bin", + "test_artifacts/methods_contract/out/release/methods_contract.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/option_field_order/mod.rs b/test/src/sdk-harness/test_projects/option_field_order/mod.rs index 4836d00bcb1..b9bc4a06b25 100644 --- a/test/src/sdk-harness/test_projects/option_field_order/mod.rs +++ b/test/src/sdk-harness/test_projects/option_field_order/mod.rs @@ -2,7 +2,7 @@ use fuels::{accounts::wallet::WalletUnlocked, prelude::*}; abigen!(Contract( name = "MyContract", - abi = "test_projects/option_field_order/out/debug/option_field_order-abi.json" + abi = "test_projects/option_field_order/out/release/option_field_order-abi.json" )); #[tokio::test] @@ -15,7 +15,7 @@ async fn setup() -> MyContract { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/option_field_order/out/debug/option_field_order.bin", + "test_projects/option_field_order/out/release/option_field_order.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/option_in_abi/mod.rs b/test/src/sdk-harness/test_projects/option_in_abi/mod.rs index 47081c584ab..0ff25a02481 100644 --- a/test/src/sdk-harness/test_projects/option_in_abi/mod.rs +++ b/test/src/sdk-harness/test_projects/option_in_abi/mod.rs @@ -3,13 +3,13 @@ use std::str::FromStr; abigen!(Contract( name = "OptionInAbiTestContract", - abi = "test_projects/option_in_abi/out/debug/option_in_abi-abi.json" + abi = "test_projects/option_in_abi/out/release/option_in_abi-abi.json" )); async fn get_option_in_abi_instance() -> (OptionInAbiTestContract, ContractId) { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/option_in_abi/out/debug/option_in_abi.bin", + "test_projects/option_in_abi/out/release/option_in_abi.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/parsing_logs/mod.rs b/test/src/sdk-harness/test_projects/parsing_logs/mod.rs index 14685b3ebff..52102b3d273 100644 --- a/test/src/sdk-harness/test_projects/parsing_logs/mod.rs +++ b/test/src/sdk-harness/test_projects/parsing_logs/mod.rs @@ -6,13 +6,13 @@ use fuels::{ abigen!(Contract( name = "ParsingLogsTestContract", - abi = "test_projects/parsing_logs/out/debug/parsing_logs-abi.json" + abi = "test_projects/parsing_logs/out/release/parsing_logs-abi.json" )); async fn get_parsing_logs_instance() -> (ParsingLogsTestContract, ContractId) { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/parsing_logs/out/debug/parsing_logs.bin", + "test_projects/parsing_logs/out/release/parsing_logs.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/predicate_data_simple/mod.rs b/test/src/sdk-harness/test_projects/predicate_data_simple/mod.rs index 0506c782f6f..8fc3cd112fa 100644 --- a/test/src/sdk-harness/test_projects/predicate_data_simple/mod.rs +++ b/test/src/sdk-harness/test_projects/predicate_data_simple/mod.rs @@ -14,7 +14,7 @@ use std::str::FromStr; async fn setup() -> (Vec, Address, WalletUnlocked, u64, AssetId) { let predicate_code = - std::fs::read("test_projects/predicate_data_simple/out/debug/predicate_data_simple.bin") + std::fs::read("test_projects/predicate_data_simple/out/release/predicate_data_simple.bin") .unwrap(); let predicate_address = fuel_tx::Input::predicate_owner(&predicate_code); diff --git a/test/src/sdk-harness/test_projects/predicate_data_struct/mod.rs b/test/src/sdk-harness/test_projects/predicate_data_struct/mod.rs index 1b17d5d1651..96b404472ed 100644 --- a/test/src/sdk-harness/test_projects/predicate_data_struct/mod.rs +++ b/test/src/sdk-harness/test_projects/predicate_data_struct/mod.rs @@ -14,7 +14,7 @@ use std::str::FromStr; async fn setup() -> (Vec, Address, WalletUnlocked, u64, AssetId) { let predicate_code = - std::fs::read("test_projects/predicate_data_struct/out/debug/predicate_data_struct.bin") + std::fs::read("test_projects/predicate_data_struct/out/release/predicate_data_struct.bin") .unwrap(); let predicate_address = fuel_tx::Input::predicate_owner(&predicate_code); diff --git a/test/src/sdk-harness/test_projects/registers/mod.rs b/test/src/sdk-harness/test_projects/registers/mod.rs index 2cb8ebd766a..4bc8df8d7ee 100644 --- a/test/src/sdk-harness/test_projects/registers/mod.rs +++ b/test/src/sdk-harness/test_projects/registers/mod.rs @@ -3,7 +3,7 @@ use fuels::{accounts::wallet::WalletUnlocked, prelude::*}; abigen!(Contract( name = "TestRegistersContract", - abi = "test_projects/registers/out/debug/registers-abi.json", + abi = "test_projects/registers/out/release/registers-abi.json", )); // Compile contract, create node and deploy contract, returning TestRegistersContract contract instance @@ -13,7 +13,7 @@ abigen!(Contract( async fn deploy_test_registers_instance() -> TestRegistersContract { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/registers/out/debug/registers.bin", + "test_projects/registers/out/release/registers.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/result_in_abi/mod.rs b/test/src/sdk-harness/test_projects/result_in_abi/mod.rs index f6d4e379f15..b9321e4a6d7 100644 --- a/test/src/sdk-harness/test_projects/result_in_abi/mod.rs +++ b/test/src/sdk-harness/test_projects/result_in_abi/mod.rs @@ -3,13 +3,13 @@ use std::str::FromStr; abigen!(Contract( name = "ResultInAbiTestContract", - abi = "test_projects/result_in_abi/out/debug/result_in_abi-abi.json" + abi = "test_projects/result_in_abi/out/release/result_in_abi-abi.json" )); async fn get_result_in_abi_instance() -> (ResultInAbiTestContract, ContractId) { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/result_in_abi/out/debug/result_in_abi.bin", + "test_projects/result_in_abi/out/release/result_in_abi.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/script_bytecode/mod.rs b/test/src/sdk-harness/test_projects/script_bytecode/mod.rs index a6331de42cc..22d1d03ea7c 100644 --- a/test/src/sdk-harness/test_projects/script_bytecode/mod.rs +++ b/test/src/sdk-harness/test_projects/script_bytecode/mod.rs @@ -34,7 +34,7 @@ pub async fn run_compiled_script(binary_filepath: &str) -> Result, async fn check_script_bytecode_hash() { // Calculate padded script hash (since memory is read in whole words, the bytecode will be padded) let mut script_bytecode = - std::fs::read("test_projects/script_bytecode/out/debug/script_bytecode.bin") + std::fs::read("test_projects/script_bytecode/out/release/script_bytecode.bin") .unwrap() .to_vec(); let padding = script_bytecode.len() % 8; @@ -42,7 +42,7 @@ async fn check_script_bytecode_hash() { let script_hash = Hasher::hash(&script_bytecode); // This is the hard that must be hard-coded in the predicate // Run script and get the hash it returns - let path_to_bin = "test_projects/script_bytecode/out/debug/script_bytecode.bin"; + let path_to_bin = "test_projects/script_bytecode/out/release/script_bytecode.bin"; let return_val = run_compiled_script(path_to_bin).await.unwrap(); let script_hash_from_vm = unsafe { Bytes32::from_slice_unchecked(return_val[0].data().unwrap()) }; diff --git a/test/src/sdk-harness/test_projects/script_data/mod.rs b/test/src/sdk-harness/test_projects/script_data/mod.rs index e594c53a276..b98d69aa85c 100644 --- a/test/src/sdk-harness/test_projects/script_data/mod.rs +++ b/test/src/sdk-harness/test_projects/script_data/mod.rs @@ -20,7 +20,7 @@ async fn call_script(script_data: Vec) -> Result> { provider.network_info().await.unwrap(), ) .with_script(std::fs::read( - "test_projects/script_data/out/debug/script_data.bin", + "test_projects/script_data/out/release/script_data.bin", )?) .with_script_data(script_data); diff --git a/test/src/sdk-harness/test_projects/storage/mod.rs b/test/src/sdk-harness/test_projects/storage/mod.rs index 7468f3856ef..dc1507bb64c 100644 --- a/test/src/sdk-harness/test_projects/storage/mod.rs +++ b/test/src/sdk-harness/test_projects/storage/mod.rs @@ -6,13 +6,13 @@ use fuels::{ abigen!(Contract( name = "TestStorageContract", - abi = "test_projects/storage/out/debug/storage-abi.json", + abi = "test_projects/storage/out/release/storage-abi.json", )); async fn get_test_storage_instance() -> TestStorageContract { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/storage/out/debug/storage.bin", + "test_projects/storage/out/release/storage.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/storage_access/mod.rs b/test/src/sdk-harness/test_projects/storage_access/mod.rs index 4130c53fdca..c2c063d8b2b 100644 --- a/test/src/sdk-harness/test_projects/storage_access/mod.rs +++ b/test/src/sdk-harness/test_projects/storage_access/mod.rs @@ -2,13 +2,13 @@ use fuels::{accounts::wallet::WalletUnlocked, prelude::*, types::Bits256}; abigen!(Contract( name = "TestStorageAccessContract", - abi = "test_projects/storage_access/out/debug/storage_access-abi.json", + abi = "test_projects/storage_access/out/release/storage_access-abi.json", )); async fn test_storage_access_instance() -> TestStorageAccessContract { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/storage_access/out/debug/storage_access.bin", + "test_projects/storage_access/out/release/storage_access.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/storage_bytes/mod.rs b/test/src/sdk-harness/test_projects/storage_bytes/mod.rs index 53847609c01..82b5e650f33 100644 --- a/test/src/sdk-harness/test_projects/storage_bytes/mod.rs +++ b/test/src/sdk-harness/test_projects/storage_bytes/mod.rs @@ -3,14 +3,14 @@ use fuels::prelude::*; abigen!(Contract( name = "TestStorageBytesContract", - abi = "test_projects/storage_bytes/out/debug/storage_bytes-abi.json", + abi = "test_projects/storage_bytes/out/release/storage_bytes-abi.json", )); async fn setup() -> TestStorageBytesContract { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/storage_bytes/out/debug/storage_bytes.bin", + "test_projects/storage_bytes/out/release/storage_bytes.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/storage_init/mod.rs b/test/src/sdk-harness/test_projects/storage_init/mod.rs index 1ace0d14a63..c3f30e31103 100644 --- a/test/src/sdk-harness/test_projects/storage_init/mod.rs +++ b/test/src/sdk-harness/test_projects/storage_init/mod.rs @@ -3,17 +3,17 @@ use fuels::prelude::*; abigen!(Contract( name = "TestStorageInitContract", - abi = "test_projects/storage_init/out/debug/storage_init-abi.json", + abi = "test_projects/storage_init/out/release/storage_init-abi.json", )); async fn test_storage_init_instance() -> TestStorageInitContract { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/storage_init/out/debug/storage_init.bin", + "test_projects/storage_init/out/release/storage_init.bin", LoadConfiguration::default().with_storage_configuration( StorageConfiguration::default() .add_slot_overrides_from_file( - "test_projects/storage_init/out/debug/storage_init-storage_slots.json", + "test_projects/storage_init/out/release/storage_init-storage_slots.json", ) .unwrap(), ), diff --git a/test/src/sdk-harness/test_projects/storage_map/mod.rs b/test/src/sdk-harness/test_projects/storage_map/mod.rs index 3644cf92e60..9303c56cafa 100644 --- a/test/src/sdk-harness/test_projects/storage_map/mod.rs +++ b/test/src/sdk-harness/test_projects/storage_map/mod.rs @@ -8,13 +8,13 @@ pub mod try_insert; abigen!(Contract( name = "TestStorageMapContract", - abi = "test_projects/storage_map/out/debug/storage_map-abi.json", + abi = "test_projects/storage_map/out/release/storage_map-abi.json", )); async fn test_storage_map_instance() -> TestStorageMapContract { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/storage_map/out/debug/storage_map.bin", + "test_projects/storage_map/out/release/storage_map.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/storage_map_nested/mod.rs b/test/src/sdk-harness/test_projects/storage_map_nested/mod.rs index ff87ba24516..ac6bfeaa7e1 100644 --- a/test/src/sdk-harness/test_projects/storage_map_nested/mod.rs +++ b/test/src/sdk-harness/test_projects/storage_map_nested/mod.rs @@ -2,13 +2,13 @@ use fuels::{accounts::wallet::WalletUnlocked, prelude::*}; abigen!(Contract( name = "TestStorageMapNestedContract", - abi = "test_projects/storage_map_nested/out/debug/storage_map_nested-abi.json", + abi = "test_projects/storage_map_nested/out/release/storage_map_nested-abi.json", )); async fn test_storage_map_nested_instance() -> TestStorageMapNestedContract { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/storage_map_nested/out/debug/storage_map_nested.bin", + "test_projects/storage_map_nested/out/release/storage_map_nested.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/storage_string/mod.rs b/test/src/sdk-harness/test_projects/storage_string/mod.rs index fb62eb46403..31150ea3476 100644 --- a/test/src/sdk-harness/test_projects/storage_string/mod.rs +++ b/test/src/sdk-harness/test_projects/storage_string/mod.rs @@ -3,13 +3,13 @@ use fuels::prelude::*; abigen!(Contract( name = "TestStorageStringContract", - abi = "test_projects/storage_string/out/debug/storage_string-abi.json", + abi = "test_projects/storage_string/out/release/storage_string-abi.json", )); async fn setup() -> TestStorageStringContract { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/storage_string/out/debug/storage_string.bin", + "test_projects/storage_string/out/release/storage_string.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/storage_vec/svec_array.rs b/test/src/sdk-harness/test_projects/storage_vec/svec_array.rs index dd10ae9adcb..031fa1609cb 100644 --- a/test/src/sdk-harness/test_projects/storage_vec/svec_array.rs +++ b/test/src/sdk-harness/test_projects/storage_vec/svec_array.rs @@ -1,6 +1,6 @@ testgen!( test_array_vec, - "test_artifacts/storage_vec/svec_array/out/debug/svec_array-abi.json", + "test_artifacts/storage_vec/svec_array/out/release/svec_array-abi.json", "array", [u8; 3], [1; 3], diff --git a/test/src/sdk-harness/test_projects/storage_vec/svec_b256.rs b/test/src/sdk-harness/test_projects/storage_vec/svec_b256.rs index db350690a3f..81f4e3bc9f2 100644 --- a/test/src/sdk-harness/test_projects/storage_vec/svec_b256.rs +++ b/test/src/sdk-harness/test_projects/storage_vec/svec_b256.rs @@ -1,6 +1,6 @@ testgen!( test_b256_vec, - "test_artifacts/storage_vec/svec_b256/out/debug/svec_b256-abi.json", + "test_artifacts/storage_vec/svec_b256/out/release/svec_b256-abi.json", "b256", ::fuels::types::Bits256, ::fuels::types::Bits256([1; 32]), diff --git a/test/src/sdk-harness/test_projects/storage_vec/svec_bool.rs b/test/src/sdk-harness/test_projects/storage_vec/svec_bool.rs index 38f49eb0a4c..454c7e8108c 100644 --- a/test/src/sdk-harness/test_projects/storage_vec/svec_bool.rs +++ b/test/src/sdk-harness/test_projects/storage_vec/svec_bool.rs @@ -1,6 +1,6 @@ testgen!( test_bool_vec, - "test_artifacts/storage_vec/svec_bool/out/debug/svec_bool-abi.json", + "test_artifacts/storage_vec/svec_bool/out/release/svec_bool-abi.json", "bool", bool, true, diff --git a/test/src/sdk-harness/test_projects/storage_vec/svec_enum.rs b/test/src/sdk-harness/test_projects/storage_vec/svec_enum.rs index b1f6d724285..d9ca38e9d56 100644 --- a/test/src/sdk-harness/test_projects/storage_vec/svec_enum.rs +++ b/test/src/sdk-harness/test_projects/storage_vec/svec_enum.rs @@ -1,6 +1,6 @@ testgen!( test_enum_vec, - "test_artifacts/storage_vec/svec_enum/out/debug/svec_enum-abi.json", + "test_artifacts/storage_vec/svec_enum/out/release/svec_enum-abi.json", "enum", TestEnum, TestEnum::A(true), diff --git a/test/src/sdk-harness/test_projects/storage_vec/svec_str.rs b/test/src/sdk-harness/test_projects/storage_vec/svec_str.rs index f48be0a8556..9abff4089f7 100644 --- a/test/src/sdk-harness/test_projects/storage_vec/svec_str.rs +++ b/test/src/sdk-harness/test_projects/storage_vec/svec_str.rs @@ -1,6 +1,6 @@ testgen!( test_str_vec, - "test_artifacts/storage_vec/svec_str/out/debug/svec_str-abi.json", + "test_artifacts/storage_vec/svec_str/out/release/svec_str-abi.json", "str", ::fuels::types::SizedAsciiString::<4>, ::fuels::types::SizedAsciiString::<4>::new("yeet".to_string()).unwrap(), diff --git a/test/src/sdk-harness/test_projects/storage_vec/svec_struct.rs b/test/src/sdk-harness/test_projects/storage_vec/svec_struct.rs index 70589368837..467b4834f8c 100644 --- a/test/src/sdk-harness/test_projects/storage_vec/svec_struct.rs +++ b/test/src/sdk-harness/test_projects/storage_vec/svec_struct.rs @@ -1,6 +1,6 @@ testgen!( test_struct_vec, - "test_artifacts/storage_vec/svec_struct/out/debug/svec_struct-abi.json", + "test_artifacts/storage_vec/svec_struct/out/release/svec_struct-abi.json", "struct", TestStruct, TestStruct { a: true, b: 1 }, diff --git a/test/src/sdk-harness/test_projects/storage_vec/svec_tuple.rs b/test/src/sdk-harness/test_projects/storage_vec/svec_tuple.rs index 7c6777def3e..99f75195296 100644 --- a/test/src/sdk-harness/test_projects/storage_vec/svec_tuple.rs +++ b/test/src/sdk-harness/test_projects/storage_vec/svec_tuple.rs @@ -1,6 +1,6 @@ testgen!( test_tuple_vec, - "test_artifacts/storage_vec/svec_tuple/out/debug/svec_tuple-abi.json", + "test_artifacts/storage_vec/svec_tuple/out/release/svec_tuple-abi.json", "tuple", (u8, u8, u8), (1, 1, 1), diff --git a/test/src/sdk-harness/test_projects/storage_vec/svec_u16.rs b/test/src/sdk-harness/test_projects/storage_vec/svec_u16.rs index 751bc7061e0..c9083c0de9e 100644 --- a/test/src/sdk-harness/test_projects/storage_vec/svec_u16.rs +++ b/test/src/sdk-harness/test_projects/storage_vec/svec_u16.rs @@ -1,6 +1,6 @@ testgen!( test_u16_vec, - "test_artifacts/storage_vec/svec_u16/out/debug/svec_u16-abi.json", + "test_artifacts/storage_vec/svec_u16/out/release/svec_u16-abi.json", "u16", u16, 1u16, diff --git a/test/src/sdk-harness/test_projects/storage_vec/svec_u32.rs b/test/src/sdk-harness/test_projects/storage_vec/svec_u32.rs index f5c2851fec1..92260e8f608 100644 --- a/test/src/sdk-harness/test_projects/storage_vec/svec_u32.rs +++ b/test/src/sdk-harness/test_projects/storage_vec/svec_u32.rs @@ -1,6 +1,6 @@ testgen!( test_u32_vec, - "test_artifacts/storage_vec/svec_u32/out/debug/svec_u32-abi.json", + "test_artifacts/storage_vec/svec_u32/out/release/svec_u32-abi.json", "u32", u32, 1u32, diff --git a/test/src/sdk-harness/test_projects/storage_vec/svec_u64.rs b/test/src/sdk-harness/test_projects/storage_vec/svec_u64.rs index 27dda72089e..3708d61520d 100644 --- a/test/src/sdk-harness/test_projects/storage_vec/svec_u64.rs +++ b/test/src/sdk-harness/test_projects/storage_vec/svec_u64.rs @@ -1,6 +1,6 @@ testgen!( test_u64_vec, - "test_artifacts/storage_vec/svec_u64/out/debug/svec_u64-abi.json", + "test_artifacts/storage_vec/svec_u64/out/release/svec_u64-abi.json", "u64", u64, 1u64, diff --git a/test/src/sdk-harness/test_projects/storage_vec/svec_u8.rs b/test/src/sdk-harness/test_projects/storage_vec/svec_u8.rs index b9f691b38be..c50903aa58b 100644 --- a/test/src/sdk-harness/test_projects/storage_vec/svec_u8.rs +++ b/test/src/sdk-harness/test_projects/storage_vec/svec_u8.rs @@ -1,6 +1,6 @@ testgen!( test_u8_vec, - "test_artifacts/storage_vec/svec_u8/out/debug/svec_u8-abi.json", + "test_artifacts/storage_vec/svec_u8/out/release/svec_u8-abi.json", "u8", u8, 1u8, diff --git a/test/src/sdk-harness/test_projects/storage_vec/testgen.rs b/test/src/sdk-harness/test_projects/storage_vec/testgen.rs index fa940f788cd..a92aba7f62f 100644 --- a/test/src/sdk-harness/test_projects/storage_vec/testgen.rs +++ b/test/src/sdk-harness/test_projects/storage_vec/testgen.rs @@ -34,7 +34,7 @@ macro_rules! testgen { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( &format!( - "test_artifacts/storage_vec/svec_{}/out/debug/svec_{}.bin", + "test_artifacts/storage_vec/svec_{}/out/release/svec_{}.bin", $type_label, $type_label, ), @@ -42,7 +42,7 @@ macro_rules! testgen { .with_storage_configuration(StorageConfiguration::default() .add_slot_overrides_from_file( &format!( - "test_artifacts/storage_vec/svec_{}/out/debug/svec_{}-storage_slots.json", + "test_artifacts/storage_vec/svec_{}/out/release/svec_{}-storage_slots.json", $type_label, $type_label, ) diff --git a/test/src/sdk-harness/test_projects/storage_vec_nested/mod.rs b/test/src/sdk-harness/test_projects/storage_vec_nested/mod.rs index 7da54f33141..e2e183b3005 100644 --- a/test/src/sdk-harness/test_projects/storage_vec_nested/mod.rs +++ b/test/src/sdk-harness/test_projects/storage_vec_nested/mod.rs @@ -3,13 +3,13 @@ use fuels::prelude::*; abigen!(Contract( name = "TestStorageVecNestedContract", - abi = "test_projects/storage_vec_nested/out/debug/storage_vec_nested-abi.json", + abi = "test_projects/storage_vec_nested/out/release/storage_vec_nested-abi.json", )); async fn test_storage_vec_nested_instance() -> TestStorageVecNestedContract { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/storage_vec_nested/out/debug/storage_vec_nested.bin", + "test_projects/storage_vec_nested/out/release/storage_vec_nested.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/storage_vec_to_vec/mod.rs b/test/src/sdk-harness/test_projects/storage_vec_to_vec/mod.rs index af8136c9e87..f905b6bacbb 100644 --- a/test/src/sdk-harness/test_projects/storage_vec_to_vec/mod.rs +++ b/test/src/sdk-harness/test_projects/storage_vec_to_vec/mod.rs @@ -3,13 +3,13 @@ use fuels::prelude::*; abigen!(Contract( name = "TestStorageVecToVecContract", - abi = "test_projects/storage_vec_to_vec/out/debug/storage_vec_to_vec-abi.json", + abi = "test_projects/storage_vec_to_vec/out/release/storage_vec_to_vec-abi.json", )); async fn test_storage_vec_to_vec_instance() -> TestStorageVecToVecContract { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/storage_vec_to_vec/out/debug/storage_vec_to_vec.bin", + "test_projects/storage_vec_to_vec/out/release/storage_vec_to_vec.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/superabi/mod.rs b/test/src/sdk-harness/test_projects/superabi/mod.rs index 1dfad38b6aa..674a34ae578 100644 --- a/test/src/sdk-harness/test_projects/superabi/mod.rs +++ b/test/src/sdk-harness/test_projects/superabi/mod.rs @@ -3,13 +3,13 @@ use fuels::prelude::*; abigen!(Contract( name = "SuperAbiTestContract", - abi = "test_projects/superabi/out/debug/superabi-abi.json" + abi = "test_projects/superabi/out/release/superabi-abi.json" )); async fn get_superabi_instance() -> SuperAbiTestContract { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/superabi/out/debug/superabi.bin", + "test_projects/superabi/out/release/superabi.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/superabi_supertrait/mod.rs b/test/src/sdk-harness/test_projects/superabi_supertrait/mod.rs index 420bb13ff4c..09db2de6399 100644 --- a/test/src/sdk-harness/test_projects/superabi_supertrait/mod.rs +++ b/test/src/sdk-harness/test_projects/superabi_supertrait/mod.rs @@ -3,13 +3,13 @@ use fuels::prelude::*; abigen!(Contract( name = "SuperAbiSuperTraitTestContract", - abi = "test_projects/superabi_supertrait/out/debug/superabi_supertrait-abi.json" + abi = "test_projects/superabi_supertrait/out/release/superabi_supertrait-abi.json" )); async fn get_superabi_supertrait_instance() -> SuperAbiSuperTraitTestContract { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/superabi_supertrait/out/debug/superabi_supertrait.bin", + "test_projects/superabi_supertrait/out/release/superabi_supertrait.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/tx_fields/mod.rs b/test/src/sdk-harness/test_projects/tx_fields/mod.rs index b60783123df..5409b13dc2a 100644 --- a/test/src/sdk-harness/test_projects/tx_fields/mod.rs +++ b/test/src/sdk-harness/test_projects/tx_fields/mod.rs @@ -14,15 +14,15 @@ const MESSAGE_DATA: [u8; 3] = [1u8, 2u8, 3u8]; abigen!( Contract( name = "TxContractTest", - abi = "test_artifacts/tx_contract/out/debug/tx_contract-abi.json", + abi = "test_artifacts/tx_contract/out/release/tx_contract-abi.json", ), Predicate( name = "TestPredicate", - abi = "test_projects/tx_fields/out/debug/tx_fields-abi.json" + abi = "test_projects/tx_fields/out/release/tx_fields-abi.json" ), Predicate( name = "TestOutputPredicate", - abi = "test_artifacts/tx_output_predicate/out/debug/tx_output_predicate-abi.json" + abi = "test_artifacts/tx_output_predicate/out/release/tx_output_predicate-abi.json" ) ); @@ -71,7 +71,7 @@ async fn get_contracts( deployment_wallet.set_provider(provider); let contract_id = Contract::load_from( - "test_artifacts/tx_contract/out/debug/tx_contract.bin", + "test_artifacts/tx_contract/out/release/tx_contract.bin", LoadConfiguration::default(), ) .unwrap() @@ -89,7 +89,7 @@ async fn generate_predicate_inputs( wallet: &WalletUnlocked, ) -> (Vec, SdkInput, TxInput) { let provider = wallet.provider().unwrap(); - let predicate = Predicate::load_from("test_projects/tx_fields/out/debug/tx_fields.bin") + let predicate = Predicate::load_from("test_projects/tx_fields/out/release/tx_fields.bin") .unwrap() .with_provider(provider.clone()); @@ -167,7 +167,7 @@ async fn setup_output_predicate() -> (WalletUnlocked, WalletUnlocked, Predicate, ); let predicate = Predicate::load_from( - "test_artifacts/tx_output_predicate/out/debug/tx_output_predicate.bin", + "test_artifacts/tx_output_predicate/out/release/tx_output_predicate.bin", ) .unwrap() .with_data(predicate_data) diff --git a/test/src/sdk-harness/test_projects/type_aliases/mod.rs b/test/src/sdk-harness/test_projects/type_aliases/mod.rs index 02b4431a784..ea26152f6ae 100644 --- a/test/src/sdk-harness/test_projects/type_aliases/mod.rs +++ b/test/src/sdk-harness/test_projects/type_aliases/mod.rs @@ -6,13 +6,13 @@ use fuels::{ abigen!(Contract( name = "TypeAliasesTestContract", - abi = "test_projects/type_aliases/out/debug/type_aliases-abi.json" + abi = "test_projects/type_aliases/out/release/type_aliases-abi.json" )); async fn get_type_aliases_instance() -> (TypeAliasesTestContract, ContractId) { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/type_aliases/out/debug/type_aliases.bin", + "test_projects/type_aliases/out/release/type_aliases.bin", LoadConfiguration::default(), ) .unwrap() diff --git a/test/src/sdk-harness/test_projects/vec_in_abi/mod.rs b/test/src/sdk-harness/test_projects/vec_in_abi/mod.rs index c3b677a55cb..716be40aba8 100644 --- a/test/src/sdk-harness/test_projects/vec_in_abi/mod.rs +++ b/test/src/sdk-harness/test_projects/vec_in_abi/mod.rs @@ -3,13 +3,13 @@ use std::str::FromStr; abigen!(Contract( name = "VecInAbiTestContract", - abi = "test_projects/vec_in_abi/out/debug/vec_in_abi-abi.json" + abi = "test_projects/vec_in_abi/out/release/vec_in_abi-abi.json" )); async fn get_vec_in_abi_instance() -> (VecInAbiTestContract, ContractId) { let wallet = launch_provider_and_get_wallet().await.unwrap(); let id = Contract::load_from( - "test_projects/vec_in_abi/out/debug/vec_in_abi.bin", + "test_projects/vec_in_abi/out/release/vec_in_abi.bin", LoadConfiguration::default(), ) .unwrap()