diff --git a/sway-core/src/ir_generation/convert.rs b/sway-core/src/ir_generation/convert.rs index af987956c51..a1f535f426b 100644 --- a/sway-core/src/ir_generation/convert.rs +++ b/sway-core/src/ir_generation/convert.rs @@ -32,6 +32,7 @@ pub(super) fn convert_literal_to_value(context: &mut Context, ast_literal: &Lite Literal::String(s) => ConstantContent::get_string(context, s.as_str().as_bytes().to_vec()), Literal::Boolean(b) => ConstantContent::get_bool(context, *b), Literal::B256(bs) => ConstantContent::get_b256(context, *bs), + Literal::Binary(bytes) => ConstantContent::get_untyped_slice(context, bytes.clone()), } } @@ -50,6 +51,7 @@ pub(super) fn convert_literal_to_constant( Literal::String(s) => ConstantContent::new_string(context, s.as_str().as_bytes().to_vec()), Literal::Boolean(b) => ConstantContent::new_bool(context, *b), Literal::B256(bs) => ConstantContent::new_b256(context, *bs), + Literal::Binary(bytes) => ConstantContent::new_untyped_slice(context, bytes.clone()), }; Constant::unique(context, c) } diff --git a/sway-core/src/ir_generation/function.rs b/sway-core/src/ir_generation/function.rs index 75044834d56..9b5196d4658 100644 --- a/sway-core/src/ir_generation/function.rs +++ b/sway-core/src/ir_generation/function.rs @@ -457,12 +457,13 @@ impl<'a> FnCompiler<'a> { )) } - fn compile_string_slice( + // Can be used for raw untyped slice and string slice + fn compile_slice( &mut self, context: &mut Context, span_md_idx: Option, - string_data: Value, - string_len: u64, + slice_ptr: Value, + slice_len: u64, ) -> Result { let int_ty = Type::get_uint64(context); let ptr_ty = Type::get_ptr(context); @@ -471,9 +472,9 @@ impl<'a> FnCompiler<'a> { let ptr_val = self .current_block .append(context) - .cast_ptr(string_data, ptr_ty) + .cast_ptr(slice_ptr, ptr_ty) .add_metadatum(context, span_md_idx); - let len_val = ConstantContent::get_uint(context, 64, string_len); + let len_val = ConstantContent::get_uint(context, 64, slice_len); // a slice is a pointer and a length let field_types = vec![ptr_ty, int_ty]; @@ -569,7 +570,24 @@ impl<'a> FnCompiler<'a> { .append(context) .get_global(string_data_ptr); let string_len = s.as_str().len() as u64; - self.compile_string_slice(context, span_md_idx, string_ptr, string_len) + self.compile_slice(context, span_md_idx, string_ptr, string_len) + } + ty::TyExpressionVariant::Literal(Literal::Binary(bytes)) => { + let data = ConstantContent::get_untyped_slice(context, bytes.clone()) + .get_constant(context) + .unwrap(); + let data_ptr = self.module.new_unique_global_var( + context, + "__const_global".into(), + data.get_content(context).ty, + Some(*data), + false, + ); + + let slice_ptr = self.current_block.append(context).get_global(data_ptr); + let slice_len = bytes.len() as u64; + + self.compile_slice(context, span_md_idx, slice_ptr, slice_len) } ty::TyExpressionVariant::Literal(Literal::Numeric(n)) => { let implied_lit = match &*self.engines.te().get(ast_expr.return_type) { diff --git a/sway-core/src/language/literal.rs b/sway-core/src/language/literal.rs index df0bc8735fb..171aa9a76de 100644 --- a/sway-core/src/language/literal.rs +++ b/sway-core/src/language/literal.rs @@ -19,6 +19,7 @@ pub enum Literal { Numeric(u64), Boolean(bool), B256([u8; 32]), + Binary(Vec), } impl Literal { @@ -74,6 +75,10 @@ impl Hash for Literal { state.write_u8(8); x.hash(state); } + Binary(x) => { + state.write_u8(9); + x.hash(state); + } } } } @@ -90,6 +95,7 @@ impl PartialEq for Literal { (Self::Numeric(l0), Self::Numeric(r0)) => l0 == r0, (Self::Boolean(l0), Self::Boolean(r0)) => l0 == r0, (Self::B256(l0), Self::B256(r0)) => l0 == r0, + (Self::Binary(l0), Self::Binary(r0)) => l0 == r0, _ => false, } } @@ -111,6 +117,11 @@ impl fmt::Display for Literal { .map(|x| x.to_string()) .collect::>() .join(", "), + Literal::Binary(content) => content + .iter() + .map(|x| x.to_string()) + .collect::>() + .join(", "), }; write!(f, "{s}") } @@ -154,6 +165,7 @@ impl Literal { Literal::U256(_) => TypeInfo::UnsignedInteger(IntegerBits::V256), Literal::Boolean(_) => TypeInfo::Boolean, Literal::B256(_) => TypeInfo::B256, + Literal::Binary(_) => TypeInfo::RawUntypedSlice, } } } diff --git a/sway-core/src/semantic_analysis/ast_node/expression/match_expression/analysis/pattern.rs b/sway-core/src/semantic_analysis/ast_node/expression/match_expression/analysis/pattern.rs index 7de4cc88dc4..9b898852ed2 100644 --- a/sway-core/src/semantic_analysis/ast_node/expression/match_expression/analysis/pattern.rs +++ b/sway-core/src/semantic_analysis/ast_node/expression/match_expression/analysis/pattern.rs @@ -180,6 +180,9 @@ impl Pattern { Literal::Boolean(b) => Pattern::Boolean(b), Literal::Numeric(x) => Pattern::Numeric(Range::from_single(x)), Literal::String(s) => Pattern::String(s.as_str().to_string()), + Literal::Binary(_) => { + unreachable!("literals cannot be expressed in the language yet") + } } } diff --git a/sway-core/src/semantic_analysis/ast_node/expression/typed_expression.rs b/sway-core/src/semantic_analysis/ast_node/expression/typed_expression.rs index 7f6487899ae..c8b69d999be 100644 --- a/sway-core/src/semantic_analysis/ast_node/expression/typed_expression.rs +++ b/sway-core/src/semantic_analysis/ast_node/expression/typed_expression.rs @@ -635,6 +635,7 @@ impl ty::TyExpression { Literal::U256(_) => type_engine.id_of_u256(), Literal::Boolean(_) => type_engine.id_of_bool(), Literal::B256(_) => type_engine.id_of_b256(), + Literal::Binary(_) => type_engine.id_of_raw_slice(), }; ty::TyExpression { expression: ty::TyExpressionVariant::Literal(lit), diff --git a/sway-core/src/semantic_analysis/ast_node/expression/typed_expression/method_application.rs b/sway-core/src/semantic_analysis/ast_node/expression/typed_expression/method_application.rs index 9bfc54cc9e5..ee461a139db 100644 --- a/sway-core/src/semantic_analysis/ast_node/expression/typed_expression/method_application.rs +++ b/sway-core/src/semantic_analysis/ast_node/expression/typed_expression/method_application.rs @@ -533,10 +533,17 @@ pub(crate) fn type_check_method_application( } } - fn string_slice_literal(ident: &BaseIdent) -> Expression { + fn method_name_literal(method_name: &BaseIdent) -> Expression { + let method_name_str = method_name.as_str(); + let len_bytes = (method_name_str.len() as u64).to_be_bytes(); + + let mut blob = Vec::with_capacity(len_bytes.len() + method_name_str.len()); + blob.extend(len_bytes); + blob.extend(method_name_str.as_bytes()); + Expression { - kind: ExpressionKind::Literal(Literal::String(ident.span())), - span: ident.span(), + kind: ExpressionKind::Literal(Literal::Binary(blob)), + span: method_name.span(), } } @@ -581,7 +588,7 @@ pub(crate) fn type_check_method_application( &mut ctx, span, method.return_type.type_id, - string_slice_literal(&method.name), + method_name_literal(&method.name), old_arguments.first().cloned().unwrap(), args, arguments.iter().map(|x| x.1.return_type).collect(), diff --git a/sway-ir/src/constant.rs b/sway-ir/src/constant.rs index 94a8f017f00..83e485975b9 100644 --- a/sway-ir/src/constant.rs +++ b/sway-ir/src/constant.rs @@ -120,6 +120,13 @@ impl ConstantContent { } } + pub fn new_untyped_slice(context: &mut Context, bytes: Vec) -> Self { + ConstantContent { + ty: Type::new_untyped_slice(context), + value: ConstantValue::RawUntypedSlice(bytes), + } + } + pub fn new_array(context: &mut Context, elm_ty: Type, elems: Vec) -> Self { ConstantContent { ty: Type::new_array(context, elm_ty, elems.len() as u64), @@ -181,6 +188,12 @@ impl ConstantContent { Value::new_constant(context, new_const) } + pub fn get_untyped_slice(context: &mut Context, value: Vec) -> Value { + let new_const_contents = ConstantContent::new_untyped_slice(context, value); + let new_const = Constant::unique(context, new_const_contents); + Value::new_constant(context, new_const) + } + /// `value` must be created as an array constant first, using [`Constant::new_array()`]. pub fn get_array(context: &mut Context, value: ConstantContent) -> Value { assert!(value.ty.is_array(context)); diff --git a/sway-ir/src/irtype.rs b/sway-ir/src/irtype.rs index 99126928500..b57d2f9fd39 100644 --- a/sway-ir/src/irtype.rs +++ b/sway-ir/src/irtype.rs @@ -140,6 +140,10 @@ impl Type { Self::get_type(context, &TypeContent::Pointer).expect("create_basic_types not called") } + pub fn new_untyped_slice(context: &mut Context) -> Type { + Self::get_or_create_unique_type(context, TypeContent::Slice) + } + /// Get string type pub fn new_string_array(context: &mut Context, len: u64) -> Type { Self::get_or_create_unique_type(context, TypeContent::StringArray(len)) diff --git a/sway-lib-std/src/codec.sw b/sway-lib-std/src/codec.sw index fef49ad4d12..1b45e57a97f 100644 --- a/sway-lib-std/src/codec.sw +++ b/sway-lib-std/src/codec.sw @@ -5347,7 +5347,7 @@ use ::ops::*; pub fn contract_call( contract_id: b256, - method_name: str, + method_name: raw_slice, args: TArgs, coins: u64, asset_id: b256, @@ -5357,11 +5357,10 @@ where T: AbiDecode, TArgs: AbiEncode, { - let first_parameter = encode(method_name); let second_parameter = encode(args); let params = ( contract_id, - asm(a: first_parameter.ptr()) { + asm(a: method_name.ptr()) { a: u64 }, asm(a: second_parameter.ptr()) { diff --git a/sway-lsp/src/traverse/parsed_tree.rs b/sway-lsp/src/traverse/parsed_tree.rs index 22ff185b198..dc93bb2ca58 100644 --- a/sway-lsp/src/traverse/parsed_tree.rs +++ b/sway-lsp/src/traverse/parsed_tree.rs @@ -1252,5 +1252,6 @@ fn literal_to_symbol_kind(value: &Literal) -> SymbolKind { Literal::String(..) => SymbolKind::StringLiteral, Literal::B256(..) => SymbolKind::ByteLiteral, Literal::Boolean(..) => SymbolKind::BoolLiteral, + Literal::Binary(_) => unreachable!("literals cannot be expressed in the language yet"), } } diff --git a/sway-lsp/src/utils/debug.rs b/sway-lsp/src/utils/debug.rs index e98390d6694..dcb2ab0cebd 100644 --- a/sway-lsp/src/utils/debug.rs +++ b/sway-lsp/src/utils/debug.rs @@ -67,6 +67,7 @@ fn literal_to_string(literal: &Literal) -> String { Literal::String(len) => format!("str[{}]", len.as_str().len()), Literal::Boolean(_) => "bool".into(), Literal::B256(_) => "b256".into(), + Literal::Binary(_) => unreachable!("literals cannot be expressed in the language yet"), } } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/panic_expression/panicking_contract/stdout.snap b/test/src/e2e_vm_tests/test_programs/should_pass/language/panic_expression/panicking_contract/stdout.snap index 3dd256e3096..4a1e25319ca 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/panic_expression/panicking_contract/stdout.snap +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/panic_expression/panicking_contract/stdout.snap @@ -8,17 +8,17 @@ output: Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling library panicking_lib (test/src/e2e_vm_tests/test_programs/should_pass/language/panic_expression/panicking_lib) Compiling contract panicking_contract (test/src/e2e_vm_tests/test_programs/should_pass/language/panic_expression/panicking_contract) - Finished debug [unoptimized + fuel] target(s) [8.512 KB] in ??? + Finished debug [unoptimized + fuel] target(s) [8.88 KB] in ??? Running 12 tests, filtered 0 tests tested -- panicking_contract - test test_panicking_in_contract_self_impl ... ok (???, 1245 gas) + test test_panicking_in_contract_self_impl ... ok (???, 1032 gas) revert code: 8000000000000001 ├─ panic message: panicking in contract self impl ├─ panicked: in ::panicking_in_contract_self_impl │ └─ at panicking_contract@1.2.3, src/main.sw:22:9 - test test_directly_panicking_method ... ok (???, 1774 gas) + test test_directly_panicking_method ... ok (???, 1561 gas) revert code: 8080000000000002 ├─ panic message: Error C. ├─ panic value: C(true) @@ -26,7 +26,7 @@ tested -- panicking_contract │ └─ at panicking_contract@1.2.3, src/main.sw:28:9 decoded log values: C(true), log rb: 5503570629422409978 - test test_nested_panic_inlined ... ok (???, 3470 gas) + test test_nested_panic_inlined ... ok (???, 3257 gas) revert code: 830000000540a013 ├─ panic message: Error E. ├─ panic value: E([AsciiString { data: "to have" }, AsciiString { data: "strings" }, AsciiString { data: "in error enum variants" }]) @@ -38,7 +38,7 @@ C(true), log rb: 5503570629422409978 └─ at panicking_contract@1.2.3, src/main.sw:32:9 decoded log values: E([AsciiString { data: "to have" }, AsciiString { data: "strings" }, AsciiString { data: "in error enum variants" }]), log rb: 5503570629422409978 - test test_nested_panic_inlined_same_revert_code ... ok (???, 3470 gas) + test test_nested_panic_inlined_same_revert_code ... ok (???, 3257 gas) revert code: 830000000540a013 ├─ panic message: Error E. ├─ panic value: E([AsciiString { data: "to have" }, AsciiString { data: "strings" }, AsciiString { data: "in error enum variants" }]) @@ -50,7 +50,7 @@ E([AsciiString { data: "to have" }, AsciiString { data: "strings" }, AsciiString └─ at panicking_contract@1.2.3, src/main.sw:32:9 decoded log values: E([AsciiString { data: "to have" }, AsciiString { data: "strings" }, AsciiString { data: "in error enum variants" }]), log rb: 5503570629422409978 - test test_nested_panic_non_inlined ... ok (???, 3798 gas) + test test_nested_panic_non_inlined ... ok (???, 3585 gas) revert code: 838000000680c818 ├─ panic message: Error E. ├─ panic value: E([AsciiString { data: "this" }, AsciiString { data: "is not" }, AsciiString { data: "the best practice" }]) @@ -62,7 +62,7 @@ E([AsciiString { data: "to have" }, AsciiString { data: "strings" }, AsciiString └─ at panicking_contract@1.2.3, src/main.sw:40:9 decoded log values: E([AsciiString { data: "this" }, AsciiString { data: "is not" }, AsciiString { data: "the best practice" }]), log rb: 5503570629422409978 - test test_nested_panic_non_inlined_same_revert_code ... ok (???, 3798 gas) + test test_nested_panic_non_inlined_same_revert_code ... ok (???, 3585 gas) revert code: 838000000680c818 ├─ panic message: Error E. ├─ panic value: E([AsciiString { data: "this" }, AsciiString { data: "is not" }, AsciiString { data: "the best practice" }]) @@ -74,7 +74,7 @@ E([AsciiString { data: "this" }, AsciiString { data: "is not" }, AsciiString { d └─ at panicking_contract@1.2.3, src/main.sw:40:9 decoded log values: E([AsciiString { data: "this" }, AsciiString { data: "is not" }, AsciiString { data: "the best practice" }]), log rb: 5503570629422409978 - test test_generic_panic_with_unit ... ok (???, 2469 gas) + test test_generic_panic_with_unit ... ok (???, 2256 gas) revert code: 828000000000800f ├─ panic value: () ├─ panicked: in panicking_lib::generic_panic @@ -83,7 +83,7 @@ E([AsciiString { data: "this" }, AsciiString { data: "is not" }, AsciiString { d └─ at panicking_contract@1.2.3, src/main.sw:48:9 decoded log values: (), log rb: 3330666440490685604 - test test_generic_panic_with_unit_same_revert_code ... ok (???, 2469 gas) + test test_generic_panic_with_unit_same_revert_code ... ok (???, 2256 gas) revert code: 828000000000800f ├─ panic value: () ├─ panicked: in panicking_lib::generic_panic @@ -92,7 +92,7 @@ E([AsciiString { data: "this" }, AsciiString { data: "is not" }, AsciiString { d └─ at panicking_contract@1.2.3, src/main.sw:48:9 decoded log values: (), log rb: 3330666440490685604 - test test_generic_panic_with_str ... ok (???, 2421 gas) + test test_generic_panic_with_str ... ok (???, 2208 gas) revert code: 818000000000700d ├─ panic message: generic panic with string ├─ panicked: in panicking_lib::generic_panic @@ -101,7 +101,7 @@ E([AsciiString { data: "this" }, AsciiString { data: "is not" }, AsciiString { d └─ at panicking_contract@1.2.3, src/main.sw:56:9 decoded log values: AsciiString { data: "generic panic with string" }, log rb: 10098701174489624218 - test test_generic_panic_with_different_str_same_revert_code ... ok (???, 1962 gas) + test test_generic_panic_with_different_str_same_revert_code ... ok (???, 1749 gas) revert code: 8180000000004007 ├─ panic message: generic panic with different string ├─ panicked: in panicking_lib::generic_panic @@ -110,7 +110,7 @@ AsciiString { data: "generic panic with string" }, log rb: 10098701174489624218 └─ at panicking_contract@1.2.3, src/main.sw:60:9 decoded log values: AsciiString { data: "generic panic with different string" }, log rb: 10098701174489624218 - test test_generic_panic_with_error_type_enum ... ok (???, 2146 gas) + test test_generic_panic_with_error_type_enum ... ok (???, 1933 gas) revert code: 8200000000005009 ├─ panic message: Error A. ├─ panic value: A @@ -120,7 +120,7 @@ AsciiString { data: "generic panic with different string" }, log rb: 10098701174 └─ at panicking_contract@1.2.3, src/main.sw:64:9 decoded log values: A, log rb: 5503570629422409978 - test test_generic_panic_with_error_type_enum_different_variant_same_revert_code ... ok (???, 2378 gas) + test test_generic_panic_with_error_type_enum_different_variant_same_revert_code ... ok (???, 2165 gas) revert code: 820000000000600b ├─ panic message: Error B. ├─ panic value: B(42) @@ -142,17 +142,17 @@ output: Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling library panicking_lib (test/src/e2e_vm_tests/test_programs/should_pass/language/panic_expression/panicking_lib) Compiling contract panicking_contract (test/src/e2e_vm_tests/test_programs/should_pass/language/panic_expression/panicking_contract) - Finished release [optimized + fuel] target(s) [7.024 KB] in ??? + Finished release [optimized + fuel] target(s) [7.4 KB] in ??? Running 12 tests, filtered 0 tests tested -- panicking_contract - test test_panicking_in_contract_self_impl ... ok (???, 869 gas) + test test_panicking_in_contract_self_impl ... ok (???, 673 gas) revert code: 8000000000000000 ├─ panic message: panicking in contract self impl └─ panicked: in ::panicking_in_contract_self_impl └─ at panicking_contract@1.2.3, src/main.sw:22:9 - test test_directly_panicking_method ... ok (???, 1291 gas) + test test_directly_panicking_method ... ok (???, 1095 gas) revert code: 8080000000000000 ├─ panic message: Error C. ├─ panic value: C(true) @@ -160,7 +160,7 @@ tested -- panicking_contract └─ at panicking_contract@1.2.3, src/main.sw:28:9 decoded log values: C(true), log rb: 5503570629422409978 - test test_nested_panic_inlined ... ok (???, 2537 gas) + test test_nested_panic_inlined ... ok (???, 2341 gas) revert code: 8300000000000000 ├─ panic message: Error E. ├─ panic value: E([AsciiString { data: "to have" }, AsciiString { data: "strings" }, AsciiString { data: "in error enum variants" }]) @@ -168,7 +168,7 @@ C(true), log rb: 5503570629422409978 └─ at panicking_lib, src/lib.sw:35:5 decoded log values: E([AsciiString { data: "to have" }, AsciiString { data: "strings" }, AsciiString { data: "in error enum variants" }]), log rb: 5503570629422409978 - test test_nested_panic_inlined_same_revert_code ... ok (???, 2537 gas) + test test_nested_panic_inlined_same_revert_code ... ok (???, 2341 gas) revert code: 8300000000000000 ├─ panic message: Error E. ├─ panic value: E([AsciiString { data: "to have" }, AsciiString { data: "strings" }, AsciiString { data: "in error enum variants" }]) @@ -176,7 +176,7 @@ E([AsciiString { data: "to have" }, AsciiString { data: "strings" }, AsciiString └─ at panicking_lib, src/lib.sw:35:5 decoded log values: E([AsciiString { data: "to have" }, AsciiString { data: "strings" }, AsciiString { data: "in error enum variants" }]), log rb: 5503570629422409978 - test test_nested_panic_non_inlined ... ok (???, 2767 gas) + test test_nested_panic_non_inlined ... ok (???, 2571 gas) revert code: 8380000000000000 ├─ panic message: Error E. ├─ panic value: E([AsciiString { data: "this" }, AsciiString { data: "is not" }, AsciiString { data: "the best practice" }]) @@ -184,7 +184,7 @@ E([AsciiString { data: "to have" }, AsciiString { data: "strings" }, AsciiString └─ at panicking_lib, src/lib.sw:41:9 decoded log values: E([AsciiString { data: "this" }, AsciiString { data: "is not" }, AsciiString { data: "the best practice" }]), log rb: 5503570629422409978 - test test_nested_panic_non_inlined_same_revert_code ... ok (???, 2767 gas) + test test_nested_panic_non_inlined_same_revert_code ... ok (???, 2571 gas) revert code: 8380000000000000 ├─ panic message: Error E. ├─ panic value: E([AsciiString { data: "this" }, AsciiString { data: "is not" }, AsciiString { data: "the best practice" }]) @@ -192,35 +192,35 @@ E([AsciiString { data: "this" }, AsciiString { data: "is not" }, AsciiString { d └─ at panicking_lib, src/lib.sw:41:9 decoded log values: E([AsciiString { data: "this" }, AsciiString { data: "is not" }, AsciiString { data: "the best practice" }]), log rb: 5503570629422409978 - test test_generic_panic_with_unit ... ok (???, 1739 gas) + test test_generic_panic_with_unit ... ok (???, 1543 gas) revert code: 8280000000000000 ├─ panic value: () └─ panicked: in panicking_lib::generic_panic └─ at panicking_lib, src/lib.sw:74:5 decoded log values: (), log rb: 3330666440490685604 - test test_generic_panic_with_unit_same_revert_code ... ok (???, 1739 gas) + test test_generic_panic_with_unit_same_revert_code ... ok (???, 1543 gas) revert code: 8280000000000000 ├─ panic value: () └─ panicked: in panicking_lib::generic_panic └─ at panicking_lib, src/lib.sw:74:5 decoded log values: (), log rb: 3330666440490685604 - test test_generic_panic_with_str ... ok (???, 1743 gas) + test test_generic_panic_with_str ... ok (???, 1547 gas) revert code: 8180000000000000 ├─ panic message: generic panic with string └─ panicked: in panicking_lib::generic_panic └─ at panicking_lib, src/lib.sw:74:5 decoded log values: AsciiString { data: "generic panic with string" }, log rb: 10098701174489624218 - test test_generic_panic_with_different_str_same_revert_code ... ok (???, 1425 gas) + test test_generic_panic_with_different_str_same_revert_code ... ok (???, 1229 gas) revert code: 8180000000000000 ├─ panic message: generic panic with different string └─ panicked: in panicking_lib::generic_panic └─ at panicking_lib, src/lib.sw:74:5 decoded log values: AsciiString { data: "generic panic with different string" }, log rb: 10098701174489624218 - test test_generic_panic_with_error_type_enum ... ok (???, 1546 gas) + test test_generic_panic_with_error_type_enum ... ok (???, 1350 gas) revert code: 8200000000000000 ├─ panic message: Error A. ├─ panic value: A @@ -228,7 +228,7 @@ AsciiString { data: "generic panic with different string" }, log rb: 10098701174 └─ at panicking_lib, src/lib.sw:74:5 decoded log values: A, log rb: 5503570629422409978 - test test_generic_panic_with_error_type_enum_different_variant_same_revert_code ... ok (???, 1709 gas) + test test_generic_panic_with_error_type_enum_different_variant_same_revert_code ... ok (???, 1513 gas) revert code: 8200000000000000 ├─ panic message: Error B. ├─ panic value: B(42) diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call/stdout.snap b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call/stdout.snap index fbc5f34e8a8..abb135b5b79 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call/stdout.snap +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call/stdout.snap @@ -7,40 +7,40 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [36.248 KB] in ??? + Finished release [optimized + fuel] target(s) [35.272 KB] in ??? Running 29 tests, filtered 0 tests tested -- const_of_contract_call - test cost_of_in_bool ... ok (???, 2279 gas) - test cost_of_in_u8 ... ok (???, 4526 gas) - test cost_of_in_u16 ... ok (???, 4141 gas) - test cost_of_in_u32 ... ok (???, 4582 gas) - test cost_of_in_u64 ... ok (???, 4589 gas) - test cost_of_in_u256 ... ok (???, 4433 gas) - test cost_of_in_b256 ... ok (???, 2147 gas) - test cost_of_in_str_0 ... ok (???, 2697 gas) - test cost_of_in_str_1 ... ok (???, 2998 gas) - test cost_of_in_str_8 ... ok (???, 3421 gas) - test cost_of_in_str_16 ... ok (???, 3030 gas) - test cost_of_in_str_32 ... ok (???, 3227 gas) - test cost_of_in_array_0 ... FAILED (???, 1285 gas) - test cost_of_in_array_1 ... ok (???, 1779 gas) - test cost_of_in_array_8 ... ok (???, 4382 gas) - test cost_of_in_array_16 ... ok (???, 4753 gas) - test cost_of_in_array_32 ... ok (???, 8079 gas) - test cost_of_in_array_64 ... ok (???, 14545 gas) - test cost_of_in_tuple_0 ... ok (???, 3479 gas) - test cost_of_in_tuple_1 ... ok (???, 4050 gas) - test cost_of_in_tuple_2 ... ok (???, 4418 gas) - test cost_of_in_tuple_3 ... ok (???, 4761 gas) - test cost_of_in_tuple_4 ... ok (???, 5126 gas) - test in_struct_u64 ... ok (???, 3293 gas) - test in_struct_u64_u64 ... ok (???, 3554 gas) - test in_struct_u64_u64_u64 ... ok (???, 3813 gas) - test in_enum_u64 ... ok (???, 2843 gas) - test in_enum_u64_u64 ... ok (???, 2718 gas) - test in_enum_u64_u64_u64 ... ok (???, 2830 gas) + test cost_of_in_bool ... ok (???, 2082 gas) + test cost_of_in_u8 ... ok (???, 4331 gas) + test cost_of_in_u16 ... ok (???, 3948 gas) + test cost_of_in_u32 ... ok (???, 4389 gas) + test cost_of_in_u64 ... ok (???, 4397 gas) + test cost_of_in_u256 ... ok (???, 4240 gas) + test cost_of_in_b256 ... ok (???, 1954 gas) + test cost_of_in_str_0 ... ok (???, 2505 gas) + test cost_of_in_str_1 ... ok (???, 2806 gas) + test cost_of_in_str_8 ... ok (???, 3229 gas) + test cost_of_in_str_16 ... ok (???, 2837 gas) + test cost_of_in_str_32 ... ok (???, 3035 gas) + test cost_of_in_array_0 ... FAILED (???, 1095 gas) + test cost_of_in_array_1 ... ok (???, 1589 gas) + test cost_of_in_array_8 ... ok (???, 4192 gas) + test cost_of_in_array_16 ... ok (???, 4563 gas) + test cost_of_in_array_32 ... ok (???, 7889 gas) + test cost_of_in_array_64 ... ok (???, 14352 gas) + test cost_of_in_tuple_0 ... ok (???, 3289 gas) + test cost_of_in_tuple_1 ... ok (???, 3860 gas) + test cost_of_in_tuple_2 ... ok (???, 4228 gas) + test cost_of_in_tuple_3 ... ok (???, 4571 gas) + test cost_of_in_tuple_4 ... ok (???, 4935 gas) + test in_struct_u64 ... ok (???, 3103 gas) + test in_struct_u64_u64 ... ok (???, 3364 gas) + test in_struct_u64_u64_u64 ... ok (???, 3623 gas) + test in_enum_u64 ... ok (???, 2653 gas) + test in_enum_u64_u64 ... ok (???, 2528 gas) + test in_enum_u64_u64_u64 ... ok (???, 2640 gas) failures: test cost_of_in_array_0, "test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call/src/main.sw":347 @@ -62,12 +62,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.016 KB] in ??? + Finished release [optimized + fuel] target(s) [1.768 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_array_0 ... FAILED (???, 956 gas) + test isolated_cost_of_in_array_0 ... FAILED (???, 795 gas) failures: test isolated_cost_of_in_array_0, "test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call/src/main.sw":175 @@ -89,12 +89,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.192 KB] in ??? + Finished release [optimized + fuel] target(s) [1.944 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_array_1 ... ok (???, 1185 gas) + test isolated_cost_of_in_array_1 ... ok (???, 1025 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -109,12 +109,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.216 KB] in ??? + Finished release [optimized + fuel] target(s) [1.968 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_array_16 ... ok (???, 3266 gas) + test isolated_cost_of_in_array_16 ... ok (???, 3105 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -129,12 +129,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.216 KB] in ??? + Finished release [optimized + fuel] target(s) [1.968 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_array_32 ... ok (???, 5471 gas) + test isolated_cost_of_in_array_32 ... ok (???, 5311 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -149,12 +149,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.288 KB] in ??? + Finished release [optimized + fuel] target(s) [2.008 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_array_64 ... ok (???, 9914 gas) + test isolated_cost_of_in_array_64 ... ok (???, 9745 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -169,12 +169,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.352 KB] in ??? + Finished release [optimized + fuel] target(s) [2.104 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_array_8 ... ok (???, 2728 gas) + test isolated_cost_of_in_array_8 ... ok (???, 2568 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -189,12 +189,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.064 KB] in ??? + Finished release [optimized + fuel] target(s) [1.808 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_b256 ... ok (???, 1120 gas) + test isolated_cost_of_in_b256 ... ok (???, 959 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -209,12 +209,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [1.952 KB] in ??? + Finished release [optimized + fuel] target(s) [1.696 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_bool ... ok (???, 1047 gas) + test isolated_cost_of_in_bool ... ok (???, 886 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -229,12 +229,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.256 KB] in ??? + Finished release [optimized + fuel] target(s) [2.008 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test in_enum_u64 ... ok (???, 1333 gas) + test in_enum_u64 ... ok (???, 1173 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -249,12 +249,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.408 KB] in ??? + Finished release [optimized + fuel] target(s) [2.16 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test in_enum_u64_u64 ... ok (???, 1347 gas) + test in_enum_u64_u64 ... ok (???, 1187 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -269,12 +269,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.584 KB] in ??? + Finished release [optimized + fuel] target(s) [2.344 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test in_enum_u64_u64_u64 ... ok (???, 1350 gas) + test in_enum_u64_u64_u64 ... ok (???, 1190 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -289,12 +289,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [1.984 KB] in ??? + Finished release [optimized + fuel] target(s) [1.728 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_str_0 ... ok (???, 1140 gas) + test isolated_cost_of_in_str_0 ... ok (???, 980 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -309,12 +309,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.184 KB] in ??? + Finished release [optimized + fuel] target(s) [1.928 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_str_1 ... ok (???, 1237 gas) + test isolated_cost_of_in_str_1 ... ok (???, 1076 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -329,12 +329,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.224 KB] in ??? + Finished release [optimized + fuel] target(s) [1.976 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_str_16 ... ok (???, 1241 gas) + test isolated_cost_of_in_str_16 ... ok (???, 1080 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -349,12 +349,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.24 KB] in ??? + Finished release [optimized + fuel] target(s) [1.992 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_str_32 ... ok (???, 1242 gas) + test isolated_cost_of_in_str_32 ... ok (???, 1082 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -369,12 +369,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.2 KB] in ??? + Finished release [optimized + fuel] target(s) [1.944 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_str_8 ... ok (???, 1241 gas) + test isolated_cost_of_in_str_8 ... ok (???, 1080 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -389,12 +389,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.072 KB] in ??? + Finished release [optimized + fuel] target(s) [1.824 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test in_struct_u64 ... ok (???, 1113 gas) + test in_struct_u64 ... ok (???, 953 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -409,12 +409,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.2 KB] in ??? + Finished release [optimized + fuel] target(s) [1.96 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test in_struct_u64_u64 ... ok (???, 1304 gas) + test in_struct_u64_u64 ... ok (???, 1144 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -429,12 +429,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.272 KB] in ??? + Finished release [optimized + fuel] target(s) [2.032 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test in_struct_u64_u64_u64 ... ok (???, 1455 gas) + test in_struct_u64_u64_u64 ... ok (???, 1294 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -449,12 +449,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [1.472 KB] in ??? + Finished release [optimized + fuel] target(s) [1.12 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_tuple_0 ... ok (???, 820 gas) + test isolated_cost_of_in_tuple_0 ... ok (???, 626 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -469,12 +469,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.016 KB] in ??? + Finished release [optimized + fuel] target(s) [1.768 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_tuple_1 ... ok (???, 1090 gas) + test isolated_cost_of_in_tuple_1 ... ok (???, 930 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -489,12 +489,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.192 KB] in ??? + Finished release [optimized + fuel] target(s) [1.944 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_tuple_2 ... ok (???, 1304 gas) + test isolated_cost_of_in_tuple_2 ... ok (???, 1144 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -509,12 +509,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.264 KB] in ??? + Finished release [optimized + fuel] target(s) [2.016 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_tuple_3 ... ok (???, 1455 gas) + test isolated_cost_of_in_tuple_3 ... ok (???, 1294 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -529,12 +529,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.328 KB] in ??? + Finished release [optimized + fuel] target(s) [2.08 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_tuple_4 ... ok (???, 1605 gas) + test isolated_cost_of_in_tuple_4 ... ok (???, 1444 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -549,12 +549,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [1.976 KB] in ??? + Finished release [optimized + fuel] target(s) [1.72 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_u16 ... ok (???, 1117 gas) + test isolated_cost_of_in_u16 ... ok (???, 956 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -569,12 +569,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.064 KB] in ??? + Finished release [optimized + fuel] target(s) [1.808 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_u256 ... ok (???, 1120 gas) + test isolated_cost_of_in_u256 ... ok (???, 959 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -589,12 +589,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [2.088 KB] in ??? + Finished release [optimized + fuel] target(s) [1.832 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_u32 ... ok (???, 1243 gas) + test isolated_cost_of_in_u32 ... ok (???, 1082 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -609,12 +609,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [1.88 KB] in ??? + Finished release [optimized + fuel] target(s) [1.624 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_u64 ... ok (???, 1025 gas) + test isolated_cost_of_in_u64 ... ok (???, 864 gas) test result: OK. 1 passed; 0 failed; finished in ??? @@ -629,12 +629,12 @@ output: Building test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call Compiling library std (test/src/e2e_vm_tests/reduced_std_libs/sway-lib-std-core) Compiling contract const_of_contract_call (test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/const_of_contract_call) - Finished release [optimized + fuel] target(s) [1.92 KB] in ??? + Finished release [optimized + fuel] target(s) [1.664 KB] in ??? Running 1 test, filtered 0 tests tested -- const_of_contract_call - test isolated_cost_of_in_u8 ... ok (???, 1041 gas) + test isolated_cost_of_in_u8 ... ok (???, 880 gas) test result: OK. 1 passed; 0 failed; finished in ??? diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/dynamic_contract_call/src/lib.sw b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/dynamic_contract_call/src/lib.sw index 1a261f8dce1..4e039515afa 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/dynamic_contract_call/src/lib.sw +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/dynamic_contract_call/src/lib.sw @@ -19,7 +19,7 @@ pub fn dynamic_contract_call(contract_id: b256) -> u64 { #[cfg(experimental_new_encoding = true)] pub fn dynamic_contract_call(contract_id: b256) -> u64 { contract_call::(contract_id, - "some_method_name", + encode("some_method_name"), (1, 2, 3), 0, 0x0000000000000000000000000000000000000000000000000000000000000000,