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

Update parse() to handle args that are tuples #6

Merged
merged 2 commits into from
Apr 15, 2019

Conversation

danjm
Copy link
Contributor

@danjm danjm commented Apr 4, 2019

fixes MetaMask/metamask-extension#5983

This PR address an issue with parsing methods with signatures like fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)

Encodings of contract arguments can include tuples (and tuples within tuples, etc.) This will cause parenthesis to appear in the arg list of the signature. This could lead to the representation of method names and arguments with parameters included.

This PR ensures that the presence of tuples in method signatures does not cause parenthesis to appear in the string representation of the method name and its arguments.

Test cases are added.

Note that this will cause tuples to be represented flatly. I've created an issue for us to improve that in the future #7

@danjm
Copy link
Contributor Author

danjm commented Apr 4, 2019

Associated version bump PR in MetaMask MetaMask/metamask-extension#6403

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.

Function lookup and ABIV2Encoding
2 participants