Chain ID: push_42101-1 | Node Version: v0.0.15
note
First You Need Set Variabels
MONIKER=<YOUR_MONIKER_NAME>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export PUSH_TESTNET_CHAIN_ID="push_42101-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
- Wallet
- Validator
- Token
- Service
- Governance
- Utility
- Delete
Wallet
Create Wallet
pchaind keys add wallet
Recovery Wallet
pchaind keys add wallet --recover
List All Wallet
pchaind keys list
Delete Wallet
pchaind keys delete wallet
Check Wallet Balance
pchaind q bank balances $(pchaind keys show wallet -a)
Validator
note
Make sure you have adjust YOUR_KEYBASE_ID, YOUR_DETAILS, YOUR_WEBSITE_URL
Check Pubkey
pchaind tendermint show-validator
Make File validator.json
tee $HOME/.pchain/validator.json > /dev/null << EOF
{
"pubkey": YOUR_PUBKEY,
"amount": "1000000000upc",
"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
pchaind tx staking create-validator $HOME/.pchain/validator.json --from wallet --chain-id $PUSH_TESTNET_CHAIN_ID--gas-adjustment 1.5 --gas 225000 --gas-prices 2500000000upc
Edit Validator
pchaind tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$PUSH_TESTNET_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=2500000000upc
Check Jailed Reason
pchaind query slashing signing-info $(pchaind tendermint show-validator)
Unjail Validator
pchaind tx slashing unjail --from wallet --chain-id $PUSH_TESTNET_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 2500000000upc -y
Token
Withdraw Rewards
pchaind tx distribution withdraw-all-rewards --from wallet --chain-id $PUSH_TESTNET_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 2500000000upc -y
Withdraw Rewards with Comission
pchaind tx distribution withdraw-rewards $(pchaind keys show wallet --bech val -a) --commission --from wallet --chain-id $PUSH_TESTNET_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 2500000000upc -y
Delegate Tokens to Your Validator
pchaind tx staking delegate $(pchaind keys show wallet --bech val -a) 1000000000000000000upc --from wallet --chain-id $PUSH_TESTNET_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 2500000000upc -y
Redelegate Tokens to Another Validator
pchaind tx staking redelegate $(pchaind keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000000000000000upc --from wallet --chain-id $PUSH_TESTNET_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 2500000000upc -y
Unbond Tokens from Your Validator
pchaind tx staking unbond $(pchaind keys show wallet --bech val -a) 1000000000000000000upc --from wallet --chain-id $PUSH_TESTNET_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 2500000000upc -y
Send Tokens to Any Wallet
pchaind tx bank send wallet <TO_WALLET_ADDRESS> 1000000000000000000upc --from wallet --chain-id $PUSH_TESTNET_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 2500000000upc -y
Service
Reload Service
sudo systemctl daemon-reload
Enable Service
sudo systemctl enable pchaind
Disable Service
sudo systemctl disable pchaind
Start Service
sudo systemctl start pchaind
Stop Service
sudo systemctl stop pchaind
Restart Service
sudo systemctl restart pchaind
Check Service Status
sudo systemctl status pchaind
Check Service Logs
sudo journalctl -u pchaind -f --no-hostname -o cat
Governance
tip
For Vote, You can change the value of yes to no, abstain, no_with_veto
Vote
pchaind tx gov vote 1 yes --from wallet --chain-id $PUSH_TESTNET_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 2500000000upc -y
List all Proposals
pchaind query gov proposals
Check Vote
pchaind tx gov vote PROPOSAL_NUMBER VOTE_OPTION --from wallet --chain-id $PUSH_TESTNET_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 2500000000upc -y
Create new Proposal
pchaind tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=10000000upc \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=2500000000upc \
-y
Utility
Set Indexer null / kv
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.pchain/config/config.toml
Get Validator Info
pchaind status 2>&1 | jq .ValidatorInfo
Get Denom Info
pchaind q bank denom-metadata -oj | jq
Get Sync Status
pchaind status 2>&1 | jq .SyncInfo.catching_up
Get Latest Height
pchaind status 2>&1 | jq .SyncInfo.latest_block_height
Get Node Peer
echo $(pchaind tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.pchain/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 = \"2500000000upc\"/" $HOME/.pchain/config/app.toml
Enable Prometheus
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.pchain/config/config.toml
Reset Chain Data
pchaind tendermint unsafe-reset-all --home $HOME/.pchain --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 pchaind && sudo systemctl disable pchaind && sudo rm /etc/systemd/system/pchaind.service && sudo systemctl daemon-reload && sudo rm -rf $(which pchaind) && rm -rf $HOME/.pchain