forked from EYBlockchain/starlight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.sh
executable file
·23 lines (22 loc) · 928 Bytes
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
npm i solc@^0.8.0 -g
cd zapps/
echo “$(tput setaf 3) SHIELDCONTRACTS”
SOLFILES=$(find . -type f -name "*Shield*.sol" -maxdepth 3 -mindepth 3)
solarray=($SOLFILES)
for solelement in "${solarray[@]}"
do
DIR="$(dirname "${solelement}")"
solelement="${solelement:2}"
echo “$(tput setaf 7) $solelement compiling”
solcjs --abi -o $DIR --include-path node_modules/ --base-path . $solelement || echo “$(tput setaf 1) $solelement failed”
done
echo “$(tput setaf 3) CIRCUITS”
ZOKFILES=$(find . -type f -name "*.zok" -maxdepth 3 -mindepth 3)
zokarray=($ZOKFILES)
for zokelement in "${zokarray[@]}"
do
zokelement="${zokelement:1}"
echo “$(tput setaf 7) $zokelement compiling”
docker run -v $PWD:/app/code --name testcircuits -ti ghcr.io/eyblockchain/zokrates-worker-m1 ./zokrates compile -i code$zokelement || echo “$(tput setaf 1) $zokelement failed”
docker rm testcircuits
done