This repository was archived by the owner on Nov 17, 2026. It is now read-only.
Repository navigation
load_contract for testing detectors may not be ideal for long term + Pluasible fix
#284
Closed
TilakMaddy
started this conversation in
Ideas
Replies: 1 comment
|
Agree! This is a natural successor to the theme: "Don't require or support any framework, just use Solidity files" |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Current behavior:
Input :
Path/to/out/xxx/yyy/zzz/Contract.jsonin out directoryProcessing:
out's parent directory then reading the source files fromsrcto plug into the ASTProblems with this approach
Once
forgeis exposed to a contract with pragma0.8.25it installs solc 0.8.25 and then from then on, it does not generate 0.8.24 json files for existing smart contracts (of course because of the nature of floating pragmas)This breaks the arguments in
load_contractif the json file name ends withXXX.0.8.24.json, etc (NOTE: This is not the majority of cases)So you have to change all the tests now : (
Better approach ( I think )
The input for
load_contractshould be the path to the solidity file itself.Then we can go the relevant out folder and pick up the json (This is good enough for most detectors. The only exceptions are the ones where the detctors are pragma version sensitive of which there are only a few - it might even be better if we yank them away from the
outdirectory and keep them somewhere else where it's permanent.outfolder should be always re-generate-able by any computer and we do not have to be worrying about breaking testAll reactions