From 42d4778dcc94d43b0b560649cb8eac0eefd948da Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Tue, 28 Feb 2023 16:32:47 +0100 Subject: [PATCH] [fuzzing] compile contracts before invoking docker Ensures that `npm run fuzz` will succeed whether or not the contracts were compiled beforehand. --- fuzzing/fuzz.sh | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fuzzing/fuzz.sh b/fuzzing/fuzz.sh index d7cb9ca..7304d1c 100755 --- a/fuzzing/fuzz.sh +++ b/fuzzing/fuzz.sh @@ -8,6 +8,7 @@ if command -v echidna-test; then echidna-test ${root} \ --config ${root}/fuzzing/echidna.yaml \ --corpus-dir ${root}/fuzzing/corpus \ + --crytic-args --ignore-compile \ --contract $1 } else diff --git a/package.json b/package.json index 067c3d0..11a7cc5 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "license": "MIT", "scripts": { "test": "npm run lint && hardhat test", - "fuzz": "fuzzing/fuzz.sh", + "fuzz": "hardhat compile && fuzzing/fuzz.sh", "start": "hardhat node --export deployment-localhost.json", "compile": "hardhat compile", "format": "prettier --write contracts/**/*.sol test/**/*.js",