CarDex standalone docker
Prerequisites
Golang v1.19 (go releases and instructions).
Build and run
1. Make sure you have the required Golang version
go version2. Clone carDex repository and cd into it
git clone https://github.com/uwezukwechibuzor/carDex.git
cd carDex3. Build a carDex node image
make build-docker-image4. Run a carDex node as a docker container
make start-docker-containerA carDex node is now running in the background. To see the app logs, run:
docker psAnd use the cardex-node container ID in the following command:
docker logs -f <cardex-node-contained-id>To stop the node, run
make stop-docker-containerUsage
Ports
The carDex node exposes several ports to be used by you and your applications:
1317:1317 — the REST server;
26657:26657 — the Tendermint RPC server;
26656:26656 — the Tendermint P2P server;
9090:8090 — the gRPC server.
Interaction with the node using cardexd
The carDex node is available to be interacted with using cardexd command. The following command will install cardexd on your computer:
make installThis command builds the cardexd executable using the latest version of the cardex chain and installs the resulting binary in your GOBIN directory. Ensure that GOBIN is defined and included in the PATH environment variable. This ensures that the installed binary can be accessed globally on your system. If you encounter any issues during this process, troubleshoot them by verifying that your Golang-related environment variables are correctly set.
After the installation process is complete, the cardexd executable is ready to be used:
cardexd query bank totalMaking transactions
There are several accounts added at the genesis state that possess cardex chain and are at your service. See the genesis init script to find out more details about it. The following command will list all the preallocated addresses:
docker exec <cardex-node-contained-id> cardexd keys list --keyring-backend test --home data/test-1/We suggest you add the accounts from the init script mentioned above to your local test keyring to make them useful directly from the command line. To do so, copy a mnemonic from the script and use it in a keypair recovery procedure:
cardexd keys add <name> --recover --keyring-backend test
> Enter your bip39 mnemonicAfter that, you'll be able to make transactions using any of the accounts and Queries
Last updated