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

Add encode_hex helper to ensure hex strings have "0x" prefix #27

Closed
wants to merge 2 commits into from
Closed

Add encode_hex helper to ensure hex strings have "0x" prefix #27

wants to merge 2 commits into from

Conversation

yusefnapora
Copy link

This adds a encode_hex function to utils that just calls .encode('hex') on its input and prepends 0x to it. I replaced all the occurrences of thing.encode('hex') with it, so geth should accept things now.

Seems to work for me, but I haven't done extensive testing yet.

Closes #26

@danielksan81
Copy link

The fix corresponds to the lines mentioned in #26

@reiven
Copy link

reiven commented Jun 6, 2017

Maybe the add_0x_prefix from ethereum-utils can be a cleaner way to achieve this?

@emunsing
Copy link

emunsing commented Jul 6, 2017

I still get the hex error when I use .call_with_transaction() when running the demo from the sample documentation. If this function has been outdated, could you also update the Readme.md file to suggest a new way of implementing the same functionality with your fork?

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.

Missing 0x prefix for hex data
4 participants