2018-08-07 03:25:39 +00:00
|
|
|
#!/bin/bash
|
|
|
|
geth account import test_pk --password config/development/password --datadir .embark/development/datadir/
|
2018-08-09 21:23:32 +00:00
|
|
|
geth account import test2_pk --password config/development/password --datadir .embark/development/datadir/
|
|
|
|
|
2018-08-07 03:25:39 +00:00
|
|
|
echo 'Waiting 5s before unlocking the account'
|
2018-08-07 03:36:44 +00:00
|
|
|
sleep 5s
|
2018-08-07 03:25:39 +00:00
|
|
|
geth --exec "personal.unlockAccount('0xb8d851486d1c953e31a44374aca11151d49b8bb3', 'dev_password', 0)" attach .embark/development/datadir/geth.ipc
|
2018-08-09 21:23:32 +00:00
|
|
|
geth --exec "personal.unlockAccount('0xacB57b896A80FCA848E279e87043d52e84f2c6Db', 'dev_password', 0)" attach .embark/development/datadir/geth.ipc
|
2018-08-07 03:25:39 +00:00
|
|
|
|
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]+"`
|
2018-08-09 21:23:32 +00:00
|
|
|
SNTController=`cat chains.json | awk /SNTController/,/}/ | grep -Pzo "0x[0-9A-Za-z]+"`
|
2018-08-07 03:36:44 +00:00
|
|
|
|
2018-08-09 21:23:32 +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
|