[fuzzing] compile contracts before invoking docker

Ensures that `npm run fuzz` will succeed whether or
not the contracts were compiled beforehand.
This commit is contained in:
Mark Spanbroek 2023-02-28 16:32:47 +01:00 committed by markspanbroek
parent c1b412c589
commit 42d4778dcc
2 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ if command -v echidna-test; then
echidna-test ${root} \ echidna-test ${root} \
--config ${root}/fuzzing/echidna.yaml \ --config ${root}/fuzzing/echidna.yaml \
--corpus-dir ${root}/fuzzing/corpus \ --corpus-dir ${root}/fuzzing/corpus \
--crytic-args --ignore-compile \
--contract $1 --contract $1
} }
else else

View File

@ -3,7 +3,7 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"test": "npm run lint && hardhat test", "test": "npm run lint && hardhat test",
"fuzz": "fuzzing/fuzz.sh", "fuzz": "hardhat compile && fuzzing/fuzz.sh",
"start": "hardhat node --export deployment-localhost.json", "start": "hardhat node --export deployment-localhost.json",
"compile": "hardhat compile", "compile": "hardhat compile",
"format": "prettier --write contracts/**/*.sol test/**/*.js", "format": "prettier --write contracts/**/*.sol test/**/*.js",