Skip to content

Instantly share code, notes, and snippets.

@Validatrium
Last active February 2, 2022 13:50
Show Gist options
  • Save Validatrium/faf63de0dda2298c4d00349d1612c548 to your computer and use it in GitHub Desktop.
Save Validatrium/faf63de0dda2298c4d00349d1612c548 to your computer and use it in GitHub Desktop.
How to claim rewards and delegate them to your node via CLI

Tutorial created by Validatrium (more info on our projects at validatrium.com)

NOTE: If you're not running an active set validator, progress to step 3

Steps:

  1. Check available rewards
  2. Withdraw commision
  3. Withdraw rewards
  4. Check balance
  5. Delegate from your node

1. Check available rewards

this only works if you're running active set validator!

Run the following command:

axelard query distribution rewards <your-wallet-address> <your-validator-address> 

The output should be like:

rewards:
- amount: "2599999.9999999" # so there are rewards available to withdraw
  denom: uaxl

2. Withdraw commision

this only works if you're running active set validator!

Run the following command:

axelard tx distribution withdraw-rewards <your-validator-address> --chain-id <chain-id>  --from <your-wallet-address> --gas=auto  --commission  --yes

3. Withdraw rewards

this only works if you're running active set validator!

Run the following command:

axelard tx distribution withdraw-all-rewards --from <your-wallet-address> --chain-id <chain-id> --yes

4. Check balance

Run the following command:

axelard query bank balances <your-wallet-address>

The output should be like:

balances:
- amount: "99999999"
  denom: uaxl
pagination:
  next_key: null
  total: "0"    

5. Delegate from node:

Run the following command:

# do not transfer all available balance, you should leave 0.3-0.5 coins for future transactions 
axelard tx staking delegate  <validator-address> <amount-coins-to-transfer> --from <your-key-alias>



# this is an example: 
# $VALIDATOR = axelarvaloper1....
axelard tx staking delegate $VALIDATOR 99949999uaxl --from mykey 

Tutorial created by Validatrium (more info on our projects at validatrium.com)

If you have any additional questions regarding this tutorial, please join Axelar official discord channel and tag Validatrium members.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment