Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(forge): do not error when artifact does not have an abi #7184

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions crates/forge/src/multi_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{
};
use alloy_json_abi::{Function, JsonAbi};
use alloy_primitives::{Address, Bytes, U256};
use eyre::{OptionExt, Result};
use eyre::Result;
use foundry_common::{get_contract_name, ContractsByArtifact, TestFunctionExt};
use foundry_compilers::{contracts::ArtifactContracts, Artifact, ArtifactId, ProjectCompileOutput};
use foundry_evm::{
Expand Down Expand Up @@ -332,7 +332,9 @@ impl MultiContractRunnerBuilder {
let mut known_contracts = ContractsByArtifact::default();

for (id, contract) in &linker.contracts.0 {
let abi = contract.abi.as_ref().ok_or_eyre("we should have an abi by now")?;
let Some(abi) = contract.abi.as_ref() else {
continue;
};

let LinkOutput { libs_to_deploy, libraries } =
linker.link_with_nonce_or_address(Default::default(), evm_opts.sender, 1, id)?;
Expand Down
Loading