LogoLogo
  • Welcome
    • About ENI
  • Getting Started
    • Quickstart
      • Account Structure
      • Token Standards
      • Gas
    • Divergence from Ethereum
    • Transactions
      • Creating Transaction
    • Governance
      • Proposals
    • Oracles
  • Build
    • Setup and Installation
    • Smart Contracts
      • EVM (General)
      • EVM (CLI)
      • Querying State
    • Frontend Development
      • Overview
      • How to Deploy Your First dApp
    • Ecosystem
      • Tools and Resources
      • Resources
  • Node
    • Getting Started
    • Node Operators Guide
    • Validator Operations Guide
    • Advanced Configuration & Monitoring
    • Technical Reference
  • Reference
    • Overview
    • enid
    • CLI
      • enid add-genesis-account
      • enid blocktest
      • enid collect-gentxs
      • enid compact
      • enid config
      • enid debug
      • enid export
      • enid gentx
      • enid help
      • enid init
      • enid keys
        • enid keys delete
        • enid keys add
        • enid keys export
        • enid keys import
        • enid keys list
        • enid keys mnemonic
        • enid keys parse
        • enid keys show
      • enid latest_version
      • enid migrate
      • enid prune
      • enid query
        • enid query accesscontrol
        • enid query upgrade
        • enid query account
        • enid query auth
        • enid query bank
        • enid query block
        • enid query authz
        • enid query distribution
        • enid query epoch
        • enid query evidence
        • enid query evm
        • enid query feegrant
        • enid query ibc-transfer
        • enid query gov
        • enid query ibc
        • enid query mint
        • enid query oracle
        • enid query params
        • enid query slashing
        • enid query staking
        • enid query tendermint-validator-set
        • enid query tokenfactory
        • enid query tx
        • enid query txs
      • enid rollback
      • enid start
      • enid status
      • enid tendermint
      • enid tools
      • enid tx
      • enid validate-genesis
      • enid version
Powered by GitBook
On this page
  • enid CLI
  • Prerequisites
  • Installation
  • Commands
  1. Build

Setup and Installation

PreviousOraclesNextSmart Contracts

Last updated 2 months ago

enid CLI

enid is a command-line tool for interacting with the ENI blockchain. This page will guide you through setting up Enid and introduce some basic commands to help you get started.

Prerequisites

  • Go 1.23+: Installation instructions can be found .

Installation

To install enid, first find the version you wish to use , then run the following commands:

git clone https://github.com/eni-chain/go-eni
cd eni-chain
git checkout main
make install

You can verify that enid is installed correctly by running:

enid version

If you encounter an error like command not found: enid, you may need to set the GOPATH environment variable.

  1. Use go env GOPATH to find your GOPATH

  2. Add the following lines to your ~/.bashrc or ~/.zshrc:

    export GOPATH=[GOPATH obtained from step 1]
    export PATH=$PATH:$GOPATH/bin

Commands

enid supports all the commands necessary for interacting with the chain. To see a list of available commands and their descriptions, run enid:

Start eni app

Usage:
  enid [command]

Available Commands:
  add-genesis-account      Add a genesis account to genesis.json
  add-wasm-genesis-message Wasm genesis subcommands
  collect-gentxs           Collect genesis txs and output a genesis.json file
  compact                  Compact the application DB fully (only if it is a levelDB)
  config                   Create or query an application CLI configuration file
  debug                    Tool for helping with debugging your application
  export                   Export state to JSON
  gentx                    Generate a genesis tx carrying a self delegation
  help                     Help about any command
  init                     Initialize private validator, p2p, genesis, and application configuration files
  keys                     Manage your application's keys
  latest_version           Prints the latest version of the app DB
  migrate                  Migrate genesis to a specified target version
  prune                    Prune app history states by keeping the recent heights and deleting old heights
  query                    Querying subcommands
  rollback                 rollback cosmos-sdk and tendermint state by one height
  start                    Run the full node
  status                   Query remote node for status
  tendermint               Tendermint subcommands
  tools                    A set of useful tools for eni chain
  tx                       Transactions subcommands
  validate-genesis         validates the genesis file at the default location or at the location passed as an arg
  version                  Print the application binary version information

Flags:
  -h, --help                help for enid
      --home string         directory for config and data (default "/Users/bryantran/.eni")
      --log_format string   The logging format (json|plain)
      --log_level string    The logging level (trace|debug|info|warn|error|fatal|panic)
      --trace               print out full stack trace on errors

Use "enid [command] --help" for more information about a command.

Adding a Wallet

You can create a new wallet using the enid keys command:

enid keys add $NAME

Replace $NAME with the name you want to use for this key. This will generate a mnemonic phrase and store the account in the CLI for use. Write down this mnemonic phrase and store it securely.

Alternatively, if you want to import an existing mnemonic phrase, you can add the --recover flag:

enid keys add $NAME --recover

You will then be prompted to enter the mnemonic phrase.

If importing from an EVM wallet like MetaMask, you may need to specify the coin type. Ethereum-based (EVM) wallets use coin type 60, while Eni defaults to 118. For example,

enid keys add $NAME --coin-type=60

This will generate an address different from the default coin type 118.

To view your local wallets, you can run

enid keys list

to see a list of all added wallets, or run

enid keys show $NAME

to view details of a specific wallet.

More information can be found .

here
here
here