Skip to content

Commit

Permalink
fix(blockifier): fix test_write_at_validate_and_execute
Browse files Browse the repository at this point in the history
  • Loading branch information
yoavGrs committed Dec 8, 2024
1 parent c97fe52 commit 078f65b
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions crates/blockifier/src/state/cached_state_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ use crate::test_utils::contracts::FeatureContract;
use crate::test_utils::dict_state_reader::DictStateReader;
use crate::test_utils::initial_test_state::test_state;
use crate::test_utils::{create_calldata, CairoVersion, BALANCE};
use crate::transaction::test_utils::{
account_invoke_tx,
default_all_resource_bounds,
STORAGE_WRITE,
};
use crate::transaction::transactions::ExecutableTransaction;
use crate::transaction::test_utils::{default_all_resource_bounds, run_invoke_tx, STORAGE_WRITE};
const CONTRACT_ADDRESS: &str = "0x100";

fn set_initial_state_values(
Expand Down Expand Up @@ -508,13 +503,17 @@ fn test_write_at_validate_and_execute(

let signature =
TransactionSignature(vec![Felt::from(STORAGE_WRITE), validate_value, execute_value]);
let invoke_tx = account_invoke_tx(invoke_tx_args! {
signature,
sender_address: contract_address,
resource_bounds: default_all_resource_bounds,
calldata: create_calldata(contract_address, "foo", &[]),
});
let tx_execution_info = invoke_tx.execute(&mut state, &block_context, true, true).unwrap();
let tx_execution_info = run_invoke_tx(
&mut state,
&block_context,
invoke_tx_args! {
signature,
sender_address: contract_address,
resource_bounds: default_all_resource_bounds,
calldata: create_calldata(contract_address, "foo", &[]),
},
)
.unwrap();
let n_allocated_keys = tx_execution_info
.receipt
.resources
Expand Down

0 comments on commit 078f65b

Please sign in to comment.