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

Faucet don't give a second chance #2210

Merged
merged 13 commits into from
Mar 12, 2019
Next Next commit
make faucet richer once, no money twice
Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>
sabau committed Mar 7, 2019
commit 00e824e71eff1253b90632ce513ef0cc205c52e5
22 changes: 15 additions & 7 deletions .aws/faucet.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

AMOUNTS=10000000stake
AMOUNTP=5photino
AMOUNTC=1cococoin
AMOUNTP=5000000photino
AMOUNTC=123123cococoin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use pesocoin 🇨🇱

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

next coin will be that one


ACCOUNT=$1
PASSWORD=$2
@@ -19,14 +19,22 @@ do
DESTINATION=$(echo $row | awk '{print $4}')
if [[ ${#DESTINATION} -eq 45 ]];
then
# work only on stuff that have the right length
ADDRESS=$(./gaiacli keys show ${ACCOUNT} --home . --address)
echo ${PASSWORD} | ./gaiacli tx send ${DESTINATION} ${AMOUNTS} --home . --from ${ADDRESS} --chain-id=${NETWORK}
echo ${PASSWORD} | ./gaiacli tx send ${DESTINATION} ${AMOUNTP} --home . --from ${ADDRESS} --chain-id=${NETWORK}
echo ${PASSWORD} | ./gaiacli tx send ${DESTINATION} ${AMOUNTC} --home . --from ${ADDRESS} --chain-id=${NETWORK}
ACCOUNT_INFO=$(./gaiacli query account ${DESTINATION} --chain-id ${NETWORK} --trust-node --home .)
dt=$(date '+%d/%m/%Y %H:%M:%S');
if [[ ${ACCOUNT_INFO} == *"auth/Account"* ]]; then
echo "$dt - $DESTINATION already funded, bye greedy b****rd!"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol i don't know about this b****rd

else
# work only on stuff that have the right length
ADDRESS=$(./gaiacli keys show ${ACCOUNT} --home . --address)
echo ${PASSWORD} | ./gaiacli tx send ${DESTINATION} ${AMOUNTS} --home . --from ${ADDRESS} --chain-id=${NETWORK}
echo ${PASSWORD} | ./gaiacli tx send ${DESTINATION} ${AMOUNTP} --home . --from ${ADDRESS} --chain-id=${NETWORK}
echo ${PASSWORD} | ./gaiacli tx send ${DESTINATION} ${AMOUNTC} --home . --from ${ADDRESS} --chain-id=${NETWORK}
echo "$dt - $DESTINATION funded, enjoy!"
fi
fi
# Remove this address from the ones that needs money
aws s3 rm s3://cosmos-gaia/addresses/${DESTINATION}
done
fi
sleep 10s
done
2 changes: 1 addition & 1 deletion .aws/first.sh
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ NODEID=$(./gaiad tendermint show-node-id --home .)

# Create our main account and add it to the genesis with a lot of money
echo ${PASSWORD} | ./gaiacli keys add ${ACCOUNT} --home . > account_address.log
./gaiad add-genesis-account $(./gaiacli keys show ${ACCOUNT} --home . --address) 100000000000000000stake,999000000000photino,123123123123cococoin --home .
./gaiad add-genesis-account $(./gaiacli keys show ${ACCOUNT} --home . --address) 1000000000000000000000stake,100000000000000000000photino,123123123123123123cococoin --home .
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not 9999999999999999999999999999999 so we don't run out

Copy link
Contributor Author

@sabau sabau Mar 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

18446744073709551615 should be the biggest available

go Tour

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol ok why not that number then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are already overflowing XD:

1000000000000000000000
18446744073709551615

So probably we already have everything we can

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, on SDK I found out big integers are used so we have way more than 64 bits, as soon as I'm sure about the number of bits I'll update this number


echo ${PASSWORD} | ./gaiad gentx --name ${ACCOUNT} --home . --home-client .
./gaiad collect-gentxs --home .
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]


## [1.0.0-beta.15] - 2019-03-07

### Changed
5 changes: 2 additions & 3 deletions PENDING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
## [Unreleased]

### Added

- [\#2104](https://github.com/cosmos/voyager/issues/2104) fix transaction times @fedekunze

### Changed

- [#\2202](https://github.com/cosmos/voyager/pull/2202) Fix circle configuration for publishing @sabau
- [\#1805](https://github.com/cosmos/voyager/issues/1805) support all transaction types @fedekunze
- [\#1805](https://github.com/cosmos/voyager/issues/1805) support all transaction types @fedekunze
- [\#2210](https://github.com/cosmos/voyager/pull/2210) Enrich faucet @sabau