Egochain CLI
Egochain CLI
egochain CLI
is the all-in-one command-line interface (CLI). It allows you to run an Egochain node, manage wallets and interact with the Egochain network through queries and transactions. This introduction will explain how to install the Egochain binary onto your system and guide you through some simple examples how to use Egochain .
Prerequisites
Go
Egaxd is built using the Go version 1.20+
. Check your version with:
Once you have installed the right version, confirm that your GOPATH
is correctly configured by running the following command and adding it to your shell startup script:
jq
Egaxd scripts are using jq version 1.6+
. Check your version with:
Installation
You can download the latest binaries from the repo and install them, or you can build and install the egaxd
binaries from source or using Docker.
Download the binaries
Go to the releases section of the repository
Choose the desired release or pre-release you want to install on your machine
Select and download from the
Assets
dropdown the corresponding tar or zip file for your OSExtract the files. The
egaxd
binaries is located in thebin
directory of the extrated filesAdd the
egaxd
binaries to your path, e.g. you can move it to$(go env GOPATH)/bin
After installation is done, check that the egaxd
binaries have been successfully installed:
Build From Source
Clone and build the Egaxd from source using git
. The <tag>
refers to a release tag on Github. Check the latest Evmos version on the releases section of the repository:
After installation is done, check that the Egaxd binaries have been successfully installed:
INFO
If the egaxd: command not found
error message is returned, confirm that you have configured Go correctly.
Docker
When it comes to using Docker with Egaxd, there are two options available: Build a binary of the Egaxds daemon inside a dockerized build environment or build a Docker image, that can be used to spin up individual containers running the Egaxd binary. For information on how to achieve this, proceed to the dedicated page on working with Docker.
Run an Egaxd node
To become familiar with Egaxd, you can run a local blockchain node that produces blocks and exposes EVM and Cosmos endpoints. This allows you to deploy and interact with smart contracts locally or test core protocol functionality.
Run the local node by executing the local_node.sh
script in the base directory of the repository:
The script stores the node configuration including the local default endpoints under ~/.tmp-egaxd/config/config.toml
. If you have previously run the script, the script allows you to overwrite the existing configuration and start a new local node.
Once your node is running you will see it validating and producing blocks in your local Egaxd blockchain:
For more information on how to customize a local node, head over to the Single Node page.
Using egaxd
egaxd
After installing the egaxd
binary, you can run commands using:
There is also a -h
, --help
command available
It is possible to maintain multiple node configurations at the same time. To specify a configuration use the --home
flag. In the following examples we will be using the default config for a local node, located at ~/.tmp-egaxd
.
Manage wallets
You can manage your wallets using the egaxd binary to store private keys and sign transactions over CLI. To view all keys use:
You can generate a new key/mnemonic with a $NAME
with:
To export your egaxd key as an Ethereum private key (for use with Metamask for example):
For more about the available key commands, use the --help
flag
Last updated