mirror of https://github.com/crytic/slither
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
603 B
27 lines
603 B
#!/usr/bin/env bash
|
|
|
|
### Test Dapp integration
|
|
|
|
mkdir test_dapp
|
|
cd test_dapp || exit 255
|
|
# The dapp init process makes a temporary local git repo and needs certain values to be set
|
|
git config --global user.email "ci@trailofbits.com"
|
|
git config --global user.name "CI User"
|
|
|
|
which nix-env || exit 255
|
|
|
|
git clone --recursive https://github.com/dapphub/dapptools "$HOME/.dapp/dapptools"
|
|
nix-env -f "$HOME/.dapp/dapptools" -iA dapp seth solc hevm ethsign
|
|
|
|
dapp init
|
|
|
|
slither . --detect external-function
|
|
|
|
# TODO: make more elaborate test
|
|
if [ $? -eq 4 ]
|
|
then
|
|
exit 0
|
|
fi
|
|
|
|
echo "Dapp test failed"
|
|
exit 255
|
|
|