# Desmos Primer Setup
In order to complete the primer challenges, you have to go through a setup process to install the Desmos CLI and connect it to a full node to create your Desmos account. You will find a detailed description of how this can be done below.
In order to properly install
desmosd you need to satisfy the following requirements.
# 1. Having Go installed
As the Desmos binaries are compiled using Go, you are required to have it installed on your machine to properly build and execute them.
To verify your Go version you can run
go version inside a terminal window.
This should return something that looks like
go version go1.14.3 linux/amd64
If you instead get a
go: command not found, it means you do not have Go installed. In this case, you can get it by going through the setup process present at the following link: Installing Go.
# 2. Having Git installed
Git will be used to download the Desmos binaries source that will later be compiled. To verify if you have Git installed, try running
git version inside a terminal window.
If you get a
git: command not found, it means you are missing it. In this case, you can get it here: Git Downloads.
# 3. Having Git setup with GitHub
This step is required to later create Pull Requests that will make sure you get the Primer rewards properly.
If you haven't setup your Git to properly connect to your GitHub account, you can do it following this procedure: Set up Git.
Once all the requirements have been satisfied, you can setup your machine to start completing the challenges.
Use upgrade procedure to upgrade
The following allows you to install the Desmos binaries from scratch. If you already have either
desmoscli installed, please make sure you follow the update guide instead. To verify if you have either one of those commands, try running the following inside a terminal windows:
desmoscli version desmosd version
If you see an output that's different from
desmosXXX: command not found, it means you already have them installed.
# 1. Making sure Go is installed
Execute the following command:
The output should look like
go version go1.13.5 linux/amd64
Go 1.13 or above is required
To continue make sure the version or your Go executable is
1.13 or later.
Once you have properly installed Go, we need to make sure the necessary environmental variables are properly setup. To do so, execute:
echo 'export GOPATH="$HOME/go"' >> ~/.profile echo 'export GOBIN="$GOPATH/bin"' >> ~/.profile echo 'export PATH="$PATH:$GOBIN"' >> ~/.profile source ~/.profile
To make sure everything is all right, try executing:
This should return something like
If it returns an empty string, make sure you execute the above commands properly.
# 2. Installing the Desmos CLI
The Desmos Command Line Interface (in short, CLI) is the tool that allows you to perform Desmos-related operations using a terminal on your machine. It connects to a full node of the Desmos Chain allowing you to easily create, sign and send transactions to it.
In order to install it, please execute the following commands:
git clone https://github.com/desmos-labs/desmos.git $GOPATH/src/github.com/desmos-labs/desmos cd $GOPATH/src/github.com/desmos-labs/desmos git fetch --tags git checkout tags/v0.5.1 make install
Once all the above commands have completed successfully, you should be able to execute the following command:
desmoscli version --long
The result should be:
name: Desmos server_name: desmosd client_name: desmoscli version: 0.5.1 commit: fba4226f61b0a2224c013362fb41d65bd3b663a9 build_tags: netgo ledger
# 3. Connecting the CLI to a full node
Once the CLI has been properly installed, to allow it reading from and writing to the chain state, we need to connect it to our public full node. To do so, please run:
desmoscli config node http://22.214.171.124:26657 desmoscli config chain-id morpheus-4001
The result should look something like
configuration saved to .desmoscli/config/config.toml
To make sure everything is done properly, try running:
desmoscli query block 1
The output should be
# 4. Creating your address
In order to perform operations on the Desmos Chain, you will need a Desmos address. These are unique random-generated accounts based on 24 words-long mnemonic phrases.
In order to generate a new address, run the following commands:
desmoscli keys add <your-name> # E.g. desmosli keys add jack
After typing a password and the confirmation, the result should look like the following:
- name: jack type: local address: desmos1uht7hsl88wr002ses4qf5k24nshdyxukv3r2p8 pubkey: desmospub1addwnpepqvwf7qcdv97prfwv6cp20c5pgre4j8ln9y0tqygj4ut36xndd9srkrxhk3e mnemonic: "" threshold: 0 pubkeys:  **Important** write this mnemonic phrase in a safe place. It is the only way to recover your account if you ever forget your password. conduct never unit tobacco song hurt pepper silk hundred merit cheese bulb electric wink swarm auto rule afford taxi lounge local bundle trouble kitten
Make sure you have written somewhere safe the mnemonic phrase that is returned to you as this will be the only way to later recover the account if you need to do so. Loosing this phrase means loosing access to all your funds.
# 5. Receive some
Inside our testnets the tokens will be:
- Daric (namely
udaric) as the staking token
- Potin (namely
upotin) as the fee token
You need some fund to fully activate your account, visit our faucet page and request some
upotin by inserting your address. If you forget the address you have just generated, you can get it by running
desmoscli keys show <your-key-name> --address # Example # desmoscli keys show jack --address
This will return the associated address such as
You will receive some tokens after you put it into the faucet.
Congratulations, you have setup your Desmos account successfully! You can now start the Phase 1 challenges and earn some Desmos Tokens!
If you have already installed the Desmos binaries in the past and you want to update them to the latest version, you can execute the following set of commands:
cd $GOPATH/src/github.com/desmos-labs/desmos git fetch --all && git checkout tags/$(git describe --tags `git rev-list --tags --max-count=1`) make install
Upon updating, try running the following command:
desmoscli version --long
This should return the current version information, which should something like be:
name: Desmos server_name: desmosd client_name: desmoscli version: 0.5.1 commit: fba4226f61b0a2224c013362fb41d65bd3b663a9 build_tags: netgo ledger go: go version go1.13.5 linux/amd64