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

Properly JSON encode AttributeDict & bytes types for RPC requests #3101

Merged
merged 3 commits into from Sep 21, 2023

Conversation

fselmo
Copy link
Collaborator

@fselmo fselmo commented Sep 20, 2023

What was wrong?

closes #2584

How was it fixed?

  • Properly JSON encode AttributeDict, bytes, and HexBytes types. This can be useful for using responses that have been formatted by web3.py as inputs to another request after some cleaning up.

Todo:

Cute Animal Picture

20230917_120119

@fselmo fselmo changed the title Properly JSON encode AttributeDict & HexBytes for RPC requests Properly JSON encode AttributeDict & bytes types for RPC requests Sep 20, 2023
@fselmo fselmo marked this pull request as ready for review September 20, 2023 16:49
Copy link
Contributor

@reedsa reedsa left a comment

Choose a reason for hiding this comment

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

Nice work, lgtm!

Copy link
Contributor

@pacrob pacrob left a comment

Choose a reason for hiding this comment

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

lgtm!

@fselmo fselmo merged commit 66f2391 into ethereum:main Sep 21, 2023
84 checks passed
@fselmo fselmo deleted the json-encode-attrdict-and-hexbytes branch September 21, 2023 16:50
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.

Extend Web3.toJSON json encoder (Web3JsonEncoder) to support bytes type
3 participants