Commands

Node Command

Check Node status

RPC_PORT=26657
curl -s 127.0.0.1:$RPC_PORT/status | jq .

Check P2P Connection Status

P2P_PORT=26656 && ss -anp | grep $P2P_PORT

Wallet Command

Create/Recovery Wallet

WALLET_NAME=wallet_name
# create
sided keys add $WALLET_NAME
# recovery
sided keys add $WALLET_NAME --recover

Query balance

sided q bank balances $(sided keys show $WALLET_NAME -a) 

Validator Commands

Update validator information

WALLET_NAME=wallet_name

sided tx mstaking edit-validator \
    --commission-rate 0.1 \
    --new-moniker "$MONIKER" \
    --identity "KEYBASE_ID" \
    --details "side protocol" \
    --from $WALLET_NAME \
    --chain-id sidechain-testnet-4 \
    --gas auto \
    --gas-adjustment 1.4 \
    --gas-prices 0.005uside

Query Jail Reason

sided q slashing signing-info $(sided tendermint show-validator)

Unjail validator

WALLET_NAME=wallet_name

sided tx slashing unjail \
    --chain-id sidechain-testnet-4 \
    --gas-adjustment 1.4 --gas auto --gas-prices 0.005uside \
    --from $WALLET_NAME

Query validator

WALLET_NAME=wallet_name

sided q staking validator $(sided keys show $WALLET_NAME --bech val -a)

Signing Info

sided q staking signing-info $(sided tendermint show-validator) 

Query Active Validators

LIMIT=6000

sided q staking validators -oj --limit=$LIMIT | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '.operator_address + "  " + .voting_power + "  " + .description.moniker' | sort -gr | nl

Token Management

Delegate Token

VALOPER_ADDRESS=$(sided keys show wallet --bech val -a)
AMOUNT=1000000uside
WALLET_NAME=wallet_name
CHAIN_ID=sidechain-testnet-4
GAS_PRICE=0.005uside

sided tx staking delegate \
    $VALOPER_ADDRESS $AMOUNT \
    --from $WALLET_NAME \
    --chain-id $CHAIN_ID \
    --gas-adjustment 1.4 \
    --gas auto \
    --gas-prices $GAS_PRICE \
    -y

Send Token To Another Address

FRON_WALLET=wallet_name
TO_ADDRESS=address
AMOUNT=1000000uside
CHAIN_ID=sidechain-testnet-4
GAS_PRICE=0.005uside

sided tx bank send $FRON_WALLET $TO_ADDRESS $AMOUNT \
    --from $FRON_WALLET \
    --chain-id $CHAIN_ID \
    --gas-adjustment 1.4 \
    --gas auto \
    --gas-prices $GAS_PRICE \
    -y

Withdraw Rewards From All Delegated Validators

WALLET_NAME=wallet_name
CHAIN_ID=sidechain-testnet-4
GAS_PRICE=0.005uside

sided tx distribution withdraw-all-rewards \
    --from $WALLET_NAME \
    --chain-id $CHAIN_ID \
    --gas-adjustment 1.4 \
    --gas auto \
    --gas-prices $GAS_PRICE \
    -y

Withdraw Commision From Your Validator

WALLET_NAME=wallet_name
CHAIN_ID=sidechain-testnet-4
GAS_PRICE=0.005uside

sided tx distribution withdraw-rewards $(sided keys show wallet --bech val -a) \
    --commission \
    --from $WALLET_NAME \
    --chain-id $CHAIN_ID \
    --gas-adjustment 1.4 \
    --gas auto \
    --gas-prices $GAS_PRICE \
    -y

Governance

Query proposal by ID

sided query gov proposal <proposal_id>

Vote

WALLET_NAME=wallet_name
CHAIN_ID=sidechain-testnet-4

sided tx gov vote <proposal_id> yes|no|no_with_veto|abstain \
    --from $WALLET_NAME \
    --chain-id $CHAIN_ID \
    --gas-adjustment 1.4 \
    --gas auto \
    -y

Maintenance

Reset all data

DIR=~/.side
sided tendermint unsafe-reset-all --keep-addr-book --home $DIR --keep-addr-book

Get Node Sync Info

RPC_PORT=26657
curl -s http://127.0.0.1:$RPC_PORT/status | jq .

or

sided status 2>&1 | jq .

Get Live Peers

RPC_PORT=26657
curl -sS http://127.0.0.1:$RPC_PORT/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}'

Show Self Peer

echo $(sided tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.sided/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')

Last updated