使用docker测试智能合约

docker使用说明

运行镜像指令

1
docker run -it --privileged=true -v /home/helong/oyente/tmp:/oyente/contract --name oyente luongnguyen/oyente

退出容器

1
ctrl + p + q

查看正在运行的容器

1
docker ps

重新进入后台运行的镜像

1
docker attach oyente/容器id

停止镜像

1
docker stop oyente/容器id

启动已停止的镜像

1
docker start oyente/容器id

删除已经停止的镜像

1
docker rm 容器id

操作方式

Oyente

1
python oyente.py -s <solidity-file-path>

Mythril

1
myth analyze <solidity-file-path>

Slither

1
slither <solidity-file-path>

Securify V1

构建

1
./gradlew jar

运行Solidity file

1
java -jar build/libs/securify.jar -fs <solidity-file-path>