@@ -5,7 +5,6 @@ use crate::e2e_testutils::{
55 upload_wasm_host_fn,
66} ;
77use crate :: testutils:: simple_account_sign_fn;
8- use crate :: vm:: VersionedContractCodeCostInputs ;
98use crate :: {
109 budget:: { AsBudget , Budget } ,
1110 builtin_contracts:: testutils:: TestSigner ,
@@ -394,18 +393,7 @@ fn build_module_cache_for_entries(
394393 if restored_contracts. contains ( & contract_id) {
395394 continue ;
396395 }
397- // Currently module cache always uses V0 cost inputs, so the parsed
398- // module will also use them during instantiation.
399- let code_cost_inputs = VersionedContractCodeCostInputs :: V0 {
400- wasm_bytes : cd. code . len ( ) ,
401- } ;
402- cache. parse_and_cache_module (
403- & ctx,
404- ledger_info. protocol_version ,
405- & contract_id,
406- & cd. code ,
407- code_cost_inputs,
408- ) ?;
396+ cache. parse_and_cache_module_simple ( & ctx, ledger_info. protocol_version , & cd. code ) ?;
409397 }
410398 }
411399 Ok ( cache)
@@ -1397,7 +1385,7 @@ fn test_create_contract_success_in_recording_mode() {
13971385 ]
13981386 ) ;
13991387 assert_eq ! ( res. auth, vec![ cd. auth_entry] ) ;
1400- expect ! [ "639648 " ] . assert_eq ( & res. resources . instructions . to_string ( ) ) ;
1388+ expect ! [ "663629 " ] . assert_eq ( & res. resources . instructions . to_string ( ) ) ;
14011389 expect ! [ "104" ] . assert_eq ( & res. resources . write_bytes . to_string ( ) ) ;
14021390 assert_eq ! (
14031391 res. resources,
@@ -1535,7 +1523,7 @@ fn test_create_contract_success_in_recording_mode_with_custom_account() {
15351523 ]
15361524 ) ;
15371525 assert_eq ! ( res. auth, vec![ cd. auth_entry] ) ;
1538- expect ! [ "1046806 " ] . assert_eq ( & res. resources . instructions . to_string ( ) ) ;
1526+ expect ! [ "1070787 " ] . assert_eq ( & res. resources . instructions . to_string ( ) ) ;
15391527 expect ! [ "176" ] . assert_eq ( & res. resources . write_bytes . to_string ( ) ) ;
15401528 assert_eq ! (
15411529 res. resources,
@@ -1606,7 +1594,7 @@ fn test_create_contract_success_in_recording_mode_with_enforced_auth() {
16061594 ]
16071595 ) ;
16081596 assert_eq ! ( res. auth, vec![ cd. auth_entry] ) ;
1609- expect ! [ "641135 " ] . assert_eq ( & res. resources . instructions . to_string ( ) ) ;
1597+ expect ! [ "665116 " ] . assert_eq ( & res. resources . instructions . to_string ( ) ) ;
16101598 expect ! [ "104" ] . assert_eq ( & res. resources . write_bytes . to_string ( ) ) ;
16111599 assert_eq ! (
16121600 res. resources,
@@ -2045,7 +2033,7 @@ fn test_invoke_contract_with_storage_ops_success_in_recording_mode() {
20452033 ]
20462034 ) ;
20472035 assert ! ( res. restored_rw_entry_ids. is_empty( ) ) ;
2048- expect ! [ "791047 " ] . assert_eq ( & res. resources . instructions . to_string ( ) ) ;
2036+ expect ! [ "898006 " ] . assert_eq ( & res. resources . instructions . to_string ( ) ) ;
20492037 expect ! [ "80" ] . assert_eq ( & res. resources . write_bytes . to_string ( ) ) ;
20502038 assert_eq ! (
20512039 res. resources,
@@ -2112,7 +2100,7 @@ fn test_invoke_contract_with_storage_ops_success_in_recording_mode() {
21122100 wasm_entry_change. clone( )
21132101 ]
21142102 ) ;
2115- expect ! [ "902901 " ] . assert_eq ( & extend_res. resources . instructions . to_string ( ) ) ;
2103+ expect ! [ "1009860 " ] . assert_eq ( & extend_res. resources . instructions . to_string ( ) ) ;
21162104 assert_eq ! (
21172105 extend_res. resources,
21182106 SorobanResources {
@@ -2555,7 +2543,7 @@ fn test_auto_restore_with_overwrite_in_recording_mode() {
25552543 ]
25562544 ) ;
25572545
2558- expect ! [ "921385 " ] . assert_eq ( & res. resources . instructions . to_string ( ) ) ;
2546+ expect ! [ "1028344 " ] . assert_eq ( & res. resources . instructions . to_string ( ) ) ;
25592547 assert_eq ! (
25602548 res. resources,
25612549 SorobanResources {
0 commit comments