Skip to content

Commit

Permalink
operator commands
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-vseznaika committed Oct 20, 2024
1 parent dc95c9c commit 5658228
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions story-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,14 @@ validator_operations() {
;;
4)
echo "Managing operators..."

# Ask whether to add or remove the operator
echo "Select an operation:"
echo "1. Add Operator"
echo "2. Remove Operator"
read -rp "Enter your choice [1-2]: " operation_choice

# Prompt for the operator's EVM address
read -rp "Enter the operator's EVM address: " operator_address

# Check if the private_key.txt file exists
Expand All @@ -401,9 +409,24 @@ validator_operations() {
return 1
fi

# Add the operator
"$HOME/go/bin/story" validator add-operator --operator "$operator_address" --private-key "$private_key"
# Perform the selected operation
case $operation_choice in
1)
# Add the operator
"$HOME/go/bin/story" validator add-operator --operator "$operator_address" --private-key "$private_key"
echo "Operator added successfully."
;;
2)
# Remove the operator
"$HOME/go/bin/story" validator remove-operator --operator "$operator_address" --private-key "$private_key"
echo "Operator removed successfully."
;;
*)
echo "Invalid option. Please enter 1 or 2."
;;
esac
;;

5)
echo "Setting withdrawal address..."
read -rp "Enter the withdrawal EVM address: " withdrawal_address
Expand Down

0 comments on commit 5658228

Please sign in to comment.