Skip to content

Commit

Permalink
Changes after review: don't collect
Browse files Browse the repository at this point in the history
  • Loading branch information
grandizzy committed Apr 4, 2024
1 parent 1b39a41 commit 816615d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions crates/evm/evm/src/executors/invariant/error.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::{BasicTxDetails, InvariantContract};
use crate::executors::{Executor, RawCallResult};
use alloy_json_abi::{Function, JsonAbi};
use alloy_json_abi::Function;
use alloy_primitives::{Address, Bytes, Log};
use eyre::Result;
use foundry_common::contracts::{ContractsByAddress, ContractsByArtifact};
Expand Down Expand Up @@ -119,8 +119,10 @@ impl FailedInvariantCaseData {

// Collect abis of fuzzed and invariant contracts to decode custom error.
let targets = targeted_contracts.lock();
let mut abis: Vec<&JsonAbi> = targets.iter().map(|contract| &contract.1 .1).collect();
abis.push(invariant_contract.abi);
let abis = targets
.iter()
.map(|contract| &contract.1 .1)
.chain(std::iter::once(invariant_contract.abi));

let revert_reason = RevertDecoder::new()
.with_abis(abis)
Expand Down

0 comments on commit 816615d

Please sign in to comment.