-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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: exclude empty artifacts from ContractsByArtifact
#7713
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,6 +106,10 @@ impl VerifyBundle { | |
libraries: &[String], | ||
) -> Option<VerifyArgs> { | ||
for (artifact, contract) in self.known_contracts.iter() { | ||
// Avoid comparing to empty bytecode. | ||
if contract.bytecode.is_empty() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we don't need this check if we add the check in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, but I've seen this bug before so would like to keep this as impact of this bug is pretty high and it's pretty easy to miss while working with artifacts There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also I think this would've been caught by verification tests which are disabled rn cc @mattsse |
||
continue; | ||
} | ||
// If it's a CREATE2, the tx.data comes with a 32-byte salt in the beginning | ||
// of the transaction | ||
if data.split_at(create2_offset).1.starts_with(&contract.bytecode) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add small comment on what empty bytecode means, just like the pr description