# Commands

This section describes the commands available from injectived, the command line interface that connects a running injectived process.

# add-genesis-account

Adds a genesis account to genesis.json.


Copy injectived add-genesis-account <address-or-key-name> <amount><coin-denominator>


Copy injectived add-genesis-account acc1 100000000000inj

# collect-gentxs

Collects genesis transactions and outputs them to genesis.json.


Copy injectived collect-gentxs

# debug

Helps debug the application. For a list of syntax and subcommands, see the debug subcommands. TODO!!!

# export

Exports the state to JSON.


Copy injectived export

# gentx

Adds a genesis transaction to genesis.json.


Copy injectived gentx <key-name> <amount><coin-denominator>


Copy injectived gentx myKey 100000000000inj --home=/path/to/home/dir --keyring-backend=os --chain-id=test-chain-1 \ --moniker="myValidator" \ --commission-max-change-rate=0.01 \ --commission-max-rate=1.0 \ --commission-rate=0.07 \ --details="..." \ --security-contact="..." \ --website="..."

# help

Shows help information.


Copy injectived help

# init

Initializes the configuration files for a validator and a node.


Copy injectived init <moniker>


Copy injectived init myNode

# keys

Manages Keyring commands. For a list of syntax and subcommands, see the keys subcommands.

# migrate

Migrates the source genesis into the target version and prints to STDOUT.


Copy injectived migrate <path-to-genesis-file>


Copy injectived migrate /genesis.json --chain-id=testnet --genesis-time=2020-04-19T17:00:00Z --initial-height=4000

# query

Manages queries. For a list of syntax and subcommands, see the query subcommands.

# rollback

A state rollback is performed to recover from an incorrect application state transition, when Tendermint has persisted an incorrect app hash and is thus unable to make progress. Rollback overwrites a state at height n with the state at height n - 1. The application also roll back to height n - 1. No blocks are removed, so upon restarting Tendermint the transactions in block n will be re-executed against the application.


Copy injectived rollback [flags] Flags: -h, --help help for rollback Global Flags: --home string directory for config and data (default "/Users/dearkane/.injectived") --log-level string Sets the level of the logger (error, warn, info, debug | or <module>:<level>) (default "info") --trace print out full stack trace on errors

# rosetta

Creates a Rosetta server.


Copy injectived rosetta

# start

Runs the full node application with Tendermint in or out of process. By default, the application runs with Tendermint in process.


Copy injectived start

# status

Displays the status of a remote node.


Copy injectived status

# tendermint

Manages the Tendermint protocol.

# testnet

Creates a testnet with the specified number of directories and populates each directory with the necessary files.


Copy injectived testnet


Copy injectived testnet --v 6 --output-dir ./output --starting-ip-address

# tx

Retrieves a transaction by its hash, account sequence, or signature. For a list of full syntax and subcommands, see the tx subcommands.

Syntax to query by hash

Copy injectived query tx <hash>

Syntax to query by account sequence

Copy injectived query tx --type=acc_seq <address>:<sequence>

Syntax to query by signature

Copy injectived query tx --type=signature <sig1_base64,sig2_base64...>

# validate-genesis

Validates the genesis file at the default location or at the location specified.


Copy injectived validate-genesis </path-to-file>


Copy injectived validate-genesis </genesis.json>

# version

Returns the version of Injective you’re running.


Copy injectived version