Cheat sheet

Node

GET SYNC INFO

initiad status 2>&1 | jq .sync_info

CHECK NODE HEIGHT

local_height=$(initiad status | jq -r .sync_info.latest_block_height); network_height=$(curl -s https://rpc-initia-testnet.trusted-point.com/status | jq -r .result.sync_info.latest_block_height); blocks_left=$((network_height - local_height)); echo "Your node height: $local_height"; echo "Network height: $network_height"; echo "Blocks left: $blocks_left"

GET NODE PEER

echo $(initiad tendermint show-node-id)'@'$(hostname -I | awk '{print $1}')':'$(cat $HOME/.initia/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')

Wallet

Change <WALLET> to your wallet name.

ADD NEW KEY

initiad keys add <WALLET>

RECOVER EXISTING KEY

initiad keys add <WALLET> --recover

LIST ALL KEYS

initiad keys list

DELETE KEY

initiad keys delete <WALLET>

EXPORT KEY TO A FILE

initiad keys export <WALLET>

IMPORT KEY FROM A FILE

initiad keys import <WALLET> wallet.backup

QUERY WALLET BALANCE

initiad q bank balances $(initiad keys show <WALLET> -a)

Validator

Change moniker, identity, details, website and wallet to match your values.

CREATE NEW VALIDATOR

initiad tx mstaking create-validator \
--amount 1000000uinit \
--pubkey $(initiad tendermint show-validator) \
--moniker "<YOUR_MONIKER_NAME>" \
--identity "<YOUR_KEYBASE_ID>" \
--details "<YOUR_DETAILS>" \
--website "<YOUR_WEBSITE_URL>" \
--chain-id initiation-1 \
--commission-rate 0.05 \
--commission-max-rate 0.20 \
--commission-max-change-rate 0.05 \
--from <WALLET> \
--gas-adjustment 1.4 \
-gas=2000000 \
--fees=563000move/944f8dd8dc49f96c25fea9849f16436dcfa6d564eec802f3ef7f8b3ea85368ff \
-y

EDIT EXISTING VALIDATOR

initiad tx mstaking edit-validator \
--moniker "<YOUR_MONIKER_NAME>" \
--identity "<YOUR_KEYBASE_ID>" \
--details "<YOUR_DETAILS>" \
--website "<YOUR_WEBSITE_URL>" \
--chain-id initiation-1 \
--commission-rate 0.05 \
--from <WALLET> \
--gas-adjustment 1.4 \
--gas=2000000 \
--fees=563000move/944f8dd8dc49f96c25fea9849f16436dcfa6d564eec802f3ef7f8b3ea85368ff \
-y

GET VALIDATOR INFO

initiad status 2>&1 | jq .ValidatorInfo

UNJAIL VALIDATOR

initiad tx slashing unjail --from <WALLET> --chain-id initiation-1 --gas-adjustment 1.4 --gas=2000000 --fees=563000move/944f8dd8dc49f96c25fea9849f16436dcfa6d564eec802f3ef7f8b3ea85368ff -y

JAIL REASON

initiad query slashing signing-info $(initiad tendermint show-validator)

LIST ALL ACTIVE VALIDATORS

initiad q mstaking validators -o json --limit=1000 \
| jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' \
| jq -r '.voting_power + " - " + .description.moniker' \
| sort -gr | nl

LIST ALL INACTIVE VALIDATORS

initiad q mstaking validators -o json --limit=1000 \
| jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED")' \
| jq -r '.voting_power + " - " + .description.moniker' \
| sort -gr | nl

VIEW VALIDATOR DETAILS

initiad q mstaking validator $(initiad keys show WALLET> --bech val -a)

Governance and tokens

WITHDRAW REWARDS FROM ALL VALIDATORS

initiad tx distribution withdraw-all-rewards --from <WALLET> --chain-id initiation-1 --gas-adjustment 1.4 --gas=2000000 --fees=563000move/944f8dd8dc49f96c25fea9849f16436dcfa6d564eec802f3ef7f8b3ea85368ff -y

WITHDRAW COMMISSION AND REWARDS FROM YOUR VALIDATOR

initiad tx distribution withdraw-rewards $(initiad keys show <WALLET> --bech val -a) --commission --from <WALLET> --chain-id initiation-1 --gas-adjustment 1.4 --gas=2000000 --fees=563000move/944f8dd8dc49f96c25fea9849f16436dcfa6d564eec802f3ef7f8b3ea85368ff -y

DELEGATE TOKENS TO YOURSELF

initiad tx mstaking delegate $(initiad keys show <WALLET> --bech val -a) 1000000uinit --from <WALLET> --chain-id initiation-1 --gas-adjustment 1.4 --gas=2000000 --fees=563000move/944f8dd8dc49f96c25fea9849f16436dcfa6d564eec802f3ef7f8b3ea85368ff -y

DELEGATE TOKENS TO VALIDATOR

initiad tx mstaking delegate <TO_VALOPER_ADDRESS> 1000000uinit --from <WALLET> --chain-id initiation-1 --gas-adjustment 1.4 --gas=2000000 --fees=563000move/944f8dd8dc49f96c25fea9849f16436dcfa6d564eec802f3ef7f8b3ea85368ff -y

REDELEGATE TOKENS TO ANOTHER VALIDATOR

initiad tx mstaking redelegate $(initiad keys show <WALLET> --bech val -a) <TO_VALOPER_ADDRESS> 1000000uinit --from <WALLET> --chain-id initiation-1 --gas-adjustment 1.4 --gas=2000000 --fees=563000move/944f8dd8dc49f96c25fea9849f16436dcfa6d564eec802f3ef7f8b3ea85368ff -y

UNBOND TOKENS FROM YOUR VALIDATOR

initiad tx mstaking unbond $(initiad keys show <WALLET> --bech val -a) 1000000uinit --from <WALLET> --chain-id initiation-1 --gas-adjustment 1.4 --gas=2000000 --fees=563000move/944f8dd8dc49f96c25fea9849f16436dcfa6d564eec802f3ef7f8b3ea85368ff -y

SEND TOKENS TO THE WALLET

initiad tx bank send <WALLET> <TO_WALLET_ADDRESS> 1000000uinit --from <WALLET> --chain-id initiation-1 --gas-adjustment 1.4 --gas=2000000 --fees=563000move/944f8dd8dc49f96c25fea9849f16436dcfa6d564eec802f3ef7f8b3ea85368ff -y

LIST ALL PROPOSALS

initiad query gov proposals

VIEW PROPOSAL BY ID Remember change proposal_id to correct proposal you wanna vote

initiad query gov proposal proposal_id

VOTE ‘YES’

initiad tx gov vote proposal_id yes --from <WALLET --chain-id initiation-1 --gas-adjustment 1.4 --gas=2000000 --fees=563000move/944f8dd8dc49f96c25fea9849f16436dcfa6d564eec802f3ef7f8b3ea85368ff -y

VOTE ‘NO’

initiad tx gov vote proposal_id no --from <WALLET> --chain-id initiation-1 --gas-adjustment 1.4 --gas=2000000 --fees=563000move/944f8dd8dc49f96c25fea9849f16436dcfa6d564eec802f3ef7f8b3ea85368ff -y

VOTE ‘ABSTAIN’

initiad tx gov vote proposal_id abstain --from <WALLET> --chain-id initiation-1 --gas-adjustment 1.4 --gas=2000000 --fees=563000move/944f8dd8dc49f96c25fea9849f16436dcfa6d564eec802f3ef7f8b3ea85368ff -y

VOTE ‘NOWITHVETO’

initiad tx gov vote proposal_id NoWithVeto --from <WALLET> --chain-id initiation-1 --gas-adjustment 1.4 --gas=2000000 --fees=563000move/944f8dd8dc49f96c25fea9849f16436dcfa6d564eec802f3ef7f8b3ea85368ff -y

Remove

REMOVE INITIA

cd $HOME && \
sudo systemctl stop initiad && \
sudo systemctl disable initiad && \
sudo rm /etc/systemd/system/initiad.service && \
sudo systemctl daemon-reload && \
sudo rm -f /usr/bin/initiad && \
rm -f $(which initiad) && \
rm -rf $HOME/.initia && \
rm -rf $HOME/initia

REMOVE ORACLE

cd $HOME && \
sudo systemctl stop oracle && \
sudo systemctl disable oracle && \
sudo rm /etc/systemd/system/oracle.service && \
sudo systemctl daemon-reload && \
sudo rm -f /usr/bin/slinky && \
rm -rf slinky

Last updated