forked from rf222222/iotblock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_testnet.sh
executable file
·42 lines (39 loc) · 941 Bytes
/
build_testnet.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
sudo pip3 install -r requirements.txt
echo $1
PATH=./node_modules/.bin:$PATH
export PATH
killall -9 node
killall -9 python3
rm -fr ./node_modules
npm install yarn
chmod +x node_modules/.bin/yarn
node_modules/.bin/yarn
tar -xvf web3providerfix_local.tar
chmod +x node_modules/.bin/ganache-cli
./node_modules/.bin/ganache-cli -p 9545 -i 4447 -e 1000 &
rm -fr bin/*
rm -fr build/*
rm -fr src/solc/contracts/*
chmod +x node_modules/.bin/truffle
./node_modules/.bin/truffle compile
./node_modules/.bin/truffle migrate --reset --network development
if ! [ -d src/solc/contracts/ ]
then
mkdir -p src/solc/contracts/
fi
cp -pR build/contracts/* src/solc/contracts/
sh build_solcjs.sh
case $1 in
bg)
python3 server/index_testnet.py &
npm start &
;;
*)
python3 server/index_testnet.py &
npm start
;;
esac
#python3 testnet/restore_hypercat.py
#python3 testnet/test_smartkey.py
#npm start