Skip to content

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

Merged
danfinlay merged 2 commits into
MetaMask:masterfrom
danjm:parse-handle-tuple-args
Apr 15, 2019
Merged

Update parse() to handle args that are tuples#6
danfinlay merged 2 commits into
MetaMask:masterfrom
danjm:parse-handle-tuple-args

Conversation

@danjm
Copy link
Copy Markdown
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
Copy Markdown
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