Skip to content

Instantly share code, notes, and snippets.

View Erumite's full-sized avatar

(Eremite) Erumite

View GitHub Profile
#! /bin/bash
# -------- Config --------
# WALLET_NAME should be the name of the wallet (chain-maind keys list)
WALLET_NAME="Default"
# If WALLET_ADDRESS is blank, it will try to pull your address. (chain-maind keys show ${WALLET_NAME} --address)
# This is my address, so replace it with your own. Feel free to send me a murder of CROs.
# NOTE: All transactions with my address will fail since you don't have my keys, of course.
WALLET_ADDRESS="cro1ghlngrfrvjjf7r2h6ffpwaqcs630qxm509p2el"
# VALIDATOR_IGNORE_REGEX is a Regular Expression that will ignore specific validators for re-delegating but
#! /bin/bash
# !!! Don't just run scripts you find from strangers on the internet !!!
# This is provided as-is for reference since running chain-maind commands
# is a lot of trial and error when getting started.
# This script will find all your CRO delegations and withdraw all rewards in a single transaction.
# It will then optionally restake to the pool with the lowest stake if it's not in an ignore list.
#
# It also seems to significantly reduce fees over using the desktop app: