Installation

Manual Installation

sudo rm -rf /usr/local/go
wget https://go.dev/dl/go1.20.5.linux-amd64.tar.gz
tar xf go1.20.5.linux-amd64.tar.gz
rm "go1.20.5.linux-amd64.tar.gz"
sudo mv go /usr/local/go
go version

If you have installed go before

echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> $HOME/.bashrc
source ~/.bashrc
go version

Download Binary

cd $HOME
git clone -b v0.1.0 https://github.com/0glabs/0g-chain.git
./0g-chain/networks/testnet/install.sh
source .profile
0gchaind version

Setup variables

# set variables
echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="test"" >> $HOME/.bash_profile
echo "export OG_CHAIN_ID="zgtendermint_16600-1"" >> $HOME/.bash_profile
echo "export OG_PORT="47"" >> $HOME/.bash_profile
source $HOME/.bash_profile

Config and init app

# config and init app
0gchaind config chain-id $OG_CHAIN_ID
0gchaind init $MONIKER --chain-id $OG_CHAIN_ID
0gchaind config node tcp://localhost:$OG_PORT
0gchaind config keyring-backend os