gcf3711 / sGuardPlus

An automated smart contract vulnerability repair tool
MIT License
6 stars 3 forks source link

AttributeError: 'CompilationUnit' object has no attribute 'bytecode_runtime #3

Open wwwqql opened 2 weeks ago

wwwqql commented 2 weeks ago

按照readme流程进行运行,在执行智能合约修复命令时node index.js ../example/motivation_example.sol 出现AttributeError: 'CompilationUnit' object has no attribute 'bytecode_runtime,请问我该怎么解决。 image

thomasyonug commented 2 weeks ago

The errors are raised by Slither. Since the toolchain version of your environment is unknown, it's plausible that the version of solc is not supported by Slither. Please check it or repost the environment information here.

wwwqql commented 2 weeks ago

非常感谢的回复,我的环境中slither-analyzer为0.8.1,Python 版本3.8.10,Solidity 编译器版本为0.4.26.其余包均按照requirements.txt文档要求安装,只有excrytic-compile==0.2.2没有安装成功。请您帮我检查那个地方导致报错。您的建议将帮助我解决问题。 image

Tanggerr commented 2 weeks ago

you should replace ”excrytic-compile==0.2.2“ to "crytic-compile==0.2.2".

wwwqql commented 2 weeks ago

非常感谢您的建议,安装crytic-compile==0.2.2后,可以运行了。这是已经修复合约了吗,修复后的合约保存在motivation_example.sol.fixed 还是motivation_example.sol。 image

Tanggerr commented 2 weeks ago

yeah,it has fixed successfully,and the motivation_example.sol.fixed is the fixed solidity.