Skip to content

Commit b19d487

Browse files
klkvrrplusq
authored andcommitted
fix: identification of contracts in scripts (foundry-rs#9346)
* fix: identification of contracts in scripts * clippy
1 parent d55cff6 commit b19d487

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

crates/script/src/simulate.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use eyre::{Context, Result};
1616
use forge_script_sequence::{ScriptSequence, TransactionWithMetadata};
1717
use foundry_cheatcodes::Wallets;
1818
use foundry_cli::utils::{has_different_gas_calc, now};
19-
use foundry_common::{get_contract_name, ContractData};
19+
use foundry_common::ContractData;
2020
use foundry_evm::traces::{decode_trace_arena, render_trace_arena};
2121
use futures::future::{join_all, try_join_all};
2222
use parking_lot::RwLock;
@@ -205,9 +205,8 @@ impl PreSimulationState {
205205
.contracts
206206
.iter()
207207
.filter_map(move |(addr, contract_id)| {
208-
let contract_name = get_contract_name(contract_id);
209208
if let Ok(Some((_, data))) =
210-
self.build_data.known_contracts.find_by_name_or_identifier(contract_name)
209+
self.build_data.known_contracts.find_by_name_or_identifier(contract_id)
211210
{
212211
return Some((*addr, data));
213212
}

0 commit comments

Comments
 (0)