这里有谁使用过https://github.com/ConsenSys/mythril的码头版本,并能给我一个如何使它工作的提示吗?我只得到:
$ docker run mythril/myth -xa 0xc0ed3c3c725c6f3202c13fb49fb7fddb1385e62d29279a0a9a170b5251fb10a6 --rpc ganache
Could not connect to RPC server. Make sure that your node is running and that RPC parameters are set correctly.
$ docker run mythril/myth -x MyContract.sol
Input file not found: MyContract.sol我的Ganache正在运行我的Truffle测试,并且MyContract.sol在当前的工作目录中!
发布于 2018-06-15 13:55:13
在阅读了Docker之后,我找到了以下解决方案。
若要连接到本地RPC,请使用host.docker.internal而不是localhost。例如,默认情况下,Ganache侦听端口7545:
docker run mythril/myth -xa 0xadf6E506c4243E9fb25EA6517017E63a2eaEBB0e --rpc host.docker.internal:7545要分析本地.sol文件,您必须挂载文件所在的目录。如果要在当前工作目录中分析MyContract.sol,请运行以下命令:
docker run -v $(pwd):/working-dir mythril/myth -x /working-dir/MyContract.solhttps://ethereum.stackexchange.com/questions/51304
复制相似问题