-
Notifications
You must be signed in to change notification settings - Fork 58
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function selector is incorrect for structs #77
Comments
I find this auditor as a very useful tool. The problem with structs in function selector is not the only issue: it don't parse by any mean the interfaces. May be I have to open a new issue regarding this problem? E.g.: if we use Remix in a contract with the method:
It is parsed as: "convertByPath(address[],uint256,uint256,address,address,uint256)", with the selector:
But the vscode-solidity-auditor do the wrong calculation:
|
As another note, for fixed sized arrays the wrong function sig is shown too: For "function arr(uint[2] memory param)" it returns "bfceb977 => arr(uint256[])" Correct output would be "d1578977 => arr(uint256[2])" |
I guess I really have to refactor the funcsig extraction part. If anyone want's to take this on, I'm open for PRs :) |
"funcSig" over a function and "funcSigs" at the top of the file report 2 different signature values for the same function. |
Hey again @tintinweb鈥擨 know in #68 you mentioned the signature extraction is hacky and you don't expect many people use it, but actually it's probably the feature I use most, so here's another related issue 馃榿
The issue:
0x9120491c
0xe1acd927
In this case the method linked is an array of structs. I think I've also seen regular structs and interfaces (e.g.
function someMethod(IERC20 _address)
) give the wrong function signature, though I don't have an example handy鈥擨 can double-check and confirm this if you needThe text was updated successfully, but these errors were encountered: