Search
Duplicate
Try Notion
🤑
Claim validator rewards
The validator wallet can stake its coins to any validator the same way that any user can do it. Staking will generate rewards that can be withdraw using the transaction MsgWithdrawDelegatorReward.
Additionally validators will get coins from the coins delegated to them. The coins can be claimed using the transaction withdraw commission.
The evmosd binary has a command to send both messages inside a transaction, but first we need to get our evmosvaloper address.
We can get the value from the gentx that we generated, but we can also use the evmosd client to get the value.
Get the validator address
First we need to list our address:
~/evmosd keys list --keyring-backend=file Enter keyring passphrase: - name: validator type: local address: evmos1g79urswfcu3lhjqy8w8zrz6uc7svy9n4xmv82j pubkey: '{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey","key":"AhPj5fqMuR6NRReApZHbuuYNTLr/cotekKXhPsAjTHp7"}' mnemonic: ""
Bash
Now that we have our address in format evmos1 , we can convert it to evmosvaloper:
~/evmosd debug addr evmos1g79urswfcu3lhjqy8w8zrz6uc7svy9n4xmv82j Address bytes: [71 139 193 193 201 199 35 251 200 4 59 142 33 139 92 199 160 194 22 117] Address (hex): 478BC1C1C9C723FBC8043B8E218B5CC7A0C21675 Address (EIP-55): 0x478Bc1C1c9c723FbC8043B8e218B5cC7A0c21675 Bech32 Acc: evmos1g79urswfcu3lhjqy8w8zrz6uc7svy9n4xmv82j Bech32 Val: evmosvaloper1g79urswfcu3lhjqy8w8zrz6uc7svy9n4t4rht0
Bash
Claim the rewards
Send the transaction to withdraw all the coins:
~/evmosd tx distribution withdraw-rewards <evmosvaloperaddr> --commission --from=validator --keyring-backend file --fees=20aevmos --gas=auto -b block --chain-id=evmos_9999-1
Bash
NOTE: if there is not available commission, the command will fail. It can be sent without the --commission flag to just get the staking rewards.