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: issue with providing str for bytes in calldata [APE-667] #1319

Merged
merged 16 commits into from
Mar 2, 2023

Conversation

antazoey
Copy link
Member

@antazoey antazoey commented Feb 25, 2023

What I did

Just opening this to show @Ninjagod1251 what to do and get it started.
See comments for more info!

fixes: #1289
fixes: APE-627

How I did it

How to verify it

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

@NotPeopling2day NotPeopling2day changed the title fix: issue with providing str for bytes in calldata fix: issue with providing str for bytes in calldata [APE-667] Feb 25, 2023
Copy link
Member Author

@antazoey antazoey left a comment

Choose a reason for hiding this comment

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

Looks good! I can't approve it won't let me, just run the linters! thank you :)

@fubuloubu
Copy link
Member

Note: in debuging the implementation for this with @Ninjagod1251, I figured out that ApeWorX/ethpm-types#63 would be very helpful for some of the code we added

# NOTE: An array can be an array of tuples, so we start with an array check
if abi_type.type.endswith("]"):
# remove one layer of the potential onion of array
new_type = "[".join(str(abi_type.type).split("[")[:-1])
Copy link
Member

Choose a reason for hiding this comment

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

This is the code that I think would be better to fix in ethpm_types.abi.ABIType by adding a method to fetch the inner array type

Copy link
Member Author

Choose a reason for hiding this comment

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

Do itttttt

Copy link
Member Author

@antazoey antazoey left a comment

Choose a reason for hiding this comment

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

empty raise is not legal unless an exception is already present on the Exception stack

@antazoey antazoey marked this pull request as ready for review February 28, 2023 23:31
Copy link
Member Author

@antazoey antazoey left a comment

Choose a reason for hiding this comment

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

Approved

fubuloubu
fubuloubu previously approved these changes Mar 1, 2023
@fubuloubu
Copy link
Member

fubuloubu commented Mar 1, 2023

Fix the linting issue and can merge

Copy link
Member

@fubuloubu fubuloubu left a comment

Choose a reason for hiding this comment

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

Let's gooooo

@antazoey antazoey merged commit 4a73e6b into ApeWorX:main Mar 2, 2023
@antazoey antazoey deleted the fix/bytes-encoding branch March 2, 2023 16:44
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.

regression: can no longer convert hex strings to bytes ABI types
3 participants