-
Notifications
You must be signed in to change notification settings - Fork 99
/
start-v140.sh
21 lines (15 loc) · 1.15 KB
/
start-v140.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
rm -rf $HOME/.teritorid/
cd $HOME
teritorid140 init --chain-id=testing testing --home=$HOME/.teritorid
teritorid140 keys add validator --keyring-backend=test --home=$HOME/.teritorid
teritorid140 add-genesis-account $(teritorid140 keys show validator -a --keyring-backend=test --home=$HOME/.teritorid) 100000000000utori,100000000000stake --home=$HOME/.teritorid
teritorid140 gentx validator 500000000stake --keyring-backend=test --home=$HOME/.teritorid --chain-id=testing
teritorid140 collect-gentxs --home=$HOME/.teritorid
VALIDATOR=$(teritorid140 keys show -a validator --keyring-backend=test --home=$HOME/.teritorid)
sed -i '' -e 's/"owner": ""/"owner": "'$VALIDATOR'"/g' $HOME/.teritorid/config/genesis.json
sed -i '' -e 's/enabled-unsafe-cors = false/enabled-unsafe-cors = true/g' $HOME/.teritorid/config/app.toml
sed -i '' -e 's/enable = false/enable = true/g' $HOME/.teritorid/config/app.toml
sed -i '' -e 's/cors_allowed_origins = \[\]/cors_allowed_origins = ["*"]/g' $HOME/.teritorid/config/config.toml
sed -i '' 's/"voting_period": "172800s"/"voting_period": "20s"/g' $HOME/.teritorid/config/genesis.json
teritorid140 start --home=$HOME/.teritorid