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: pad function hashes to always be 8 characters #1741

Merged
merged 1 commit into from
Feb 20, 2023

Conversation

ToonVanHove
Copy link
Contributor

Why it's needed

Currenty, when specifying a transaction sequence containing a function hash with leading zeros, eg: --transaction-sequence '[[0x0651cb35]]' these leading zeros are dropped because of conversion to and from strings etc.. This causes the call to bytes.fromhex to fail and causes Mythril to crash.

What I did

Add leading zeros to function hashes so that a function hash is always 8 characters. This allows function hashes with leading zeros to be used.

@CLAassistant
Copy link

CLAassistant commented Feb 18, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@norhh norhh left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@norhh norhh merged commit 6964d22 into Consensys:develop Feb 20, 2023
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.

3 participants