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: only early-return if an exact bytecode match is found #7165

Merged
merged 2 commits into from
Feb 19, 2024

Conversation

DaniPopes
Copy link
Member

@DaniPopes DaniPopes commented Feb 19, 2024

Closes #7144

Also re-added the threshold present before refactoring:

let score = diff_score(known_code, code);
// Note: the diff score can be inaccurate for small contracts so we're using
// a relatively high threshold here to avoid filtering out too many
// contracts.
if score < 0.85 {
Some((OrderedFloat(score), id, abi))
} else {
None
}

Copy link
Member

@klkvr klkvr left a comment

Choose a reason for hiding this comment

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

lgtm, was writing a comment exactly about 0.85 threshhold right before you commited it :)

@DaniPopes DaniPopes merged commit 507c267 into master Feb 19, 2024
19 checks passed
@DaniPopes DaniPopes deleted the dani/exact-code-match branch February 19, 2024 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Failed to decode constructor arguments" when running script
2 participants