From 7c88c0bf50f9bee83be0bf5951f6364b22c2925e Mon Sep 17 00:00:00 2001 From: xunilrj Date: Wed, 4 Sep 2024 12:38:34 +0100 Subject: [PATCH] test for contract address with complex expression --- .../array_of_structs_caller/src/main.sw | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/array_of_structs_caller/src/main.sw b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/array_of_structs_caller/src/main.sw index 31d2cbaf57d..65a00a0edc0 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/array_of_structs_caller/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/array_of_structs_caller/src/main.sw @@ -8,8 +8,13 @@ const CONTRACT_ID = 0x14ed3cd06c2947248f69d54bfa681fe40d26267be84df7e19e253622b7 #[cfg(experimental_new_encoding = true)] const CONTRACT_ID = 0xb7fd078d247144fb0b1505caf58ba37e1cb7a44495e135e8626fec02790b0ad4; // AUTO-CONTRACT-ID ../../test_contracts/array_of_structs_contract --release +fn get_address() -> Option { + Some(CONTRACT_ID.into()) +} + fn main() -> u64 { - let addr = abi(TestContract, CONTRACT_ID); + // Test address being a complex expression + let addr = abi(TestContract, get_address().unwrap().into()); let input = [Wrapper { id: Id {