mirrorcli

Command-line interface for Mirror Protocol

This section provides a brief guide on how to use Mirror Protocol via mirrorcli. For more information, please check its source code and documentation on GitHub.

mirrorcli is a command-line interface for Mirror Protocol on Terra and allows more advanced users to perform operations directly from their shell or terminal without having to interact with a graphical interface. mirrorcli is built on top of terracli and allows you to use keys saved in its keychain.

Installation

Requirements

  • Make sure your have terracli installed. terracli is a binary that is shipped with Terra Core and installed in your GOPATH.

  • Have Node.js v10+ installed with NPM

You can install mirrorcli through NPM:

$ npm install -g @mirror-protocol/mirrorcli

Configuration

On first launch, mirrorcli will generate a ~/.mirrorclirc.json in your $HOME directory, which will be used in subsequent sessions to specify settings such as LCD provider, gas prices for fee estimation, as well as contract addresses. It will come pre-configured with the official contracts for the mainnet version of Mirror on its columbus-4 setting.

The following instructions show you how to modify settings using the tequila-0004 network by default:

Specifying LCD settings

Each network config should define how to connect to the Terra blockchain via LCD parameters.

{
  "networks": {
    "tequila-0004": {
      "lcd": {
        "chainId": "tequila-0004",
        "url": "https://tequila-lcd.terra.dev",
        "gasPrices": {
          "uluna": 0.15,
          "usdr": 0.1018,
          "uusd": 0.15,
          "ukrw": 178.05,
          "umnt": 431.6259
        },
        "gasAdjustment": 1.2
      },
      ...
    }
  }
}

Specifying Contracts

Each network configuration should point to the correct Mirror core contract addresses.

Specifying the Network

By default, mirrorcli will use the network setting for columbus-4 configured in ~/.mirrorclirc.json. You can direct mirrorcli to use a different network configuration by changing the value of the MIRRORCLI_NETWORK environment variable.

Example

OR

Usage

Usage information can be found on GitHub.

Last updated