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

allow dict_to_namedtuple to handle empty dict #2867

Merged

Conversation

pacrob
Copy link
Contributor

@pacrob pacrob commented Mar 8, 2023

What was wrong?

dict_to_namedtuple failed when trying to unpack an empty dict
Closes #2865

How was it fixed?

It now checks for empty values and passes empty tuples to `abi_decoded_namedtuple_factory if found.

Todo:

Cute Animal Picture

image

@pacrob pacrob force-pushed the handle-dict-to-namedtuple-null-return branch from db91d75 to ddb1330 Compare March 8, 2023 22:07
@pacrob pacrob requested review from fselmo and kclowes March 8, 2023 22:08
Copy link
Collaborator

@kclowes kclowes left a comment

Choose a reason for hiding this comment

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

🚀 !

Copy link
Collaborator

@fselmo fselmo left a comment

Choose a reason for hiding this comment

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

Nice tests. lgtm 👍🏼

@pacrob pacrob merged commit 6291333 into ethereum:master Mar 9, 2023
@pacrob pacrob deleted the handle-dict-to-namedtuple-null-return branch March 9, 2023 17:41
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.

ValueError in _dict_to_namedtuple on call contract function that returns
3 participants