CLI - Set Up
Set up the environment on your computer, and install Sifnode.

Set up your Environment

Thanks to the Cosmos hub for their stellar documentation about using the CLI to interact with Cosmos chains. Sifchain is built on the Cosmos SDK.

Build Requirements

At present, the CLI fully supports installation on linux distributions. For the purpose of this instruction set, we'll be using Ubuntu 20.04.3 LTS. It is also possible to install on Unix, while Windows may require additional unsupported third party installation (eg. Install WSL and then use it to follow the Linux Instructions). All steps are listed below for a clean install.
Linux:
Update the local package list and install any available updates:
sudo apt-get update && sudo apt upgrade -y
Install make and gcc, ensure correct time sync
sudo apt-get install make build-essential gcc git jq chrony -y
Unix (Mac):
Ensure you have installed homebrew. Then update and upgrade it:
brew update
brew upgrade
Now install gcc
brew info gcc
brew install gcc
brew cleanup //(this removes previous application/dependency revisions saving considerable space)
Install make
brew install make

2) Install Go (1.17.7+ is required for Sifchain)

Linux: You can follow these docs to install Go.
The current version required is go 1.17.7 and you can download by launching:
wget https://golang.org/dl/go1.17.7.linux-amd64.tar.gz
and then installing it in the local directory:
sudo tar -C /usr/local -xzf go1.17.7.linux-amd64.tar.gz
Unix:
brew install go

3) Add the GOPATH

After installing Go, ensure that you add GOPATH to your PATH variable so that we can run the sifnoded binary.
Linux:
Open the profile file (~/.profile) :
nano ~/.profile
add the following:
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
Apply the changes on the current shell:
source ~/.profile
Unix:
Open the profile file (~/.profile) :
nano ~/.bash_profile
add the following:
export GOROOT=opt/homebrew/bin/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
Apply the changes on the current shell:
source ~/.bash_profile
Or alternatively, launch this command everytime you open the shell:
export PATH=$PATH:/usr/local/go/bin

4) Install Sifnoded

Next, we need to install the Sifnode binaries:
git clone "https://github.com/Sifchain/sifnode"
Move to the newly installed folder
cd sifnode
Compile and install a non-archive node:
git checkout v0.13.3 && make clean install

Troubleshooting

You may encounter an error here:
go: cannot find GOROOT directory: /usr/local/go
In this instance, from terminal run:
which go
This will return the path to you Go Root directory. If it is not /usr/local/go, copy the path. Now return to step 3 above, "Add the GOPATH", and update the .profile file with the correct path to GOROOT. Save it - you may need to restart terminal for the changes to take effect.

5) Create a wallet

From within the ~/sifnode folder, create a wallet:
sifnoded keys add <wallet name>
You will be asked to create a passphrase. This will protect the mnemonic that will be generated. Remember to safely back up the mnemonic Note:
If your transaction throws any error, make sure to add the necessary flags. Some of the flags you may need are:
Some useful flags:
--chain-id string The network chain ID
--fees string Fees to pay along with transaction
--from string Name or address of private key with which to sign
--keyring-backend string Select keyring's backend (os|file|kwallet|pass|test|memory)
--node string <host>:<port> to tendermint rpc interface for this chain
Logs flag:
--log_format string The logging format (json|plain) (default "plain")
--log_level string The logging level (trace|debug|info|warn|error|fatal|panic)
--trace print out full stack trace on errors
​