LagomChain CLI
lagomd
is the all-in-one command-line interface (CLI) for interacting with the LagomChain blockchain. It allows you to run a node, manage wallets, query blockchain data, and submit transactions. This guide will walk you through installing lagomd
, running a LagomChain node, and interacting with the network.
Prerequisites
Go
LagomChain is built using Go 1.20+. Check your installed version with:
Ensure that your GOPATH is correctly configured by running:
Add this to your shell startup script for persistence.
jq
LagomChain 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 lagomd
binaries from source or using Docker.
Download the binaries
Visit the LagomChain GitHub Releases page.
Select the latest stable release for your OS.
Download and extract the binaries.
Move
lagomd
to your system path:
Verify installation:
Build From Source
Clone and build LagomChain from source:
Confirm installation:
If you encounter command not found
, check that Go is properly installed and configured.
Docker
When it comes to using Docker with LagomChain, there are two options available: Build a binary of the LagomChain daemon inside a dockerized build environment or build a Docker image, that can be used to spin up individual containers running the LagomChain binary. For information on how to achieve this, proceed to the dedicated page on working with Docker.
Running a LagomChain Node
To interact with LagomChain locally, you can run a full node that produces blocks and exposes both EVM and Cosmos endpoints. This allows you to deploy smart contracts, test transactions, and explore blockchain data.
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-lagomd/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 running, you should see logs indicating block production:
For more information on how to customize a local node, head over to the Single Node page.
Using lagomd
lagomd
After installing lagomd
, you can interact with LagomChain using various commands. To see available options:
Managing Multiple Node Configurations If you’re running multiple nodes, specify a config directory using:
Manage wallets
You can use lagomd
to store private keys, manage accounts, and sign transactions directly via CLI.
View All Wallets
Example Output:
Create a New Wallet
Export Private Key for MetaMask
For more key management options, run:
tip
For more information about the Keyring and its backend options, click here.
Interact with a Network
You can use lagomd
to query blockchain data and submit transactions.
Set Network Configuration
By default, the local node runs on:
To view the current node configuration:
Example Output:
Change Network Endpoint
To switch to a mainnet or testnet node, update the RPC endpoint using the new LagomChain RPC URLs:
or
Learn about more node configurations here.
Queries
You can fetch blockchain data using the lagomd query
command (short form: lagomd q
).
Check Account Balance
Example Output:
To see all available queries:
For bank-related queries:
Transactions
You can send transactions using lagomd tx
.
Send Tokens
Example Output:
To see all available transaction commands:
For bank transaction commands:
Now that you've learned the basics of how to run and interact with an LagomChain network, head over to configurations for further customization.
Last updated