# Set the variables
# Come up with the name of your node and replace it instead <your_moniker>
GITOPIA_NODE_NAME=<your_node_name>
echo 'export GITOPIA_NODE_NAME='$GITOPIA_NODE_NAME >> $HOME/.bash_profile
echo "export GITOPIA_CHAIN_ID=gitopia" >> $HOME/.bash_profile
echo "export GITOPIA_PORT=10" >> $HOME/.bash_profile
source $HOME/.bash_profile
# check whether the last command was executed
# Download binary files
cd $HOME
git clone https://github.com/gitopia/gitopia
cd gitopia
git checkout v3.3.0
make install
sudo cp $HOME/go/bin/gitopiad /usr/local/bin/gitopiad
gitopiad version --long | grep -e version -e commit
# version: 3.3.0
# Initialize the node
gitopiad init $GITOPIA_NODE_NAME --chain-id $GITOPIA_CHAIN_ID
# Check the logs again
journalctl -u gitopiad -f -o cat
# Escape from logs ctrl+c
# Check status
gitopiad status 2>&1 | jq .SyncInfo
# "catching_up": false means that the node is synchronized, we are waiting for complete synchronization
# Create wallet
gitopiad keys add wallet
# Create a password for the wallet and write it down so you don't forget it. The wallet has been created. In the last line there will be a phrase that must be written down
# If the wallet was already there, restore it
gitopiad keys add wallet --recover
# Insert the seed phrase from your wallet
# If everything is correct, you will see your wallet data
# Save the wallet address
GITOPIA_ADDRESS=$(gitopiad keys show wallet -a)
GITOPIA_VALOPER=$(gitopiad keys show wallet --bech val -a)
echo "export GITOPIA_ADDRESS="${GITOPIA_ADDRESS} >> $HOME/.bash_profile
echo "export GITOPIA_VALOPER="${GITOPIA_VALOPER} >> $HOME/.bash_profile
source $HOME/.bash_profile
# Check the ballance
gitopiad q bank balances $GITOPIA_ADDRESS