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(verify): use configured solc_version (if any) to identify artifact #9483

Closed
wants to merge 1 commit into from
Closed
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: 3 additions & 3 deletions crates/verify/src/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,13 +275,13 @@ impl VerifyArgs {

let cache = project.read_cache_file().ok();

let version = if let Some(ref version) = self.compiler_version {
version.trim_start_matches('v').parse()?
} else if let Some(ref solc) = config.solc {
let version = if let Some(ref solc) = config.solc {
match solc {
SolcReq::Version(version) => version.to_owned(),
SolcReq::Local(solc) => Solc::new(solc)?.version,
}
} else if let Some(ref version) = self.compiler_version {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cli arg should come first or alternatively it is merged onto config and then just config is present here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, just realized https://github.com/superform-xyz/SuperVaults/blob/testProdDeployment/script/utils/verify_contracts.sh#L32C1-L32C49 so not sure we actually need any change here. ...

version.trim_start_matches('v').parse()?
} else if let Some(entry) =
cache.as_ref().and_then(|cache| cache.files.get(&contract_path).cloned())
{
Expand Down
Loading