|
|
@ -8,7 +8,7 @@ solc-select use 0.8.19 --always-install |
|
|
|
|
|
|
|
|
|
|
|
#Test 1 - Etherscan target |
|
|
|
#Test 1 - Etherscan target |
|
|
|
slither-interface WETH9 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 |
|
|
|
slither-interface WETH9 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 |
|
|
|
DIFF=$(diff crytic-export/interfaces/IWETH9.sol "$DIR_TESTS/test_1.sol") |
|
|
|
DIFF=$(diff crytic-export/interfaces/IWETH9.sol "$DIR_TESTS/test_1.sol" --strip-trailing-cr) |
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
then |
|
|
|
then |
|
|
|
echo "slither-interface test 1 failed" |
|
|
|
echo "slither-interface test 1 failed" |
|
|
@ -21,7 +21,7 @@ fi |
|
|
|
|
|
|
|
|
|
|
|
#Test 2 - Local file target |
|
|
|
#Test 2 - Local file target |
|
|
|
slither-interface Mock tests/tools/interface/ContractMock.sol |
|
|
|
slither-interface Mock tests/tools/interface/ContractMock.sol |
|
|
|
DIFF=$(diff crytic-export/interfaces/IMock.sol "$DIR_TESTS/test_2.sol") |
|
|
|
DIFF=$(diff crytic-export/interfaces/IMock.sol "$DIR_TESTS/test_2.sol" --strip-trailing-cr) |
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
then |
|
|
|
then |
|
|
|
echo "slither-interface test 2 failed" |
|
|
|
echo "slither-interface test 2 failed" |
|
|
@ -34,7 +34,7 @@ fi |
|
|
|
|
|
|
|
|
|
|
|
#Test 3 - unroll structs |
|
|
|
#Test 3 - unroll structs |
|
|
|
slither-interface Mock tests/tools/interface/ContractMock.sol --unroll-structs |
|
|
|
slither-interface Mock tests/tools/interface/ContractMock.sol --unroll-structs |
|
|
|
DIFF=$(diff crytic-export/interfaces/IMock.sol "$DIR_TESTS/test_3.sol") |
|
|
|
DIFF=$(diff crytic-export/interfaces/IMock.sol "$DIR_TESTS/test_3.sol" --strip-trailing-cr) |
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
then |
|
|
|
then |
|
|
|
echo "slither-interface test 3 failed" |
|
|
|
echo "slither-interface test 3 failed" |
|
|
@ -46,7 +46,7 @@ fi |
|
|
|
|
|
|
|
|
|
|
|
#Test 4 - exclude structs |
|
|
|
#Test 4 - exclude structs |
|
|
|
slither-interface Mock tests/tools/interface/ContractMock.sol --exclude-structs |
|
|
|
slither-interface Mock tests/tools/interface/ContractMock.sol --exclude-structs |
|
|
|
DIFF=$(diff crytic-export/interfaces/IMock.sol "$DIR_TESTS/test_4.sol") |
|
|
|
DIFF=$(diff crytic-export/interfaces/IMock.sol "$DIR_TESTS/test_4.sol" --strip-trailing-cr) |
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
then |
|
|
|
then |
|
|
|
echo "slither-interface test 4 failed" |
|
|
|
echo "slither-interface test 4 failed" |
|
|
@ -58,7 +58,7 @@ fi |
|
|
|
|
|
|
|
|
|
|
|
#Test 5 - exclude errors |
|
|
|
#Test 5 - exclude errors |
|
|
|
slither-interface Mock tests/tools/interface/ContractMock.sol --exclude-errors |
|
|
|
slither-interface Mock tests/tools/interface/ContractMock.sol --exclude-errors |
|
|
|
DIFF=$(diff crytic-export/interfaces/IMock.sol "$DIR_TESTS/test_5.sol") |
|
|
|
DIFF=$(diff crytic-export/interfaces/IMock.sol "$DIR_TESTS/test_5.sol" --strip-trailing-cr) |
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
then |
|
|
|
then |
|
|
|
echo "slither-interface test 5 failed" |
|
|
|
echo "slither-interface test 5 failed" |
|
|
@ -70,7 +70,7 @@ fi |
|
|
|
|
|
|
|
|
|
|
|
#Test 6 - exclude enums |
|
|
|
#Test 6 - exclude enums |
|
|
|
slither-interface Mock tests/tools/interface/ContractMock.sol --exclude-enums |
|
|
|
slither-interface Mock tests/tools/interface/ContractMock.sol --exclude-enums |
|
|
|
DIFF=$(diff crytic-export/interfaces/IMock.sol "$DIR_TESTS/test_6.sol") |
|
|
|
DIFF=$(diff crytic-export/interfaces/IMock.sol "$DIR_TESTS/test_6.sol" --strip-trailing-cr) |
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
then |
|
|
|
then |
|
|
|
echo "slither-interface test 6 failed" |
|
|
|
echo "slither-interface test 6 failed" |
|
|
@ -82,7 +82,7 @@ fi |
|
|
|
|
|
|
|
|
|
|
|
#Test 7 - exclude events |
|
|
|
#Test 7 - exclude events |
|
|
|
slither-interface Mock tests/tools/interface/ContractMock.sol --exclude-events |
|
|
|
slither-interface Mock tests/tools/interface/ContractMock.sol --exclude-events |
|
|
|
DIFF=$(diff crytic-export/interfaces/IMock.sol "$DIR_TESTS/test_7.sol") |
|
|
|
DIFF=$(diff crytic-export/interfaces/IMock.sol "$DIR_TESTS/test_7.sol" --strip-trailing-cr) |
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
then |
|
|
|
then |
|
|
|
echo "slither-interface test 7 failed" |
|
|
|
echo "slither-interface test 7 failed" |
|
|
|