-
Notifications
You must be signed in to change notification settings - Fork 20.4k
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
[#20266] Fix bugs decoding integers and fixed bytes in indexed event fields #20269
[#20266] Fix bugs decoding integers and fixed bytes in indexed event fields #20269
Conversation
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.
LGTM
Thanks! Please take a look at and fix the lint failures on travis |
Thanks for the quick turnaround! Linter issues fixed and linting and tests passed in CI. |
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.
LGTM once updated
…d event fields (ethereum#20269) * fix parseTopics() and add tests * remove printf * add ParseTopicsIntoMap() tests * fix FixedBytesTy * fix int and fixed bytes * golint topics_test.go
…d event fields (ethereum#20269) * fix parseTopics() and add tests * remove printf * add ParseTopicsIntoMap() tests * fix FixedBytesTy * fix int and fixed bytes * golint topics_test.go
…d event fields (ethereum#20269) * fix parseTopics() and add tests * remove printf * add ParseTopicsIntoMap() tests * fix FixedBytesTy * fix int and fixed bytes * golint topics_test.go
…d event fields (ethereum#20269) * fix parseTopics() and add tests * remove printf * add ParseTopicsIntoMap() tests * fix FixedBytesTy * fix int and fixed bytes * golint topics_test.go
…d event fields (ethereum#20269) * fix parseTopics() and add tests * remove printf * add ParseTopicsIntoMap() tests * fix FixedBytesTy * fix int and fixed bytes * golint topics_test.go
…d event fields (ethereum#20269) * fix parseTopics() and add tests * remove printf * add ParseTopicsIntoMap() tests * fix FixedBytesTy * fix int and fixed bytes * golint topics_test.go
…d event fields (ethereum#20269) * fix parseTopics() and add tests * remove printf * add ParseTopicsIntoMap() tests * fix FixedBytesTy * fix int and fixed bytes * golint topics_test.go
…d event fields (ethereum#20269) * fix parseTopics() and add tests * remove printf * add ParseTopicsIntoMap() tests * fix FixedBytesTy * fix int and fixed bytes * golint topics_test.go
…d event fields (ethereum#20269) * fix parseTopics() and add tests * remove printf * add ParseTopicsIntoMap() tests * fix FixedBytesTy * fix int and fixed bytes * golint topics_test.go
…d event fields (ethereum#20269) * fix parseTopics() and add tests * remove printf * add ParseTopicsIntoMap() tests * fix FixedBytesTy * fix int and fixed bytes * golint topics_test.go
…d event fields (ethereum#20269) * fix parseTopics() and add tests * remove printf * add ParseTopicsIntoMap() tests * fix FixedBytesTy * fix int and fixed bytes * golint topics_test.go
…d event fields (ethereum#20269) * fix parseTopics() and add tests * remove printf * add ParseTopicsIntoMap() tests * fix FixedBytesTy * fix int and fixed bytes * golint topics_test.go
…d event fields (ethereum#20269) * fix parseTopics() and add tests * remove printf * add ParseTopicsIntoMap() tests * fix FixedBytesTy * fix int and fixed bytes * golint topics_test.go
Resolves #20266
This PR fixes bugs in
parseTopics()
andparseTopicsIntoMap()
which incorrectly decoded negative integer values and fixed bytes values.Added tests, now passing, which fail on master:
This PR promotes a few functions and variables to public, all in
accounts/abi/unpack.go
, to help reduce duplication in decoding fields:MaxUint256
,MaxInt256
,ReadInteger()
andReadFixedBytes()
.Future enhancement, not addressed in this PR, could further reduce the duplication of functionality between
parseTopics()
,parseTopicsIntoMap()
andtoGoType()
.