mirror of https://github.com/crytic/echidna
Move echidna action to crytic/echidna-action (#701)
This removes the action from the echidna repository. The action will now live on its own repository, where it can be versioned and published independently. Additionally, this updates the workflow to refer to the action on its new location, as well as adds a few lines to the README pointing to the new action location.pull/711/head
parent
ff36688977
commit
8180d332c0
@ -1,5 +0,0 @@ |
||||
FROM trailofbits/echidna |
||||
RUN pip3 install solc-select |
||||
COPY entrypoint.sh /entrypoint.sh |
||||
RUN chmod ugo+x /entrypoint.sh |
||||
ENTRYPOINT ["/entrypoint.sh"] |
@ -1,63 +0,0 @@ |
||||
name: "Echidna" |
||||
|
||||
description: "Run echidna-test" |
||||
|
||||
inputs: |
||||
files: |
||||
description: "Solidity files to analyze" |
||||
required: true |
||||
contract: |
||||
description: "Contract to analyze" |
||||
required: false |
||||
config: |
||||
description: "Config file (CLI arguments override config options)" |
||||
required: false |
||||
format: |
||||
description: "Output format: json, text, none. Disables interactive UI" |
||||
required: false |
||||
corpus-dir: |
||||
description: "Directory to store corpus and coverage data" |
||||
required: false |
||||
check-asserts: |
||||
description: "Check asserts in the code" |
||||
required: false |
||||
multi-abi: |
||||
description: "Use multi-abi mode of testing" |
||||
required: false |
||||
test-limit: |
||||
description: "Number of sequences of transactions to generate during testing" |
||||
required: false |
||||
shrink-limit: |
||||
description: "Number of tries to attempt to shrink a failing sequence of transactions" |
||||
required: false |
||||
seq-len: |
||||
description: "Number of transactions to generate during testing" |
||||
required: false |
||||
contract-addr: |
||||
description: "Address to deploy the contract to test" |
||||
required: false |
||||
deployer: |
||||
description: "Address of the deployer of the contract to test" |
||||
required: false |
||||
sender: |
||||
description: "Addresses to use for the transactions sent during testing" |
||||
required: false |
||||
seed: |
||||
description: "Run with a specific seed" |
||||
required: false |
||||
crytic-args: |
||||
description: "Additional arguments to use in crytic-compile for the compilation of the contract to test" |
||||
required: false |
||||
solc-args: |
||||
description: "Additional arguments to use in solc for the compilation of the contract to test" |
||||
required: false |
||||
solc-version: |
||||
description: "Version of the Solidity compiler to use" |
||||
required: false |
||||
negate-exit-status: |
||||
description: "Apply logical NOT to echidna-test's exit status (for testing the action)" |
||||
required: false |
||||
|
||||
runs: |
||||
using: "docker" |
||||
image: "Dockerfile" |
@ -1,47 +0,0 @@ |
||||
#! /bin/bash |
||||
|
||||
set -eu |
||||
|
||||
export PYTHONPATH=/root/.local/lib/python3.6/site-packages |
||||
|
||||
OPTIONS="contract config format corpus-dir test-limit shrink-limit seq-len \ |
||||
contract-addr deployer sender seed crytic-args solc-args" |
||||
|
||||
SWITCHES="check-asserts multi-abi" |
||||
|
||||
# smoelius: `get` works for non-standard variable names like `INPUT_CORPUS-DIR`. |
||||
get() { |
||||
env | sed -n "s/^$1=\(.*\)/\1/;T;p" |
||||
} |
||||
|
||||
CMD=(echidna-test "$INPUT_FILES") |
||||
|
||||
for OPTION in $OPTIONS; do |
||||
NAME=INPUT_"${OPTION^^}" |
||||
VALUE="$(get "$NAME")" |
||||
if [[ -n "$VALUE" ]]; then |
||||
CMD+=(--"$OPTION" "$VALUE") |
||||
fi |
||||
done |
||||
|
||||
for SWITCH in $SWITCHES; do |
||||
NAME=INPUT_"${SWITCH^^}" |
||||
VALUE="$(get "$NAME")" |
||||
if [[ -n "$VALUE" ]]; then |
||||
CMD+=(--"$SWITCH") |
||||
fi |
||||
done |
||||
|
||||
SOLC_VERSION="$(get 'INPUT_SOLC-VERSION')" |
||||
if [[ -n "$SOLC_VERSION" ]]; then |
||||
solc-select install "$SOLC_VERSION" |
||||
solc-select use "$SOLC_VERSION" |
||||
fi |
||||
|
||||
echo "${CMD[@]}" >&2 |
||||
|
||||
if [[ -n "$(get 'INPUT_NEGATE-EXIT-STATUS')" ]]; then |
||||
! "${CMD[@]}" |
||||
else |
||||
"${CMD[@]}" |
||||
fi |
Loading…
Reference in new issue