Crypto.com Chain
$0.03793 0%
CRO · 5w

PSA: A script to claim rewards from all validators and redelegate (safe for cron)

#!/bin/bash # redelegate-cro.sh is a script that automatically claims all your delegation # rewards (across any number of validators) in a single transaction (assuming a # minimum reward threshold is met, to avoid spurious transactions). The rewards # are then automatically redelegated to the provided validator address, leaving # behind at least a 0.005 CRO buffer to ensure there is always enough for # regular transaction fees. # # The idea is that it is safe to run this script on a fixed cron schedule and # feel confident that you are minimizing fees and maximizing APY. # # TODO: Currently, the delegation only happens to a single validator (although # rewards are claimed from all). In future, you will be able to specify # multiple <validator-address>es to evenly split the stake across multiple. # # REQUIREMENTS: # - chain-maind # - jq if [[ "$1" == "-h" ]] then echo "Usage: $0 <wallet-address> <validator-address>" exit fi # Arguments WALLET=$1 VALIDATOR=$2 # Global parameters ...
Continue on gist.github.com
Recent news
No posts found