Chain ID: phoenix-1 | Node Version: v2.18.0
note
First You Need Set Variabels
MONIKER=<YOUR_MONIKER_NAME>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export TERRA_CHAIN_ID="phoenix-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
- Wallet
- Validator
- Token
- Service
- Governance
- Utility
- Delete
Wallet
Create Wallet
terrad keys add wallet
Recovery Wallet
terrad keys add wallet --recover
List All Wallet
terrad keys list
Delete Wallet
terrad keys delete wallet
Check Wallet Balance
terrad q bank balances $(terrad keys show wallet -a)
Validator
note
Make sure you have adjust YOUR_KEYBASE_ID, YOUR_DETAILS, YOUR_WEBSITE_URL
Check Pubkey
terrad tendermint show-validator
Make File validator.json
tee $HOME/.terra/validator.json > /dev/null << EOF
{
"pubkey": YOUR_PUBKEY,
"amount": "1000000000uluna",
"moniker": "MONIKER",
"identity": "YOUR_KEYBASE_ID",
"website": "YOUR_WEBSITE_URL",
"security": "YOUR_CONTACT_MAIL",
"details": "YOUR_DETAILS.",
"commission-rate": "0.1",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1"
}
EOF
Create Validator
terrad tx staking create-validator $HOME/.terra/validator.json --from wallet --chain-id $TERRA_CHAIN_ID --gas-adjustment 1.5 --gas 225000 --gas-prices 0.015uluna
Edit Validator
terrad tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$TERRA_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=0.015uluna
Check Jailed Reason
terrad query slashing signing-info $(terrad tendermint show-validator)
Unjail Validator
terrad tx slashing unjail --from wallet --chain-id $TERRA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.015uluna -y
Token
Withdraw Rewards
terrad tx distribution withdraw-all-rewards --from wallet --chain-id $TERRA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.015uluna -y
Withdraw Rewards with Comission
terrad tx distribution withdraw-rewards $(terrad keys show wallet --bech val -a) --commission --from wallet --chain-id $TERRA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.015uluna -y
Delegate Tokens to Your Validator
terrad tx staking delegate $(terrad keys show wallet --bech val -a) 1000000uluna --from wallet --chain-id $TERRA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.015uluna -y
Redelegate Tokens to Another Validator
terrad tx staking redelegate $(terrad keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uluna --from wallet --chain-id $TERRA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.015uluna -y
Unbond Tokens from Your Validator
terrad tx staking unbond $(terrad keys show wallet --bech val -a) 1000000uluna --from wallet --chain-id $TERRA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.015uluna -y
Send Tokens to Any Wallet
terrad tx bank send wallet <TO_WALLET_ADDRESS> 1000000uluna --from wallet --chain-id $TERRA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.015uluna -y
Service
Reload Service
sudo systemctl daemon-reload
Enable Service
sudo systemctl enable terrad
Disable Service
sudo systemctl disable terrad
Start Service
sudo systemctl start terrad
Stop Service
sudo systemctl stop terrad
Restart Service
sudo systemctl restart terrad
Check Service Status
sudo systemctl status terrad
Check Service Logs
sudo journalctl -u terrad -f --no-hostname -o cat
Governance
tip
For Vote, You can change the value of yes to no, abstain, no_with_veto
Vote
terrad tx gov vote 1 yes --from wallet --chain-id $TERRA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.015uluna -y
List all Proposals
terrad query gov proposals
Check Vote
terrad tx gov vote PROPOSAL_NUMBER VOTE_OPTION --from wallet --chain-id $TERRA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 0.015uluna -y
Create new Proposal
terrad tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=10000000uluna \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=0.015uluna \
-y
Utility
Set Indexer null / kv
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.terra/config/config.toml
Get Validator Info
terrad status 2>&1 | jq .ValidatorInfo
Get Denom Info
terrad q bank denom-metadata -oj | jq
Get Sync Status
terrad status 2>&1 | jq .SyncInfo.catching_up
Get Latest Height
terrad status 2>&1 | jq .SyncInfo.latest_block_height
Get Node Peer
echo $(terrad tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.terra/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Set Minimum Gas Price
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.015uluna\"/" $HOME/.terra/config/app.toml
Enable Prometheus
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.terra/config/config.toml
Reset Chain Data
terrad tendermint unsafe-reset-all --home $HOME/.terra --keep-addr-book
Delete
WARNING!!! Please, before you advance to the following step! The entire chain data will be gone! Make sure you have a backup of your priv_validator_key.json!
Delete Node
sudo systemctl stop terrad && sudo systemctl disable terrad && sudo rm /etc/systemd/system/terrad.service && sudo systemctl daemon-reload && sudo rm -rf $(which terrad) && rm -rf $HOME/.terra