Testnet
Structs
- Chain ID
- Version
- Go
Run these after the install guide, which sets $WALLET, $MONIKER and the chain variables.
Keys and wallet
Add a new key
structsd keys add $WALLETRecover a key
structsd keys add $WALLET --recoverList keys
structsd keys listWallet balance
structsd q bank balances $(structsd keys show $WALLET -a)
Validator
Create a validator
cat > $HOME/validator.json << EOF { "pubkey": $(structsd comet show-validator), "amount": "1000000ualpha", "moniker": "$MONIKER", "identity": "", "website": "", "security": "", "details": "", "commission-rate": "0.05", "commission-max-rate": "0.20", "commission-max-change-rate": "0.05", "min-self-delegation": "1" } EOF structsd tx staking create-validator $HOME/validator.json --from $WALLET --chain-id $STRUCTS_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0ualpha -yEdit the validator
structsd tx staking edit-validator --new-moniker "$MONIKER" --identity "" --website "" --details "" --from $WALLET --chain-id $STRUCTS_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0ualpha -yUnjail
structsd tx slashing unjail --from $WALLET --chain-id $STRUCTS_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0ualpha -yValidator details
structsd q staking validator $(structsd keys show $WALLET --bech val -a)
Tokens
Withdraw all rewards
structsd tx distribution withdraw-all-rewards --from $WALLET --chain-id $STRUCTS_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0ualpha -yWithdraw commission and rewards
structsd tx distribution withdraw-rewards $(structsd keys show $WALLET --bech val -a) --commission --from $WALLET --chain-id $STRUCTS_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0ualpha -yDelegate to yourself
structsd tx staking delegate $(structsd keys show $WALLET --bech val -a) 1000000ualpha --from $WALLET --chain-id $STRUCTS_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0ualpha -yRedelegate
structsd tx staking redelegate $(structsd keys show $WALLET --bech val -a) <TO_VALOPER> 1000000ualpha --from $WALLET --chain-id $STRUCTS_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0ualpha -yUnbond
structsd tx staking unbond $(structsd keys show $WALLET --bech val -a) 1000000ualpha --from $WALLET --chain-id $STRUCTS_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0ualpha -ySend tokens
structsd tx bank send $WALLET <TO_ADDRESS> 1000000ualpha --chain-id $STRUCTS_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0ualpha -y
Governance
List proposals
structsd q gov proposalsView a proposal
structsd q gov proposal <ID>Vote
structsd tx gov vote <ID> yes --from $WALLET --chain-id $STRUCTS_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0ualpha -y # yes | no | abstain | no_with_veto
Maintenance
Node status
structsd status 2>&1 | jqNode peer address
echo $(structsd comet show-node-id)@$(wget -qO- eth0.me):$STRUCTS_PORT656Live peers
curl -s localhost:$STRUCTS_PORT657/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr | split(":") | last)"' | paste -sd,Check the validator key
[[ $(structsd q staking validator $(structsd keys show $WALLET --bech val -a) -o json | jq -r .validator.consensus_pubkey.value) = $(structsd comet show-validator | jq -r .key) ]] && echo "match" || echo "MISMATCH"Reset chain data
structsd comet unsafe-reset-all --keep-addr-book --home $HOME/.structsRemove the node
sudo systemctl stop structsd sudo systemctl disable structsd sudo rm /etc/systemd/system/structsd.service sudo systemctl daemon-reload rm -rf $HOME/.structs $(which structsd)
Service
Service status
sudo systemctl status structsdFollow logs
sudo journalctl -fu structsd -o catRestart
sudo systemctl restart structsdStop
sudo systemctl stop structsd