snt-gas-relay/test-dapp/setup_dev_env.sh

9 lines
543 B
Bash
Raw Normal View History

2018-08-07 03:25:39 +00:00
#!/bin/bash
2018-08-07 03:36:44 +00:00
STT=`cat chains.json | awk /STT/,/}/ | grep -Pzo "0x[0-9A-Za-z]+"`
IdentityFactory=`cat chains.json | awk /IdentityFactory/,/}/ | grep -Pzo "0x[0-9A-Za-z]+"`
SNTController=`cat chains.json | awk /SNTController/,/}/ | grep -Pzo "0x[0-9A-Za-z]+"`
2018-08-07 03:36:44 +00:00
git checkout ../gas-relayer/config/config.js
sed -i 's/%STTAddress%/'"$STT"'/g' ../gas-relayer/config/config.js
sed -i 's/%IdentityFactoryAddress%/'"$IdentityFactory"'/g' ../gas-relayer/config/config.js
sed -i 's/%SNTController%/'"$SNTController"'/g' ../gas-relayer/config/config.js