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

Unexpected types for transaction fields #2491

Closed
carver opened this issue May 27, 2022 · 0 comments · Fixed by #2506
Closed

Unexpected types for transaction fields #2491

carver opened this issue May 27, 2022 · 0 comments · Fixed by #2506

Comments

@carver
Copy link
Collaborator

carver commented May 27, 2022

  • Version: 5.29.1
  • Python: 3.8
  • OS: linux

What was wrong?

Similar to #2482

On mainnet:

>>> block = w3.eth.get_block(14764013, full_transactions=True)
>>> txn = block.transactions[0]
>>> print(txn.type)
"0x2"
>>> print(txn.chainId)
"0x1"

I expected an int for both, in this case 2 and 1.

How can it be fixed?

Add a couple field normalizers

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 a pull request may close this issue.

1 participant