diff --git a/crates/blockifier_reexecution/src/state_reader/test_state_reader.rs b/crates/blockifier_reexecution/src/state_reader/test_state_reader.rs index f871e3c735..29d7a0b38b 100644 --- a/crates/blockifier_reexecution/src/state_reader/test_state_reader.rs +++ b/crates/blockifier_reexecution/src/state_reader/test_state_reader.rs @@ -49,7 +49,15 @@ impl StateReader for TestStateReader { contract_address: ContractAddress, key: StorageKey, ) -> StateResult { - self.0.get_storage_at(contract_address, key) + match self.0.get_storage_at(contract_address, key) { + Ok(value) => Ok(value), + // If the contract address is not found, The blockifier expect to get the default value + // of felt. + Err(e) if e.to_string().contains("Contract address not found for request") => { + Ok(Felt::default()) + } + Err(e) => panic!("Unexpected error in get_storage_at: {:?}", e), + } } fn get_class_hash_at(&self, contract_address: ContractAddress) -> StateResult {