-
Notifications
You must be signed in to change notification settings - Fork 161
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
TypeError: Transaction had invalid fields: {'to': '0x0d8ce2a99bb6e3b7db580ed848240e4a0f9ae153'} #211
Comments
Thanks for the report @woshidama323. We changed the private key you listed to It does look like this is a bug, but you can work around it by converting the to address to HexBytes before sending it:
I'm going to transfer this issue to the |
Adding on to this, it looks like the problem is actually that the address isn't checksummed. The error message could definitely stand to be improved here. |
Occasionally received similar error today |
pip freeze
outputWhat was wrong?
Please include any of the following that are applicable:
description:
when trying to sign with sign_transaction offline, I got such errors bellow:
TypeError: Transaction had invalid fields: {'to': '0x0d8ce2a99bb6e3b7db580ed848240e4a0f9ae153'}
Here is the whole output
But if i change the to field with "0xdd8ce2a99bb6e3b7db580ed848240e4a0f9ae153" (here i changed 0x0 to 0xd)
It works well
Guess the web3.py cannot handle such 0x0 prefix address well ?
How can it be fixed?
Fill this section in if you know how this could or should be fixed.
None
Note: We prefer to use issues to track our work. If you think you've encountered a bug in web3py or
have a feature request, you're in the right place. If you have implementation or usage questions,
please refer to our documentation and/or join the conversation
on discord.
The text was updated successfully, but these errors were encountered: