-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to generate vesting accounts (#455)
- Loading branch information
Showing
3 changed files
with
44 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
CONFIG=~/.starsd/config | ||
NETWORK=cygnusx-1 | ||
GENESIS_TIME=2021-05-25T00:44:44.536813Z | ||
START_TIME=$(TZ=UTC date -j -f "%Y-%m-%dT%H:%M:%S" ${GENESIS_TIME:0:19} +%s) | ||
ONE_YEAR=31556926 | ||
ONE_HOUR=3600 | ||
|
||
rm -rf $CONFIG/gentx && mkdir $CONFIG/gentx | ||
starsd init stargaze --chain-id=$NETWORK --stake-denom ustarx --overwrite | ||
|
||
vesting_start_time=$(($START_TIME + $ONE_HOUR)) | ||
vesting_end_time=$(($vesting_start_time + $ONE_HOUR)) | ||
|
||
starsd add-genesis-account stars15zx6hhjcnnnwt3nlf49gae3dd5n4vkjxef6gq2 333333333333334ustarx \ | ||
--vesting-amount 333333332333334ustarx \ | ||
--vesting-start-time $vesting_start_time \ | ||
--vesting-end-time $vesting_end_time | ||
|
||
starsd add-genesis-account stars1s4ckh9405q0a3jhkwx9wkf9hsjh66nmuu53dwe 333333333333333ustarx \ | ||
--vesting-amount 333333332333333ustarx \ | ||
--vesting-start-time $vesting_start_time \ | ||
--vesting-end-time $vesting_end_time | ||
|
||
starsd add-genesis-account stars1g457jcltvqdpt50ysq8fe2e7hwtnmnlmc2mkht 333333333333333ustarx \ | ||
--vesting-amount 333333332333333ustarx \ | ||
--vesting-start-time $vesting_start_time \ | ||
--vesting-end-time $vesting_end_time | ||
|
||
sed -i '' "2s/.*/ \"genesis_time\": \"$GENESIS_TIME\",/" $CONFIG/genesis.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
CONFIG=~/.starsd/config | ||
NETWORK=cygnusx-1 | ||
|
||
echo "Writing genesis accounts..." | ||
sh ./accounts.sh | ||
|
||
echo "Writing validator transactions..." | ||
sh ./validators.sh | ||
|
||
cp $CONFIG/genesis.json $NETWORK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
#!/bin/bash | ||
|
||
NETWORK=bellatrix-1 | ||
NETWORK=cygnusx-1 | ||
CONFIG=~/.starsd/config | ||
INITIAL_COINS=100000000ustarx | ||
|
||
rm -rf $CONFIG/gentx && mkdir $CONFIG/gentx | ||
starsd init stargaze --chain-id=$NETWORK --stake-denom ustarx --overwrite | ||
for i in $NETWORK/gentx/*.json; do | ||
echo $i | ||
starsd add-genesis-account $(jq -r '.body.messages[0].delegator_address' $i) $INITIAL_COINS | ||
cp $i $CONFIG/gentx/ | ||
done | ||
starsd collect-gentxs | ||
|
||
cp $CONFIG/genesis.json $NETWORK |