File tree Expand file tree Collapse file tree 13 files changed +99
-8941
lines changed Expand file tree Collapse file tree 13 files changed +99
-8941
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- # Install eth-brownie if it's not already present
4
- if [[ -z " $( command -v brownie) " ]]
5
- then pip install eth-brownie
6
- fi
7
-
3
+ pip install eth-brownie
8
4
brownie bake token
9
-
10
5
cd token || exit 255
11
6
12
- if ! crytic-compile . --compile-force-framework Brownie
13
- then echo " Brownie test failed" && exit 255
14
- else echo " Brownie test passed" && exit 0
7
+ crytic-compile . --compile-force-framework Brownie
8
+
9
+ if [ $? -ne 0 ]
10
+ then
11
+ echo " Brownie test failed"
12
+ exit 255
15
13
fi
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- # Test buidler integration
3
+ # ## Test buidler integration
4
4
5
5
cd tests/buidler || exit 255
6
6
7
- npm install || exit 255
7
+ npm install --save-dev @nomiclabs/buidler
8
8
9
- if ! crytic-compile .
10
- then echo " Buidler test failed" && exit 255
11
- else echo " Buidler test passed" && exit 0
9
+ crytic-compile .
10
+ if [ $? -ne 0 ]
11
+ then
12
+ echo " buidler test failed"
13
+ exit 255
12
14
fi
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- # Test dapp integration
3
+ # ## Test dapp integration
4
4
5
5
DIR=$( mktemp -d)
6
6
cd " $DIR " || exit 255
@@ -16,7 +16,10 @@ nix-env -f "$HOME/.dapp/dapptools" -iA dapp seth solc hevm ethsign
16
16
17
17
dapp init
18
18
19
- if ! crytic-compile . --compile-remove-metadata
20
- then echo " dapp test failed" && exit 255
21
- else echo " dapp test passed" && exit 0
19
+ crytic-compile . --compile-remove-metadata
20
+ if [ $? -ne 0 ]
21
+ then
22
+ echo " dapp test failed"
23
+ exit 255
22
24
fi
25
+
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- # Test embark integration
3
+ # ## Test embark integration
4
4
5
5
cd /tmp || exit 255
6
6
13
13
embark demo
14
14
cd /tmp/embark_demo || exit 255
15
15
npm install
16
+ crytic-compile . --embark-overwrite-config --compile-remove-metadata
16
17
17
- if ! crytic-compile . --embark-overwrite-config --compile-remove-metadata
18
- then echo " Embark test failed" && exit 255
19
- else echo " Embark test passed" && exit 0
18
+ if [ $? -ne 0 ]
19
+ then
20
+ echo " Embark test failed"
21
+ exit 255
20
22
fi
23
+
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- # Test etherlime integration
3
+ # ## Test etherlime integration
4
4
5
5
DIR=$( mktemp -d)
6
6
cd " $DIR " || exit 255
7
7
8
- # Install etherlime if it's not already present
9
- if [[ -z " $( command -v etherlime) " ]]
10
- then npm i -g etherlime
11
- fi
12
-
8
+ npm i -g etherlime
13
9
etherlime init
10
+ crytic-compile . --compile-remove-metadata
14
11
15
- if ! crytic-compile . --compile-remove-metadata
16
- then echo " Etherlime test failed" && exit 255
17
- else echo " Etherlime test passed" && exit 0
12
+ if [ $? -ne 0 ]
13
+ then
14
+ echo " Etherlime test failed"
15
+ exit 255
18
16
fi
17
+
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- # Test etherscan integration
3
+ # ## Test etherscan integration
4
4
5
5
DIR=$( mktemp -d)
6
6
cd " $DIR " || exit 255
7
7
8
8
solc-select use 0.4.25 --always-install
9
9
10
- if ! crytic-compile 0x7F37f78cBD74481E593F9C737776F7113d76B315 --compile-remove-metadata --etherscan-apikey " $GITHUB_ETHERSCAN "
11
- then echo " Etherscan test failed" && exit 255
10
+ crytic-compile 0x7F37f78cBD74481E593F9C737776F7113d76B315 --compile-remove-metadata --etherscan-apikey " $GITHUB_ETHERSCAN "
11
+
12
+ if [ $? -ne 0 ]
13
+ then
14
+ echo " Etherscan test failed"
15
+ exit 255
12
16
fi
13
17
18
+ crytic-compile rinkeby:0xFe05820C5A92D9bc906D4A46F662dbeba794d3b7 --compile-remove-metadata --etherscan-apikey " $GITHUB_ETHERSCAN "
14
19
15
- if ! crytic-compile rinkeby:0xFe05820C5A92D9bc906D4A46F662dbeba794d3b7 --compile-remove-metadata --etherscan-apikey " $GITHUB_ETHERSCAN "
16
- then echo " Etherscan test failed" && exit 255
20
+ if [ $? -ne 0 ]
21
+ then
22
+ echo " Etherscan test failed"
23
+ exit 255
17
24
fi
18
25
19
26
# From crytic/slither#1154
20
- if ! crytic-compile 0xcfc1E0968CA08aEe88CbF664D4A1f8B881d90f37 --compile-remove-metadata --etherscan-apikey " $GITHUB_ETHERSCAN "
21
- then echo " Etherscan test failed" && exit 255
22
- fi
27
+ crytic-compile 0xcfc1E0968CA08aEe88CbF664D4A1f8B881d90f37 --compile-remove-metadata --etherscan-apikey " $GITHUB_ETHERSCAN "
23
28
24
- echo " Etherscan test passed" && exit 0
29
+ if [ $? -ne 0 ]
30
+ then
31
+ echo " Etherscan test failed"
32
+ exit 255
33
+ fi
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- # Test foundry integration
3
+ # ## Test foundry integration
4
4
5
- # Setup temp environment
6
- DIR=$( mktemp -d)
7
- cd " $DIR " || exit 255
5
+
6
+ cd /tmp || exit 255
7
+
8
+ curl -L https://foundry.paradigm.xyz | bash
9
+ export PATH=$PATH :/home/runner/.foundry/bin
10
+ foundryup
8
11
9
12
# The foundry init process makes a temporary local git repo and needs certain values to be set
10
13
git config --global user.email
" [email protected] "
11
14
git config --global user.name " CI User"
12
15
13
- # Install foundry if it's not already present
14
- if [[ -z " $( command -v foundryup) " ]]
15
- then
16
- curl -L https://foundry.paradigm.xyz | bash
17
- export PATH=$PATH :/home/runner/.foundry/bin
18
- fi
19
-
20
- foundryup
16
+ mkdir forge_test
17
+ cd forge_test || exit 255
21
18
forge init
22
19
23
- if ! crytic-compile .
24
- then echo " Foundry test failed" && exit 255
25
- else echo " Foundry test passed" && exit 0
20
+ crytic-compile .
21
+ if [ $? -ne 0 ]
22
+ then
23
+ echo " foundry test failed"
24
+ exit 255
26
25
fi
Original file line number Diff line number Diff line change @@ -6,7 +6,9 @@ cd tests/hardhat || exit 255
6
6
7
7
npm install
8
8
9
- if ! crytic-compile .
10
- then echo " Hardhat test failed" && exit 255
11
- else echo " Hardhat test passed" && exit 0
9
+ crytic-compile .
10
+ if [ $? -ne 0 ]
11
+ then
12
+ echo " hardhat test failed"
13
+ exit 255
12
14
fi
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
3
DIR=$( mktemp -d)
4
+
4
5
cp tests/contract.sol " $DIR "
5
6
cd " $DIR " || exit 255
6
-
7
7
crytic-compile contract.sol --compile-remove-metadata --export-format truffle
8
8
9
9
cd - || exit 255
10
10
DIFF=$( diff " $DIR /crytic-export/C.json" tests/expected/solc-demo.json)
11
11
if [ " $? " != " 0" ] || [ " $DIFF " != " " ]
12
- then echo -e " solc test failed\n$DIFF " && exit 255
13
- else echo -e " solc test passed" && exit 0
12
+ then
13
+ echo " solc test failed"
14
+ echo " $DIFF "
15
+ exit 255
14
16
fi
17
+
18
+
Original file line number Diff line number Diff line change 5
5
DIR=$( mktemp -d)
6
6
cd " $DIR " || exit 255
7
7
8
- # Install truffle if it's not already present
9
- if [[ -z " $( command -v truffle) " ]]
10
- then npm install -g truffle
11
- fi
12
-
8
+ npm install -g truffle
13
9
truffle unbox metacoin
10
+ crytic-compile . --compile-remove-metadata
14
11
15
- if ! crytic-compile . --compile-remove-metadata
16
- then echo " Truffle test failed" && exit 255
17
- else echo " Truffle test passed" && exit 0
12
+ if [ $? -ne 0 ]
13
+ then
14
+ echo " Truffle test failed"
15
+ exit 255
18
16
fi
19
-
20
17
# TODO: for some reason truffle output is not deterministc
21
18
# The assigned id changes
22
19
# cd -
You can’t perform that action at this time.
0 commit comments