-
Notifications
You must be signed in to change notification settings - Fork 975
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
[Bug-Candidate]: slither.core.solidity_types.elementary_type.NonElementaryType #1834
Comments
OK did some tests Let's have following folder structure for Truffle:
Struct1834.sol Contents :
Ex1834.sol Contents:
If we try to run slither on this example :
But If we change the Ex1834.Sol as follows :
Slither works perfectly fine
Which still doesn't make me understand the problem but looks like both Truffle and Hardhat outputs are correct in a way. |
@wisehalvdan I believe this is a bug in truffle trufflesuite/truffle#3124 and is a current limitation of Slither's integration with it crytic/crytic-compile#267 |
This happened to me today compiling https://github.com/RuneArtLtd/rune/blob/d1d8ba3b241dd84acf9cac439323c984daa37434/Rune.sol, using slither 0.9.3. |
Describe the issue:
Even thought the compiler works just fine :
Slither crashes while trying to analyze it :
Using hardhat doesn't even provide with message to where to look. But If we try the same project with truffle, it at least points us to some file.
Even if the errors is file does not exists, I believe this is the same underlying error somehow. What I suspect causing this issue is the following Struct :
I've seen this struct breaking console on Truffle and web3.js while used on ABI. So my guess this also breaks Slither.
Solidity handles function pointers as bytes24 consists of 20 byte address + 4 byte function selector. On JS side of things manually changing the abi to reflect type bytes24 instead of function fixes this issue, but not sure what slither depends on the artifact, probably more than ABI so don't think it will fix the issue there.
Code example to reproduce the issue:
Version:
0.9.3
Relevant log output:
No response
The text was updated successfully, but these errors were encountered: