Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add parameter for specifying a validator key #360

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion scripts/validator-tools-host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Available options:
-a, --axelar-core-version Version of axelar core to checkout
-q, --tofnd-version Version of tofnd to checkout
-d, --root-directory Directory for data. [default: $HOME/.axelar_testnet]
-i, --validator-key-name The name of the validator key. [default: validator]
-n, --network Core Network to connect to [testnet|mainnet]
-p, --proxy-mnemonic-path Path to broadcaster mnemonic
-z, --tofnd-mnemonic-path Path to tofnd mnemonic
Expand Down Expand Up @@ -76,6 +77,7 @@ parse_params() {
tofnd_version=""
root_directory=""
git_root="$(git rev-parse --show-toplevel)"
validator_key_name="validator"
network="testnet"
proxy_mnemonic_path='unset'
tofnd_mnemonic_path='unset'
Expand All @@ -98,6 +100,10 @@ parse_params() {
root_directory="${2-}"
shift
;;
-i | --validator-key-name)
validator_key_name="${2-}"
shift
;;
-n | --network)
network="${2-}"
shift
Expand Down Expand Up @@ -407,7 +413,7 @@ prepare() {

echo "$KEYRING_PASSWORD" | "${axelard_binary_path}" keys show broadcaster -a --home "${vald_directory}" > "${root_directory}/broadcaster.address" 2>&1

validator_address=$(echo "${KEYRING_PASSWORD}" | ${axelard_binary_path} keys show validator -a --bech val --home "${core_directory}")
validator_address=$(echo "${KEYRING_PASSWORD}" | ${axelard_binary_path} keys show ${validator_key_name} -a --bech val --home "${core_directory}")
if [ -z "$validator_address" ]; then
until [ -f "${root_directory}/validator.bech" ] ; do
echo "Waiting for validator address to be accessible at ${root_directory}/validator.bech"
Expand Down Expand Up @@ -479,6 +485,7 @@ msg "- tofnd-mnemonic-path: ${tofnd_mnemonic_path}"
#msg "- recovery-info-path: ${recovery_info_path}"
msg "- network: ${network}"
msg "- environment: ${environment}"
msg "- validator-key-name: ${validator_key_name}"
msg "- node-moniker: ${node_moniker}"
msg "- script_dir: ${script_dir}"
msg "- chain-id: ${chain_id}"
Expand Down