fixed compile script

pull/2/head
yhtiyar 2021-10-29 18:59:44 +03:00
rodzic 4ffc952eb1
commit b340c85bd5
1 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -1,10 +1,9 @@
#!/usr/bin/env sh
#shitty bash code that compiles smart contract with solc
#and puts bytecode to ../bytecodes and abi to ../abis folder
tempdir=".temp"
mkdir $tempdir
tempdir="$(mktemp -d)"
solc --abi --bin $1 -o "$tempdir"
filename=${1%.*}
cp "$tempdir/$filename.bin" "../bytecodes/$filename"
cp "$tempdir/$filename.bin" "../bytecodes/"
cp "$tempdir/$filename.abi" "../abis/$filename.json"
rm $tempdir -r