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

Fix string interpolation issues in exception message. #2096

Merged

Conversation

fselmo
Copy link
Collaborator

@fselmo fselmo commented Aug 5, 2021

What was wrong?

  • Exception message for calling a contract function did not return data in a manner where a meaningful exception message could be extracted even though we used to return it in this way (breaking change)

Related to Issue #2069

How was it fixed?

  • Print the result_data as bytes in exception message in order to extract a meaningful exception message from the data. This is how we used to return this message and some users were using it to extract the meaningful exception message and were no longer able to.

Todo:

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@fselmo fselmo force-pushed the improve-contract-function-exception-msg branch from bad6fe4 to aeb070b Compare August 5, 2021 23:54
Fixes an issue preventing a meaningful message from being extracted from the result data due to the HexBytes object being printed rather than the bytes which includes the message.
@fselmo fselmo force-pushed the improve-contract-function-exception-msg branch from aeb070b to d1d98f9 Compare August 6, 2021 18:14
@fselmo fselmo requested a review from kclowes August 6, 2021 18:33
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.

🚀

@fselmo fselmo merged commit 7fb9dc7 into ethereum:master Aug 6, 2021
@fselmo fselmo deleted the improve-contract-function-exception-msg branch August 6, 2021 18:39
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.

2 participants