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

I expected the receipt field 'type' to be an int #2482

Closed
carver opened this issue May 23, 2022 · 4 comments
Closed

I expected the receipt field 'type' to be an int #2482

carver opened this issue May 23, 2022 · 4 comments

Comments

@carver
Copy link
Collaborator

carver commented May 23, 2022

  • Version: 5.29.0
  • Python: 3.8
  • OS: osx/linux/win
  • pip freeze output

What was wrong?

>>> print(w3.eth.get_transaction_receipt(txn_hash).type)
"0x2"

I expected an int, in this case 2

How can it be fixed?

Add a field normalizer for receipt.type

@carver
Copy link
Collaborator Author

carver commented May 23, 2022

Also, I expected the data field in the logs to be bytes

@pacrob
Copy link
Contributor

pacrob commented May 26, 2022

Can do, I'll get this tomorrow. Just to clarify, you want bytes and not hexbytes?

@carver
Copy link
Collaborator Author

carver commented May 26, 2022

Can do, I'll get this tomorrow. Just to clarify, you want bytes and not hexbytes?

No HexBytes is even better!

@fselmo
Copy link
Collaborator

fselmo commented Jun 7, 2022

closed by #2488

@fselmo fselmo closed this as completed Jun 7, 2022
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

No branches or pull requests

3 participants