Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
KS-35: EVM Encoder compatible with consensus capability #12025
KS-35: EVM Encoder compatible with consensus capability #12025
Changes from all commits
e71a16f
2390ec7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
if
statements here are a little awkward. Not going to necessarily request changes, but I would suggest something simpler likeif !(len(rest) == 1 && rest[0] == ')')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference between ParseSelector and ParseSignature (below)? Seems like ParseSelector is not used anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DeividasK , @austinborn these two files were copied from geth (see comment above: // Sourced from https://github.com/ethereum/go-ethereum/blob/fe91d476ba3e29316b6dc99b6efd4a571481d888/accounts/abi/selector_parser.go#L126
// Modified assembleArgs to retain argument names)
Blaz modified them slightly to include argument name parsing as geth by default doesn't support that. They happened to be merged with my PR because encoders also depend on this library and were merged earlier.
We can either keep them as close to original as possible or make cleaner/smaller (I already had to do minor tweaks to satisfy Sonar). I'll leave that decision to @archseer and @patrick-dowell .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this named
unescpaedSelector
? I can't find an "escaped" version. What does it need to be unescaped from?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I modified this verbatim from geth (ParseSelector being the original) so I retained the naming
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's mostly just because of naming here so the variable names don't conflict:
https://github.com/ethereum/go-ethereum/blob/5d984796afd4aa7c00c6663f4155488a9df73d0e/signer/fourbyte/abi.go#L77-L80