Created
February 12, 2024 15:39
-
-
Save Errorist79/d0f6a94f9ea2e20a2f95a0fd28c396c7 to your computer and use it in GitHub Desktop.
Aleo unbond tasks
This file contains hidden or 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
set your private key and validator address as a env. (If you don't know where your private key is, it is in a file called validator.key. or it should also be included in the mail you received during onboarding. ) | |
PRIVATE_KEY="PUT YOUR PRIVATE KEY HERE" | |
VAL_ADDRESS="PUT YOUR VALIDATOR ADDRESS HERE" | |
All steps are necessary. | |
- Step 1 | |
# Set the state to false | |
snarkos developer execute credits.aleo set_validator_state false --private-key $PRIVATE_KEY --query "https://api.explorer.aleo.org/v1" --broadcast "https://api.explorer.aleo.org/v1/testnet3/transaction/broadcast" | |
- Step 2 | |
# Fetch all of your delegator addresses, and unbond them. | |
2.a) Fetch delegators | |
## check if python and required libs are installed | |
``` | |
wget https://raw.githubusercontent.com/hoodrunio/Aleo-tools/main/fetch_delegators.py -O fetch_delegators.py | |
``` | |
## Open this script with `nano` or similar editor and set your private key. | |
``` | |
pip3 install requests | |
python3 fetch_delegators.py | |
``` | |
## this script will fetch all of your delegators and save them in a file called delegators.txt | |
2.b) Unbond delegators | |
``` | |
wget https://raw.githubusercontent.com/hoodrunio/Aleo-tools/main/unbond.sh -O unbond.sh | |
``` | |
## Open this script with nano or similar editor and set your private key. | |
``` | |
chmod +x unbond.sh | |
./unbond.sh | |
``` | |
## This may take a while, once the script is complete you can move on to the next step. | |
- Step 3 | |
# Unbond your validator | |
``` | |
AMOUNT=$(curl -s "https://api.explorer.aleo.org/v1/testnet3/program/credits.aleo/mapping/bonded/$VAL_ADDRESS" | awk '{print $5}' | sed 's/\\n}"//') | |
snarkos developer execute credits.aleo unbond_public "$AMOUNT" --private-key $PRIVATE_KEY --query "https://api.explorer.aleo.org/v1" --broadcast "https://api.explorer.aleo.org/v1/testnet3/transaction/broadcast" | |
``` | |
All done, save your tx hash, and send to this email: [email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
omg