From ab7c584e1cf2607b82d7414367e8388813dbacdb Mon Sep 17 00:00:00 2001 From: bitzoic Date: Thu, 27 Jun 2024 16:47:49 +0800 Subject: [PATCH 01/11] Add ContractCreated to Output enum --- sway-lib-std/src/outputs.sw | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sway-lib-std/src/outputs.sw b/sway-lib-std/src/outputs.sw index 7524ad31935..5fb2a7f09b7 100644 --- a/sway-lib-std/src/outputs.sw +++ b/sway-lib-std/src/outputs.sw @@ -38,6 +38,8 @@ pub enum Output { Change: (), /// A variable output. Variable: (), + /// A contract deployment. + ContractCreated: (), } /// Get the type of an output at `index`. @@ -66,6 +68,7 @@ pub enum Output { /// Output::Contract => { log("The output is a contract") }, /// Output::Change => { log("The output is change") }, /// Output::Variable => { log("The output is a variable") }, +/// Output::ContractCreated => { log("The output is a contract creation") }, /// }; /// } /// ``` @@ -75,6 +78,7 @@ pub fn output_type(index: u64) -> Output { 1u8 => Output::Contract, 2u8 => Output::Change, 3u8 => Output::Variable, + 4u8 => Output::ContractCreated, _ => revert(0), } } @@ -193,6 +197,7 @@ pub fn output_amount(index: u64) -> u64 { r1: u64 } }, + Output::ContractCreated => revert(0), } } @@ -257,3 +262,16 @@ pub fn output_asset_to(index: u64) -> Option
{ _ => None, } } + +impl core::ops::Eq for Output { + fn eq(self, other: Self) -> bool { + match (self, other) { + (Output::Coin, Output::Coin) => true, + (Output::Contract, Output::Contract) => true, + (Output::Change, Output::Change) => true, + (Output::Variable, Output::Variable) => true, + (Output::ContractCreated, Output::ContractCreated) => true, + _ => false, + } + } +} From 9c95a80f1393eda5a143c2c1ccaf1cfb3002b7ca Mon Sep 17 00:00:00 2001 From: bitzoic Date: Thu, 27 Jun 2024 16:48:14 +0800 Subject: [PATCH 02/11] Add tests for ContractCreated output_type() --- test/src/sdk-harness/Forc.toml | 1 + .../Forc.lock | 13 +++ .../Forc.toml | 8 ++ .../src/main.sw | 7 ++ .../test_projects/tx_fields/mod.rs | 109 +++++++++++++++++- 5 files changed, 136 insertions(+), 2 deletions(-) create mode 100644 test/src/sdk-harness/test_artifacts/tx_output_contract_creation_predicate/Forc.lock create mode 100644 test/src/sdk-harness/test_artifacts/tx_output_contract_creation_predicate/Forc.toml create mode 100644 test/src/sdk-harness/test_artifacts/tx_output_contract_creation_predicate/src/main.sw diff --git a/test/src/sdk-harness/Forc.toml b/test/src/sdk-harness/Forc.toml index 7b2d658c627..954b0427ce7 100644 --- a/test/src/sdk-harness/Forc.toml +++ b/test/src/sdk-harness/Forc.toml @@ -76,4 +76,5 @@ members = [ "test_artifacts/storage_vec/svec_u64", "test_artifacts/tx_contract", "test_artifacts/tx_output_predicate", + "test_artifacts/tx_output_contract_creation_predicate", ] diff --git a/test/src/sdk-harness/test_artifacts/tx_output_contract_creation_predicate/Forc.lock b/test/src/sdk-harness/test_artifacts/tx_output_contract_creation_predicate/Forc.lock new file mode 100644 index 00000000000..b07177b8bba --- /dev/null +++ b/test/src/sdk-harness/test_artifacts/tx_output_contract_creation_predicate/Forc.lock @@ -0,0 +1,13 @@ +[[package]] +name = "core" +source = "path+from-root-1EABD6DBC885D01E" + +[[package]] +name = "std" +source = "path+from-root-1EABD6DBC885D01E" +dependencies = ["core"] + +[[package]] +name = "tx_output_contract_creation_predicate" +source = "member" +dependencies = ["std"] diff --git a/test/src/sdk-harness/test_artifacts/tx_output_contract_creation_predicate/Forc.toml b/test/src/sdk-harness/test_artifacts/tx_output_contract_creation_predicate/Forc.toml new file mode 100644 index 00000000000..66c581065d8 --- /dev/null +++ b/test/src/sdk-harness/test_artifacts/tx_output_contract_creation_predicate/Forc.toml @@ -0,0 +1,8 @@ +[project] +authors = ["Fuel Labs "] +entry = "main.sw" +license = "Apache-2.0" +name = "tx_output_contract_creation_predicate" + +[dependencies] +std = { path = "../../../../../sway-lib-std" } diff --git a/test/src/sdk-harness/test_artifacts/tx_output_contract_creation_predicate/src/main.sw b/test/src/sdk-harness/test_artifacts/tx_output_contract_creation_predicate/src/main.sw new file mode 100644 index 00000000000..5b8e5c37aa5 --- /dev/null +++ b/test/src/sdk-harness/test_artifacts/tx_output_contract_creation_predicate/src/main.sw @@ -0,0 +1,7 @@ +predicate; + +use std::outputs::{Output, output_type}; + +fn main() -> bool { + output_type(2) == Output::ContractCreated +} 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 c83fb9977ba..1b25d37503b 100644 --- a/test/src/sdk-harness/test_projects/tx_fields/mod.rs +++ b/test/src/sdk-harness/test_projects/tx_fields/mod.rs @@ -4,10 +4,14 @@ use fuels::types::transaction_builders::TransactionBuilder; use fuels::{ accounts::{predicate::Predicate, wallet::WalletUnlocked, Account}, prelude::*, - types::{input::Input as SdkInput, Bits256}, + types::{input::Input as SdkInput, Bits256, output::Output as SdkOutput}, + tx::StorageSlot, }; +use std::fs; const MESSAGE_DATA: [u8; 3] = [1u8, 2u8, 3u8]; +const TX_CONTRACT_BYTECODE_PATH: &str = + "test_artifacts/tx_contract/out/release/tx_contract.bin"; abigen!( Contract( @@ -69,7 +73,7 @@ async fn get_contracts( deployment_wallet.set_provider(provider); let contract_id = Contract::load_from( - "test_artifacts/tx_contract/out/release/tx_contract.bin", + TX_CONTRACT_BYTECODE_PATH, LoadConfiguration::default(), ) .unwrap() @@ -905,6 +909,107 @@ mod outputs { assert_eq!(result.value, Output::Contract); } + #[tokio::test] + async fn can_get_tx_output_type_for_contract_deployment() { + // Setup Wallet + let wallet = launch_custom_provider_and_get_wallets( + WalletsConfig::new( + Some(1), /* Single wallet */ + Some(1), /* Single coin (UTXO) */ + Some(1_000_000_000), /* Amount per coin */ + ), + None, + None, + ) + .await + .unwrap() + .pop() + .unwrap(); + let provider = wallet.try_provider().unwrap(); + + // Get the predicate + let predicate: Predicate = Predicate::load_from("test_artifacts/tx_output_contract_creation_predicate/out/release/tx_output_contract_creation_predicate.bin").unwrap() + .with_provider(provider.clone()); + let predicate_coin_amount = 100; + + // Predicate has no funds + let predicate_balance = predicate.get_asset_balance(&provider.base_asset_id()).await.unwrap(); + assert_eq!(predicate_balance, 0); + + // Transfer funds to predicate + wallet + .transfer( + predicate.address(), + predicate_coin_amount, + *provider.base_asset_id(), + TxPolicies::default(), + ) + .await.unwrap(); + + // Predicate has funds + let predicate_balance = predicate.get_asset_balance(&provider.base_asset_id()).await.unwrap(); + assert_eq!(predicate_balance, predicate_coin_amount); + + // Get contract ready for deployment + let contract = Contract::load_from( + TX_CONTRACT_BYTECODE_PATH, + LoadConfiguration::default(), + ) + .unwrap(); + + let binary = fs::read(TX_CONTRACT_BYTECODE_PATH).unwrap(); + let salt = Salt::new([2u8; 32]); + let storage_slots = Vec::::new(); + let contract = Contract::new(binary.clone(), salt, storage_slots.clone()); + + // Start building the transaction + let tb: CreateTransactionBuilder = CreateTransactionBuilder::prepare_contract_deployment( + binary, + contract.contract_id(), + contract.state_root(), + salt, + storage_slots, + TxPolicies::default(), + ); + + // Inputs + let inputs = predicate + .get_asset_inputs_for_amount(*provider.base_asset_id(), predicate_coin_amount) + .await.unwrap(); + + // Outputs + let mut outputs = wallet.get_asset_outputs_for_amount( + &wallet.address(), + *provider.base_asset_id(), + predicate_coin_amount, + ); + outputs.push(SdkOutput::contract_created(contract.contract_id(), contract.state_root())); + + let mut tb = tb.with_inputs(inputs).with_outputs(outputs); + + wallet.add_witnesses(&mut tb).unwrap(); + wallet.adjust_for_fee(&mut tb, 1).await.unwrap(); + + // Build transaction + let tx = tb.build(provider).await.unwrap(); + + // Send trandaction + provider + .send_transaction_and_await_commit(tx) + .await + .unwrap() + .check(None) + .unwrap(); + + // Verify contract was deployed + let instance = TxContractTest::new(contract.contract_id(), wallet.clone()); + assert!(instance.methods().get_output_type(0).call().await.is_ok()); + + // Verify predicate funds transfered + let predicate_balance = predicate.get_asset_balance(&AssetId::default()).await.unwrap(); + assert_eq!(predicate_balance, 0); + } + #[tokio::test] async fn can_get_tx_output_details() { let (wallet, _, predicate, asset_id, _) = setup_output_predicate().await; From 8e4d73e221c8ebbf9f47f501c27057e773aba969 Mon Sep 17 00:00:00 2001 From: bitzoic Date: Thu, 27 Jun 2024 16:56:14 +0800 Subject: [PATCH 03/11] Add Output inline tests --- test/src/in_language_tests/Forc.toml | 1 + .../output_inline_tests/Forc.toml | 8 ++++ .../output_inline_tests/src/main.sw | 46 +++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 test/src/in_language_tests/test_programs/output_inline_tests/Forc.toml create mode 100644 test/src/in_language_tests/test_programs/output_inline_tests/src/main.sw diff --git a/test/src/in_language_tests/Forc.toml b/test/src/in_language_tests/Forc.toml index e015fae4ff0..c66ae53fcdb 100644 --- a/test/src/in_language_tests/Forc.toml +++ b/test/src/in_language_tests/Forc.toml @@ -16,6 +16,7 @@ members = [ "test_programs/identity_inline_tests", "test_programs/math_inline_tests", "test_programs/option_inline_tests", + "test_programs/output_inline_tests", "test_programs/result_inline_tests", "test_programs/revert_inline_tests", "test_programs/string_inline_tests", diff --git a/test/src/in_language_tests/test_programs/output_inline_tests/Forc.toml b/test/src/in_language_tests/test_programs/output_inline_tests/Forc.toml new file mode 100644 index 00000000000..fb1e5bc6a0f --- /dev/null +++ b/test/src/in_language_tests/test_programs/output_inline_tests/Forc.toml @@ -0,0 +1,8 @@ +[project] +authors = ["Fuel Labs "] +entry = "main.sw" +license = "Apache-2.0" +name = "output_inline_tests" + +[dependencies] +std = { path = "../../../../../sway-lib-std" } diff --git a/test/src/in_language_tests/test_programs/output_inline_tests/src/main.sw b/test/src/in_language_tests/test_programs/output_inline_tests/src/main.sw new file mode 100644 index 00000000000..1a02f200069 --- /dev/null +++ b/test/src/in_language_tests/test_programs/output_inline_tests/src/main.sw @@ -0,0 +1,46 @@ +library; + +use std::outputs::Output; + +#[test] +fn output_output_eq() { + let output_1 = Output::Coin; + let output_2 = Output::Coin; + let output_3 = Output::Contract; + let output_4 = Output::Contract; + let output_5 = Output::Change; + let output_6 = Output::Change; + let output_7 = Output::Variable; + let output_8 = Output::Variable; + let output_9 = Output::ContractCreated; + let output_10 = Output::ContractCreated; + + assert(output_1 == output_2); + assert(output_3 == output_4); + assert(output_5 == output_6); + assert(output_7 == output_8); + assert(output_9 == output_10); +} + +#[test] +fn output_output_neq() { + let output_1 = Output::Coin; + let output_2 = Output::Contract; + let output_3 = Output::Change; + let output_4 = Output::Variable; + let output_5 = Output::ContractCreated; + + assert(output_1 != output_2); + assert(output_1 != output_3); + assert(output_1 != output_4); + assert(output_1 != output_5); + + assert(output_2 != output_3); + assert(output_2 != output_4); + assert(output_2 != output_5); + + assert(output_3 != output_4); + assert(output_3 != output_5); + + assert(output_4 != output_5); +} From 4ba8c5e3e39718a7fec860d6094b6401a1c733ff Mon Sep 17 00:00:00 2001 From: bitzoic Date: Thu, 27 Jun 2024 17:01:00 +0800 Subject: [PATCH 04/11] Clean up tx_fields tests --- test/src/sdk-harness/test_projects/tx_fields/mod.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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 1b25d37503b..54e0818e2a5 100644 --- a/test/src/sdk-harness/test_projects/tx_fields/mod.rs +++ b/test/src/sdk-harness/test_projects/tx_fields/mod.rs @@ -12,6 +12,12 @@ use std::fs; const MESSAGE_DATA: [u8; 3] = [1u8, 2u8, 3u8]; const TX_CONTRACT_BYTECODE_PATH: &str = "test_artifacts/tx_contract/out/release/tx_contract.bin"; +const TX_OUTPUT_PREDICATE_BYTECODE_PATH: &str = + "test_artifacts/tx_output_predicate/out/release/tx_output_predicate.bin"; +const TX_FIELDS_PREDICATE_BYTECODE_PATH: &str = + "test_projects/tx_fields/out/release/tx_fields.bin"; +const TX_CONTRACT_CREATION_PREDICATE_BYTECODE_PATH: &str = + "test_artifacts/tx_output_contract_creation_predicate/out/release/tx_output_contract_creation_predicate.bin"; abigen!( Contract( @@ -91,7 +97,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/release/tx_fields.bin") + let predicate = Predicate::load_from(TX_FIELDS_PREDICATE_BYTECODE_PATH) .unwrap() .with_provider(provider.clone()); @@ -167,7 +173,7 @@ async fn setup_output_predicate() -> (WalletUnlocked, WalletUnlocked, Predicate, .unwrap(); let predicate = Predicate::load_from( - "test_artifacts/tx_output_predicate/out/release/tx_output_predicate.bin", + TX_OUTPUT_PREDICATE_BYTECODE_PATH, ) .unwrap() .with_data(predicate_data) @@ -928,7 +934,7 @@ mod outputs { let provider = wallet.try_provider().unwrap(); // Get the predicate - let predicate: Predicate = Predicate::load_from("test_artifacts/tx_output_contract_creation_predicate/out/release/tx_output_contract_creation_predicate.bin").unwrap() + let predicate: Predicate = Predicate::load_from(TX_CONTRACT_CREATION_PREDICATE_BYTECODE_PATH).unwrap() .with_provider(provider.clone()); let predicate_coin_amount = 100; From 1d2a9f75144b4964fed664ed9f55a5624c6d04cd Mon Sep 17 00:00:00 2001 From: bitzoic Date: Thu, 27 Jun 2024 17:04:05 +0800 Subject: [PATCH 05/11] Fix typo --- test/src/sdk-harness/test_projects/tx_fields/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 54e0818e2a5..52e66be34c4 100644 --- a/test/src/sdk-harness/test_projects/tx_fields/mod.rs +++ b/test/src/sdk-harness/test_projects/tx_fields/mod.rs @@ -1011,7 +1011,7 @@ mod outputs { let instance = TxContractTest::new(contract.contract_id(), wallet.clone()); assert!(instance.methods().get_output_type(0).call().await.is_ok()); - // Verify predicate funds transfered + // Verify predicate funds transferred let predicate_balance = predicate.get_asset_balance(&AssetId::default()).await.unwrap(); assert_eq!(predicate_balance, 0); } From 8704aad9ea40ad1277aa52a1194020bac7462de0 Mon Sep 17 00:00:00 2001 From: bitzoic Date: Thu, 27 Jun 2024 17:07:12 +0800 Subject: [PATCH 06/11] Remove duplicate contract instances in tests --- test/src/sdk-harness/test_projects/tx_fields/mod.rs | 6 ------ 1 file changed, 6 deletions(-) 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 52e66be34c4..8b0bd1bf60d 100644 --- a/test/src/sdk-harness/test_projects/tx_fields/mod.rs +++ b/test/src/sdk-harness/test_projects/tx_fields/mod.rs @@ -957,12 +957,6 @@ mod outputs { assert_eq!(predicate_balance, predicate_coin_amount); // Get contract ready for deployment - let contract = Contract::load_from( - TX_CONTRACT_BYTECODE_PATH, - LoadConfiguration::default(), - ) - .unwrap(); - let binary = fs::read(TX_CONTRACT_BYTECODE_PATH).unwrap(); let salt = Salt::new([2u8; 32]); let storage_slots = Vec::::new(); From cbe20130c84d26625b40a75000a316fe2b48c132 Mon Sep 17 00:00:00 2001 From: bitzoic Date: Thu, 27 Jun 2024 17:11:38 +0800 Subject: [PATCH 07/11] Update Forc.lock --- test/src/sdk-harness/Forc.lock | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/src/sdk-harness/Forc.lock b/test/src/sdk-harness/Forc.lock index bb27462e499..1bd0f8e296a 100644 --- a/test/src/sdk-harness/Forc.lock +++ b/test/src/sdk-harness/Forc.lock @@ -404,6 +404,11 @@ name = "tx_fields" source = "member" dependencies = ["std"] +[[package]] +name = "tx_output_contract_creation_predicate" +source = "member" +dependencies = ["std"] + [[package]] name = "tx_output_predicate" source = "member" From 5dc5b99416da70e337c54807c496266c4fdaf06b Mon Sep 17 00:00:00 2001 From: bitzoic Date: Fri, 28 Jun 2024 15:26:37 +0800 Subject: [PATCH 08/11] Update e2e test contract id --- .../require_contract_deployment/asset_ops_test/src/main.sw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/asset_ops_test/src/main.sw b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/asset_ops_test/src/main.sw index 51a2c5dfbb8..3592957c36e 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/asset_ops_test/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/asset_ops_test/src/main.sw @@ -14,7 +14,7 @@ const FUEL_COIN_CONTRACT_ID = 0x1a88d0982d216958d18378b6784614b75868a542dc05f8cc #[cfg(experimental_new_encoding = false)] const BALANCE_CONTRACT_ID = 0xf6cd545152ac83225e8e7df2efb5c6fa6e37bc9b9e977b5ea8103d28668925df; #[cfg(experimental_new_encoding = true)] -const BALANCE_CONTRACT_ID = 0x04594851a2bd620dffc360f3976d747598b9184218dc55ff3e839f417ca345ac; +const BALANCE_CONTRACT_ID = 0xbac7800e48f9a98d99ded3bf123f0f25bf0170de6ef991a3035f76d4570c8b1e; fn main() -> bool { let default_gas = 1_000_000_000_000; From f09481eb4443eeaf25f6fc0c74b54f3393b8309d Mon Sep 17 00:00:00 2001 From: bitzoic Date: Mon, 1 Jul 2024 16:23:16 +0800 Subject: [PATCH 09/11] Update contract id in asset_ops_test --- .../require_contract_deployment/asset_ops_test/src/main.sw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/asset_ops_test/src/main.sw b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/asset_ops_test/src/main.sw index 3592957c36e..31e0cabe5d2 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/asset_ops_test/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/asset_ops_test/src/main.sw @@ -9,7 +9,7 @@ use test_fuel_coin_abi::*; #[cfg(experimental_new_encoding = false)] const FUEL_COIN_CONTRACT_ID = 0xec2277ebe007ade87e3d797c3b1e070dcd542d5ef8f038b471f262ef9cebc87c; #[cfg(experimental_new_encoding = true)] -const FUEL_COIN_CONTRACT_ID = 0x1a88d0982d216958d18378b6784614b75868a542dc05f8cc85cf3da44268c76c; +const FUEL_COIN_CONTRACT_ID = 0x04594851a2bd620dffc360f3976d747598b9184218dc55ff3e839f417ca345ac; #[cfg(experimental_new_encoding = false)] const BALANCE_CONTRACT_ID = 0xf6cd545152ac83225e8e7df2efb5c6fa6e37bc9b9e977b5ea8103d28668925df; From 928cc39cdc50cb467336c159ef2aa7104fb2834a Mon Sep 17 00:00:00 2001 From: bitzoic Date: Mon, 1 Jul 2024 16:51:12 +0800 Subject: [PATCH 10/11] Update for latest version of fuels-rs --- test/src/sdk-harness/test_projects/tx_fields/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 8c39383b991..09d67f47b55 100644 --- a/test/src/sdk-harness/test_projects/tx_fields/mod.rs +++ b/test/src/sdk-harness/test_projects/tx_fields/mod.rs @@ -974,7 +974,7 @@ mod outputs { // Inputs let inputs = predicate - .get_asset_inputs_for_amount(*provider.base_asset_id(), predicate_coin_amount) + .get_asset_inputs_for_amount(*provider.base_asset_id(), predicate_coin_amount, None) .await.unwrap(); // Outputs From c72e0aede4e2d4a89cc47340f3cb045636b40bfc Mon Sep 17 00:00:00 2001 From: bitzoic Date: Wed, 3 Jul 2024 18:45:36 +0800 Subject: [PATCH 11/11] Flip Contract IDs in asset ops tests --- .../require_contract_deployment/asset_ops_test/src/main.sw | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/asset_ops_test/src/main.sw b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/asset_ops_test/src/main.sw index 31e0cabe5d2..3b46a25c5dc 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/asset_ops_test/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/asset_ops_test/src/main.sw @@ -9,12 +9,12 @@ use test_fuel_coin_abi::*; #[cfg(experimental_new_encoding = false)] const FUEL_COIN_CONTRACT_ID = 0xec2277ebe007ade87e3d797c3b1e070dcd542d5ef8f038b471f262ef9cebc87c; #[cfg(experimental_new_encoding = true)] -const FUEL_COIN_CONTRACT_ID = 0x04594851a2bd620dffc360f3976d747598b9184218dc55ff3e839f417ca345ac; +const FUEL_COIN_CONTRACT_ID = 0xbac7800e48f9a98d99ded3bf123f0f25bf0170de6ef991a3035f76d4570c8b1e; #[cfg(experimental_new_encoding = false)] const BALANCE_CONTRACT_ID = 0xf6cd545152ac83225e8e7df2efb5c6fa6e37bc9b9e977b5ea8103d28668925df; #[cfg(experimental_new_encoding = true)] -const BALANCE_CONTRACT_ID = 0xbac7800e48f9a98d99ded3bf123f0f25bf0170de6ef991a3035f76d4570c8b1e; +const BALANCE_CONTRACT_ID = 0x04594851a2bd620dffc360f3976d747598b9184218dc55ff3e839f417ca345ac; fn main() -> bool { let default_gas = 1_000_000_000_000;