-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ec2 scripts with new cli commands versions (#2002)
* fix ec2 scripts with new cli commands versions * split faucet into separate file, it may even run in a separate machine
- Loading branch information
Showing
4 changed files
with
32 additions
and
42 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,26 @@ | ||
#!/bin/bash | ||
|
||
AMOUNT=100stake | ||
ACCOUNT=$1 | ||
PASSWORD=$2 | ||
NETWORK=$3 | ||
|
||
while true | ||
do | ||
# Is anyone asking for money | ||
LIST=$(aws s3 ls s3://cosmos-gaia/addresses/) | ||
if [[ -n "${LIST}" ]]; | ||
then | ||
echo ${LIST} | while IFS= read -r row || [[ -n "$row" ]]; do | ||
# for every file in the list pick the address and give money to it, then delete the file | ||
DESTINATION=$(echo $row | awk '{print $4}') | ||
|
||
# Just in case we were running this command with rest-server switched on, get again the address | ||
ADDRESS=$(./gaiacli keys show ${ACCOUNT} --home . --address) | ||
echo ${PASSWORD} | ./gaiacli tx send ${DESTINATION} ${AMOUNT} --home . --from ${ADDRESS} --chain-id=${NETWORK} | ||
|
||
# Remove this address from the ones that needs money | ||
aws s3 rm s3://cosmos-gaia/addresses/${DESTINATION} | ||
done | ||
fi | ||
done |
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
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
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