πSelfChain
Modular Intent-Centric Access Layer 1 Blockchain and Keyless Wallet Infrastructure Service That Uses MPC-TSS/AA for Multi-Chain WEB3 Access.
Public RPC Endpoint
Explorer
Snapshot & State sync
Snapshot
sudo systemctl stop selfchaind
cp $HOME/.selfchain/data/priv_validator_state.json $HOME/.selfchain/priv_validator_state.json.backup
selfchaind tendermint unsafe-reset-all --home ~/.selfchain/ --keep-addr-book
curl https://snapshot2.syanodes.my.id/selfchain/snapshot2-selfchain.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.selfchain
mv $HOME/.selfchain/priv_validator_state.json.backup $HOME/.selfchain/data/priv_validator_state.json
sudo systemctl restart selfchaind && sudo journalctl -fu selfchaind -o cat
State Sync
sudo systemctl stop selfchaind
cp $HOME/.selfchain/data/priv_validator_state.json $HOME/.selfchain/priv_validator_state.json.backup
selfchaind tendermint unsafe-reset-all --home $HOME/.selfchain
peers="[email protected]:26656,[email protected]:26656,[email protected]:26656"
PEERS="[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:30056,[email protected]:26656,[email protected]:34656,[email protected]:26656,[email protected]:30156,[email protected]:31656,[email protected]:26656,[email protected]:25565,[email protected]:26656,[email protected]:58656,[email protected]:36656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:22156,[email protected]:26656,[email protected]:16609,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:24356,[email protected]:24356,[email protected]:26656,[email protected]:20656,[email protected]:36656,[email protected]:26656,[email protected]:26656,[email protected]:11356,[email protected]:61656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:11356,[email protected]:26656,[email protected]:10056,[email protected]:24656,[email protected]:10256"
SNAP_RPC="https://selfchain-rpc.validator247.com:443"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.selfchain/config/config.toml
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && sleep 2
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.selfchain/config/config.toml
mv $HOME/.selfchain/priv_validator_state.json.backup $HOME/.selfchain/data/priv_validator_state.json
sudo systemctl restart selfchaind && sudo journalctl -fu selfchaind -o cat
WALLET MANAGEMENT
#Add new wallet
selfchaind keys add wallet
#Recover Wallet
selfchaind keys add wallet --recover
#List Wallet
selfchaind keys list
#Delete Wallet
selfchaind keys delete wallet
#Check Wallet Balance
selfchaind q bank balances $(selfchaind keys show wallet -a)
VALIDATOR MANAGEMENT
#Create Validator
selfchaind tx staking create-validator \
--amount=10000000uslf \
--pubkey=$(selfchaind tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$SELFCHAIN_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=10uslf\
-y
#Edit Validator
selfchaind tx staking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$SELFCHAIN_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=10uslf\
-y
#Unjail Validator
selfchaind tx slashing unjail --from wallet --chain-id $SELFCHAIN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uslf -y
#Check Jailed Reason
selfchaind query slashing signing-info $(selfchaind tendermint show-validator)
TOKEN MANAGEMENT
#Withdraw Rewards
selfchaind tx distribution withdraw-all-rewards --from wallet --chain-id $SELFCHAIN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uslf -y
#Withdraw Rewards with Comission
selfchaind tx distribution withdraw-rewards $(selfchaind keys show wallet --bech val -a) --commission --from wallet --chain-id $SELFCHAIN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uslf -y
#Delegate Token to your own validator
selfchaind tx staking delegate $(selfchaind keys show wallet --bech val -a) 1000000uslf --from wallet --chain-id $SELFCHAIN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uslf -y
#Delegate Token to other validator
selfchaind tx staking redelegate $(selfchaind keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uslf --from wallet --chain-id $SELFCHAIN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uslf -y
#Unbond Token from your validator
selfchaind tx staking unbond $(selfchaind keys show wallet --bech val -a) 1000000uslf --from wallet --chain-id $SELFCHAIN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uslf -y
#Send Token to another wallet
selfchaind tx bank send wallet <TO_WALLET_ADDRESS> 1000000uslf --from wallet --chain-id $SELFCHAIN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uslf -y
GOVERNANCE
#Vote, You can change the value of yes to no,abstain,nowithveto
selfchaind tx gov vote 1 yes --from wallet --chain-id $SELFCHAIN_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 10uslf -y
#List all proposals
selfchaind query gov proposals
#Create new text proposal
selfchaind tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=100000000uslf \
--type="Text" \
--from=wallet \
--gas-adjustment 1.5 \
--gas "auto" \
--gas-prices=10uslf\
-y
SERVICES MANAGEMENT
# Reload Service
sudo systemctl daemon-reload
# Enable Service
sudo systemctl enable selfchaind
# Disable Service
sudo systemctl disable selfchaind
# Start Service
sudo systemctl start selfchaind
# Stop Service
sudo systemctl stop selfchaind
# Restart Service
sudo systemctl restart selfchaind
# Check Service Status
sudo systemctl status selfchaind
# Check Service Logs
sudo journalctl -u selfchaind -f --no-hostname -o cat
UTILITY
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.selfchain/config/config.toml
#Get Validator info
selfchaind status 2>&1 | jq .ValidatorInfo
#Get denom info
selfchaind q bank denom-metadata -oj | jq
#Get sync status
selfchaind status 2>&1 | jq .SyncInfo.catching_up
#Get latest height
selfchaind status 2>&1 | jq .SyncInfo.latest_block_height
#Reset Node
selfchaind tendermint unsafe-reset-all --home $HOME/.selfchain --keep-addr-book
Delete node
sudo systemctl stop selfchaind && sudo systemctl disable selfchaind && sudo rm /etc/systemd/system/selfchaind.service && sudo systemctl daemon-reload && sudo rm -rf $(which selfchaind) && rm -rf $HOME/.selfchain && rm -rf /usr/local/bin/selfchaind
Last updated