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