Commands
This section describes the commands available from injectived, the command line interface that connects a running injectived process (node).
Several injectived commands require subcommands, arguments, or flags to operate. To view this information, run the injectived command with the --help or -h flag. See query or tx for usage examples of the help flag.
For the chain-id argument, injective-1 should be used for mainnet, and injective-888 should be used for testnet.
add-genesis-account
Adds a genesis account to genesis.json. For more information on genesis.json, see the Join Testnet or Join Mainnet guide.
Syntax
injectived add-genesis-account <address-or-key-name> <amount><coin-denominator>
Example
injectived add-genesis-account acc1 100000000000inj
collect-gentxs
Collects genesis transactions and outputs them to genesis.json. For more information on genesis.json, see the Join Testnet or Join Mainnet guide.
Syntax
injectived collect-gentxs
debug
Helps debug the application. For a list of syntax and subcommands, run the debug command with the --help or -h flag:
injectived debug -h
Subcommands:
injectived debug [subcommand]
addr: Convert an address between hex and bech32pubkey: Decode a pubkey from proto JSONraw-bytes: Convert raw bytes output (e.g. [72 101 108 108 111 44 32 112 108 97 121 103 114 111 117 110 100]) to hex
export
Exports the state to JSON.
Syntax
injectived export
gentx
Adds a genesis transaction to genesis.json. For more information on genesis.json, see the Join Testnet or Join Mainnet guide.
The gentx command has many flags available. Run the gentx command with --help or -h to view all flags.
Syntax
injectived gentx <key-name> <amount><coin-denominator>
Example
injectived gentx myKey 100000000000inj --home=/path/to/home/dir --keyring-backend=os --chain-id=injective-1 \
--moniker="myValidator" \
--commission-max-change-rate=0.01 \
--commission-max-rate=1.0 \
--commission-rate=0.07 \
--details="..." \
--security-contact="..." \
--website="..."
help
Shows an overview of available commands.
Syntax
injectived help
init
Initializes the configuration files for a node.
Syntax
injectived init <moniker>
Example
injectived init myNode
keys
Manages Keyring commands. These keys may be in any format supported by the Tendermint crypto library and can be used by light-clients, full nodes, or any other application that needs to sign with a private key.
For a list of syntax and subcommands, run the keys command with the --help or -h flag:
injectived keys -h
Subcommands:
injectived keys [subcommand]
add: Add an encrypted private key (either newly generated or recovered), encrypt it, and save to the provided file namedelete: Delete the given keysexport: Export private keysimport: Import private keys into the local keybaselist: List all keysmigrate: Migrate keys from the legacy (db-based) Keybasemnemonic: Compute the bip39 mnemonic for some input entropyparse: Parse address from hex to bech32 and vice versashow: Retrieve key information by name or addressunsafe-export-eth-key: Export an Ethereum private key in plain textunsafe-import-eth-key: Import Ethereum private keys into the local keybase
migrate
Migrates the source genesis into the target version and prints to STDOUT. For more information on genesis.json, see the Join Testnet or Join Mainnet guide.
Syntax
injectived migrate <target version> <path-to-genesis-file>
Example
injectived migrate v1.9.0 /path/to/genesis.json --chain-id=injective-888 --genesis-time=2023-03-07T17:00:00Z
query
Manages queries. For a list of syntax and subcommands, run the query subcommand with the --help or -h flag:
injectived query -h
Subcommands:
injectived query [subcommand]
account: Query for account by addressauction: Querying commands for theauctionmoduleauth: Querying commands for theauthmoduleauthz: Querying commands for theauthzmodulebank: Querying commands for thebankmoduleblock: Get verified data for a block at the given heightchainlink: Querying commands for theoraclemoduledistribution: Querying commands for thedistributionmoduleevidence: Query for evidence by hash or for all (paginated) submitted evidenceexchange: Querying commands for theexchangemodulefeegrant: Querying commands for thefeegrantmodulegov: Querying commands for thegovernancemoduleibc: Querying commands for theibcmoduleibc-fee: IBC relayer incentivization query subcommandsibc-transfer: IBC fungible token transfer query subcommandsinsurance: Querying commands for theinsurancemoduleinterchain-accounts: Interchain accounts subcommandsmint: Querying commands for the minting moduleoracle: Querying commands for theoraclemoduleparams: Querying commands for theparamsmodulepeggy: Querying commands for thepeggymoduleslashing: Querying commands for theslashingmodulestaking: Querying commands for thestakingmoduletendermint-validator-set: Get the full tendermint validator set at given heighttokenfactory: Querying commands for thetokenfactorymoduletx: Query for a transaction by hash, account sequence, or combination or comma-separated signatures in a committed blocktxs: Query for paginated transactions that match a set of eventsupgrade: Querying commands for theupgrademodulewasm: Querying commands for thewasmmodulexwasm: Querying commands for thewasmxmodule
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.
Syntax
injectived rollback
rosetta
Creates a Rosetta server.
Syntax
injectived rosetta [flags]
start
Runs the full node application with Tendermint in or out of process. By default, the application runs with Tendermint in process.
The start command has many flags available. Run the start command with --help or -h to view all flags.
Syntax
injectived start [flags]
status
Displays the status of a remote node. Use the --node or -n flag to specify a node endpoint.
Syntax
injectived status
tendermint
Manages the Tendermint protocol. For a list of syntax and subcommands, run the query subcommand with the --help or -h flag:
injectived tendermint -h
Subcommands:
injectived tendermint [subcommand]
reset-state: Remove all the data and WALshow-address: Shows this node's tendermint validator consensus addressshow-node-id: Show this node's IDshow-validator: Show this node's tendermint validator infounsafe-reset-all: Remove all the data and WAL, reset this node's validator to genesis stateversionShow tendermint library versions
testnet
Creates a testnet with the specified number of directories and populates each directory with the necessary files.
The testnet command has many flags available. Run the testnet command with --help or -h to view all flags.
Syntax
injectived testnet [flags]
Example
injectived testnet --v 4 --keyring-backend test --output-dir ./output --ip-addresses 192.168.10.2
tx
Manages generation, signing, and broadcasting of transactions. See Using Injectived for examples.
For more information on syntax and available subcommands and, run the tx command with the --help or -h flag:
injectived tx -h
Subcommands:
injectived tx [subcommand]
auction: Auction transactions subcommandsauthz: Authorization transactions subcommandsbank: Bank transactions subcommandsbroadcast: Broadcast transactions generated offlinechainlink: Off-Chain Reporting (OCR) subcommandscrisis: Crisis transactions subcommandsdecode: Decode a binary encoded transaction stringdistribution: Distribution transactions subcommandsencode: Encode transactions generated offlineevidence: Evidence transactions subcommandsexchange: Exchange transactions subcommandsfeegrant: Feegrant transactions subcommandsgov: Governance transactions subcommandsibc: IBC transactions subcommandsibc-fee: IBC relayer incentivization transactions subcommandsibc-transfer: IBC fungible token transfer transactions subcommandsinsurance: Insurance transactions subcommandsmultisign: Generate multisig signatures for transactions generated offlineoracle: Oracle transactions subcommandspeggy: Peggy transactions subcommandssign: Sign a transaction generated offlinesign-batch: Sign transaction batch filesslashing: Slashing transactions subcommandsstaking: Staking transactions subcommandstokenfactory: Tokenfactory transactions subcommandsvalidate-signatures: Validate transaction signaturesvesting: Vesting transactions subcommandswasm: Wasm transactions subcommandsxwasm: Wasmx transactions subcommands
validate-genesis
Validates the genesis file at the default location or at the location specified. For more information on the genesis file, see the Join Testnet or Join Mainnet guide.
Syntax
injectived validate-genesis </path-to-file>
version
Returns the version of Injective you’re running.
Syntax
injectived version