-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·71 lines (58 loc) · 3.02 KB
/
setup.sh
File metadata and controls
executable file
·71 lines (58 loc) · 3.02 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
set -e
# Stop any running instances of heliades and clean up old data
killall heliades &>/dev/null || true
rm -rf ~/.heliades
# Define chain parameters
CHAINID="42000"
MONIKER="helios-main-node"
# Initialize the chain with a moniker and chain ID
heliades init $MONIKER --chain-id $CHAINID
# Setup specifificities of the genesis and config
sh setup-helios-genesis-configuration.sh
# Define the keys array
KEYS=(
"user0"
# "user1"
# "user2"
# "user3"
# "user4"
# "user5"
# "user6"
# "user7"
# "user8"
)
# Define mnemonics array (in same order as keys)
MNEMONICS=(
"web tail earth lesson domain feel slush bring amused repair lounge salt series stock fog remind ripple peace unknown sauce adjust blossom atom hotel"
"west mouse extra original dizzy dinosaur corn lottery access off slab surge piano build rabbit educate amused trophy orbit cable relax chimney trend inner"
"final rude almost banner language raven soon world aim pole copper poverty camera post wet humble hurt element find alone frown damp feature sadness"
"pupil target orient whip evidence life uniform mother senior strong lizard lens gesture young east armor loop library shadow fee host throw junk more"
"museum violin scan lonely knife fiscal ask science treat undo vacuum mention surge uniform mail tackle cricket artwork mimic alpha hero north before loan"
"lawsuit fame nice soft left method source ticket stage tourist unfold audit often reveal raise okay project absorb bubble spoon bounce track ready poet"
"slow fine dentist give small black shrug mouse fix coral omit type fish palace portion rhythm danger cream notice bless print pioneer announce course"
"liar oven damp useless again please dream birth box bottom hat olive slow rice busy atom carpet pilot always trust balcony hammer extend laptop"
"cash shoulder people eternal expire occur pen black funny idle afraid manual pause replace faith goose junior kite forest poet pulp treat cable merry"
)
# Import keys from mnemonics
for i in "${!KEYS[@]}"; do
heliades keys add ${KEYS[$i]} --from-mnemonic "${MNEMONICS[$i]}" --keyring-backend="local"
done
# Integrate accounts into the genesis block with specifical balance
for key in "${KEYS[@]}"; do
heliades add-genesis-account --chain-id $CHAINID $(heliades keys show $key -a --keyring-backend="local") 1000000000000000000000ahelios --keyring-backend="local"
done
echo "Signing genesis transaction"
# Register as Validator genesis account and delegate 900000 ahelios
heliades gentx user0 900000000000000000000ahelios --chain-id $CHAINID --keyring-backend="local" --gas-prices "1000000000ahelios"
# Add treasury account
TREASURY_ADDRESS="helios1aj2gcctecp874q90jclsuk6c2k6kvdthwek60l"
echo "Adding funds to treasury address: ${TREASURY_ADDRESS}"
heliades add-genesis-account --chain-id $CHAINID ${TREASURY_ADDRESS} 100ahelios --keyring-backend="local"
echo "Collecting genesis transaction"
# Collect genesis Validators tx
heliades collect-gentxs
echo "Validating genesis"
# Validate the genesis file
heliades validate-genesis
echo "Setup done!"