Created
February 11, 2021 14:12
-
-
Save gotjoshua/d754913f2a8a2c38eed666331ebef241 to your computer and use it in GitHub Desktop.
fill cosmos wallets with sequential names and create when needed
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
#!/bin/bash | |
# | |
# usage tasks.sh START END NewAdressesPrefix SendingKeyName | |
read -e -s -p "Keyring pass?" PP | |
START=${1:-0} | |
END=${2:-380} | |
RANGE=$(eval echo {$START..$END}) | |
PREFIX=${3:-begreenXtra} | |
SENDER=${4:-begreen} | |
for i in $RANGE; do | |
whichWallet="${PREFIX}${i}" | |
echo $whichWallet | |
eachAddress=$(echo $PP | regen keys show $whichWallet -a) 2> /dev/null | |
[ $eachAddress ] || echo $PP | regen keys add $whichWallet && eachAddress=$(echo $PP | regen keys show $whichWallet -a) | |
sendCmd="regen tx bank send $SENDER $eachAddress 100000utree --chain-id aplikigo-1 --node http://161.35.51.84:26657 --memo $whichWallet --gas-prices 0.025utree -y" | |
echo $sendCmd | |
echo $PP | $sendCmd | |
echo "--------------------" | |
echo | |
sleep 2 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment