Setup the dYdX CLI
dYdX CLI: Initial setup
Goal: build and setup dydxprotocold on your local MacOS machine, or a Windows machine with WSL, so you can access the dYdX Chain via the command line
Prerequisites
A MacOS machine - although a similar process may be deduced for another OS, so long as you install the necessary tools
1. Install Homebrew
Make sure you have Homebrew installed
brew --versionIf not, execute
/bin/bash -c "$(curl -fsSL <https://raw.githubusercontent.com/Homebrew/install/HEAD/in2. Get the tools
Make sure everything is up to date
brew update && brew upgrade You need git , make and go
3. Clone v4-chain git repository
Navigate to the directory under which you would like to clone the dYdX Chain source code into and execute the followin:
4. Checkout, build and install dydxprotocold
dydxprotocoldFirst make sure your local repository is up to date
By default, your repository is at the latest, often not-yet released, version of the software (the main branch). You can check the tracked version with
Unless else is explicitly required, you should be using the latest released version. You can check which is it from this location. The one marked as latest is the latest released - at the time of writing, that is
v3.0.0.To check outv3.0.0run:
An output similar to the below works, if you switched from main branch to a released version:
Build the binary locally (might take some time)
The created binary should be located at ./build/dydxprotocold - letβs make it available from everywhere
To test if all went well:
5. Connect to dydx-mainnet-1
Set up an RPC node to connect to from the docs and configure it locally
Configure the chain-id , so you donβt need to input it manually later
6. Test your connection to dydx-mainnet-1
Test by reading the balance of an address, for example dydx1y66c5c7zpcqxqgqec9ttutuwu60qkzav22h3ue
8. dydxprotocold help
The dydxprotocold tool has a built in help menu - simply type the following to get information for any command
For example
Last updated