mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 10:05:18 +00:00
update deploy script for set vesting account end time
This commit is contained in:
parent
30e8370024
commit
1fa36696bc
@ -7,6 +7,7 @@ function help() {
|
|||||||
echo " -k Keyring password to create key (for Linux only)"
|
echo " -k Keyring password to create key (for Linux only)"
|
||||||
echo " -n Network (default: devnet)"
|
echo " -n Network (default: devnet)"
|
||||||
echo " -c Chain ID (default: \"zgtendermint_16600-1\")"
|
echo " -c Chain ID (default: \"zgtendermint_16600-1\")"
|
||||||
|
echo " -v schedule end time (unix epoch) for vesting accounts"
|
||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,6 +25,7 @@ KEYRING_PASSWORD=""
|
|||||||
NETWORK="devnet"
|
NETWORK="devnet"
|
||||||
TAG_OR_BRANCH="testnet/v0.2.x"
|
TAG_OR_BRANCH="testnet/v0.2.x"
|
||||||
INIT_GENESIS_ENV=""
|
INIT_GENESIS_ENV=""
|
||||||
|
VESTING_ACCOUNT_END_TIME=0
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
@ -44,6 +46,10 @@ while [[ $# -gt 0 ]]; do
|
|||||||
INIT_GENESIS_ENV="$INIT_GENESIS_ENV export CHAIN_ID=$2;"
|
INIT_GENESIS_ENV="$INIT_GENESIS_ENV export CHAIN_ID=$2;"
|
||||||
shift; shift
|
shift; shift
|
||||||
;;
|
;;
|
||||||
|
-v)
|
||||||
|
export VESTING_ACCOUNT_END_TIME=$2
|
||||||
|
shift; shift
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
help
|
help
|
||||||
echo "Unknown flag passed: \"$1\""
|
echo "Unknown flag passed: \"$1\""
|
||||||
@ -52,6 +58,12 @@ while [[ $# -gt 0 ]]; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [[ $VESTING_ACCOUNT_END_TIME -eq 0 ]]; then
|
||||||
|
help
|
||||||
|
echo "schedule end time (unix epoch) for vesting accounts should be set!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
IFS=","; declare -a IPS=($IP_LIST); unset IFS
|
IFS=","; declare -a IPS=($IP_LIST); unset IFS
|
||||||
NUM_NODES=${#IPS[@]}
|
NUM_NODES=${#IPS[@]}
|
||||||
|
|
||||||
|
@ -38,6 +38,8 @@ FAUCET_BALANCE=500000000000000ua0gi
|
|||||||
STAKING=5000000000000ua0gi
|
STAKING=5000000000000ua0gi
|
||||||
VESTING_BALANCE=400000000000000ua0gi
|
VESTING_BALANCE=400000000000000ua0gi
|
||||||
|
|
||||||
|
VESTING_ACCOUNT_START_TIME=$(date -u +%s)
|
||||||
|
|
||||||
# Init configs
|
# Init configs
|
||||||
for ((i=0; i<$NUM_NODES; i++)) do
|
for ((i=0; i<$NUM_NODES; i++)) do
|
||||||
HOMEDIR="$ROOT_DIR"/node$i
|
HOMEDIR="$ROOT_DIR"/node$i
|
||||||
@ -153,7 +155,7 @@ for ((i=0; i<$NUM_NODES; i++)) do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
0gchaind add-genesis-account 0g1zyvrkyr8pmczkguxztxpp3qcd0uhkt0tfxjupt $FAUCET_BALANCE --home "$ROOT_DIR/node$i"
|
0gchaind add-genesis-account 0g1zyvrkyr8pmczkguxztxpp3qcd0uhkt0tfxjupt $FAUCET_BALANCE --home "$ROOT_DIR/node$i"
|
||||||
0gchaind add-genesis-account 0g1jwuhghh6qrln4tthhqrdt3qrmjn9zm05xns46u $VESTING_BALANCE --home "$ROOT_DIR/node$i"
|
0gchaind add-genesis-account 0g1jwuhghh6qrln4tthhqrdt3qrmjn9zm05xns46u $VESTING_BALANCE --vesting-amount $VESTING_BALANCE --vesting-start-time $VESTING_ACCOUNT_START_TIME --vesting-end-time $VESTING_ACCOUNT_END_TIME --home "$ROOT_DIR/node$i"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Prepare genesis txs
|
# Prepare genesis txs
|
||||||
|
Loading…
Reference in New Issue
Block a user