|
|
|
@ -5,7 +5,7 @@ |
|
|
|
|
DIR_TESTS="tests/check-upgradeability" |
|
|
|
|
solc-select use "0.5.0" |
|
|
|
|
|
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contractV1.sol" ContractV1 --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy > test_1.txt |
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contractV1.sol" ContractV1 --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy > test_1.txt 2>&1 |
|
|
|
|
DIFF=$(diff test_1.txt "$DIR_TESTS/test_1.txt") |
|
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
|
then |
|
|
|
@ -16,7 +16,7 @@ then |
|
|
|
|
exit 255 |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contractV1.sol" ContractV1 --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy --new-contract-filename "$DIR_TESTS/contractV2.sol" --new-contract-name ContractV2 > test_2.txt |
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contractV1.sol" ContractV1 --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy --new-contract-filename "$DIR_TESTS/contractV2.sol" --new-contract-name ContractV2 > test_2.txt 2>&1 |
|
|
|
|
DIFF=$(diff test_2.txt "$DIR_TESTS/test_2.txt") |
|
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
|
then |
|
|
|
@ -27,7 +27,7 @@ then |
|
|
|
|
exit 255 |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contractV1.sol" ContractV1 --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy --new-contract-filename "$DIR_TESTS/contractV2_bug.sol" --new-contract-name ContractV2 > test_3.txt |
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contractV1.sol" ContractV1 --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy --new-contract-filename "$DIR_TESTS/contractV2_bug.sol" --new-contract-name ContractV2 > test_3.txt 2>&1 |
|
|
|
|
DIFF=$(diff test_3.txt "$DIR_TESTS/test_3.txt") |
|
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
|
then |
|
|
|
@ -38,7 +38,7 @@ then |
|
|
|
|
exit 255 |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contractV1.sol" ContractV1 --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy --new-contract-filename "$DIR_TESTS/contractV2_bug2.sol" --new-contract-name ContractV2 > test_4.txt |
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contractV1.sol" ContractV1 --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy --new-contract-filename "$DIR_TESTS/contractV2_bug2.sol" --new-contract-name ContractV2 > test_4.txt 2>&1 |
|
|
|
|
DIFF=$(diff test_4.txt "$DIR_TESTS/test_4.txt") |
|
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
|
then |
|
|
|
@ -49,7 +49,7 @@ then |
|
|
|
|
exit 255 |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contract_initialization.sol" Contract_no_bug --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy > test_5.txt |
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contract_initialization.sol" Contract_no_bug --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy > test_5.txt 2>&1 |
|
|
|
|
DIFF=$(diff test_5.txt "$DIR_TESTS/test_5.txt") |
|
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
|
then |
|
|
|
@ -62,7 +62,7 @@ then |
|
|
|
|
exit 255 |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contract_initialization.sol" Contract_no_bug --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy > test_5.txt |
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contract_initialization.sol" Contract_no_bug --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy > test_5.txt 2>&1 |
|
|
|
|
DIFF=$(diff test_5.txt "$DIR_TESTS/test_5.txt") |
|
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
|
then |
|
|
|
@ -76,7 +76,7 @@ then |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contract_initialization.sol" Contract_lack_to_call_modifier --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy > test_6.txt |
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contract_initialization.sol" Contract_lack_to_call_modifier --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy > test_6.txt 2>&1 |
|
|
|
|
DIFF=$(diff test_6.txt "$DIR_TESTS/test_6.txt") |
|
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
|
then |
|
|
|
@ -90,7 +90,7 @@ then |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contract_initialization.sol" Contract_not_called_super_init --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy > test_7.txt |
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contract_initialization.sol" Contract_not_called_super_init --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy > test_7.txt 2>&1 |
|
|
|
|
DIFF=$(diff test_7.txt "$DIR_TESTS/test_7.txt") |
|
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
|
then |
|
|
|
@ -103,7 +103,7 @@ then |
|
|
|
|
exit 255 |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contract_initialization.sol" Contract_no_bug_inherits --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy > test_8.txt |
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contract_initialization.sol" Contract_no_bug_inherits --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy > test_8.txt 2>&1 |
|
|
|
|
DIFF=$(diff test_8.txt "$DIR_TESTS/test_8.txt") |
|
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
|
then |
|
|
|
@ -116,7 +116,7 @@ then |
|
|
|
|
exit 255 |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contract_initialization.sol" Contract_double_call --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy > test_9.txt |
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contract_initialization.sol" Contract_double_call --proxy-filename "$DIR_TESTS/proxy.sol" --proxy-name Proxy > test_9.txt 2>&1 |
|
|
|
|
DIFF=$(diff test_9.txt "$DIR_TESTS/test_9.txt") |
|
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
|
then |
|
|
|
@ -129,7 +129,7 @@ then |
|
|
|
|
exit 255 |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contractV1.sol" ContractV1 --new-contract-filename "$DIR_TESTS/contract_v2_constant.sol" --new-contract-name ContractV2 > test_10.txt |
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contractV1.sol" ContractV1 --new-contract-filename "$DIR_TESTS/contract_v2_constant.sol" --new-contract-name ContractV2 > test_10.txt 2>&1 |
|
|
|
|
DIFF=$(diff test_10.txt "$DIR_TESTS/test_10.txt") |
|
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
|
then |
|
|
|
@ -142,7 +142,7 @@ then |
|
|
|
|
exit 255 |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contract_v1_var_init.sol" ContractV1 > test_11.txt |
|
|
|
|
slither-check-upgradeability "$DIR_TESTS/contract_v1_var_init.sol" ContractV1 > test_11.txt 2>&1 |
|
|
|
|
DIFF=$(diff test_11.txt "$DIR_TESTS/test_11.txt") |
|
|
|
|
if [ "$DIFF" != "" ] |
|
|
|
|
then |
|
|
|
|