|
1 | | -# Advanced |
| 1 | +# Commands |
2 | 2 |
|
| 3 | +This section describes the commands available from `injectived`, the command line interface that connects a running `injectived` process (node). |
| 4 | + |
| 5 | +:::tip 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. |
| 6 | + |
| 7 | +For the `chain-id` argument, `injective-1` should be used for mainnet, and `injective-888` should be used for testnet. ::: |
| 8 | + |
| 9 | +### `add-genesis-account` |
| 10 | + |
| 11 | +Adds a genesis account to `genesis.json`. For more information on `genesis.json`, see the Join Testnet or Join Mainnet guide. |
| 12 | + |
| 13 | +**Syntax** |
| 14 | + |
| 15 | +```bash |
| 16 | +injectived add-genesis-account <address-or-key-name> <amount><coin-denominator> |
| 17 | +``` |
| 18 | + |
| 19 | +**Example** |
| 20 | + |
| 21 | +```bash |
| 22 | +injectived add-genesis-account acc1 100000000000inj |
| 23 | +``` |
| 24 | + |
| 25 | +### `collect-gentxs` |
| 26 | + |
| 27 | +Collects genesis transactions and outputs them to `genesis.json`. For more information on `genesis.json`, see the Join Testnet or Join Mainnet guide. |
| 28 | + |
| 29 | +**Syntax** |
| 30 | + |
| 31 | +```bash |
| 32 | +injectived collect-gentxs |
| 33 | +``` |
| 34 | + |
| 35 | +### `debug` |
| 36 | + |
| 37 | +Helps debug the application. For a list of syntax and subcommands, run the `debug` command with the `--help` or `-h` flag: |
| 38 | + |
| 39 | +```bash |
| 40 | +injectived debug -h |
| 41 | +``` |
| 42 | + |
| 43 | +**Subcommands**: |
| 44 | + |
| 45 | +```bash |
| 46 | +injectived debug [subcommand] |
| 47 | +``` |
| 48 | + |
| 49 | +* **`addr`**: Convert an address between hex and bech32 |
| 50 | +* **`pubkey`**: Decode a pubkey from proto JSON |
| 51 | +* **`raw-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 |
| 52 | + |
| 53 | +### `export` |
| 54 | + |
| 55 | +Exports the state to JSON. |
| 56 | + |
| 57 | +**Syntax** |
| 58 | + |
| 59 | +```bash |
| 60 | +injectived export |
| 61 | +``` |
| 62 | + |
| 63 | +### `gentx` |
| 64 | + |
| 65 | +Adds a genesis transaction to `genesis.json`. For more information on `genesis.json`, see the Join Testnet or Join Mainnet guide. |
| 66 | + |
| 67 | +:::note The `gentx` command has many flags available. Run the `gentx` command with `--help` or `-h` to view all flags.\ |
| 68 | +::: |
| 69 | + |
| 70 | +**Syntax** |
| 71 | + |
| 72 | +```bash |
| 73 | +injectived gentx <key-name> <amount><coin-denominator> |
| 74 | +``` |
| 75 | + |
| 76 | +**Example** |
| 77 | + |
| 78 | +```bash |
| 79 | +injectived gentx myKey 100000000000inj --home=/path/to/home/dir --keyring-backend=os --chain-id=injective-1 \ |
| 80 | + --moniker="myValidator" \ |
| 81 | + --commission-max-change-rate=0.01 \ |
| 82 | + --commission-max-rate=1.0 \ |
| 83 | + --commission-rate=0.07 \ |
| 84 | + --details="..." \ |
| 85 | + --security-contact="..." \ |
| 86 | + --website="..." |
| 87 | +``` |
| 88 | + |
| 89 | +### `help` |
| 90 | + |
| 91 | +Shows an overview of available commands. |
| 92 | + |
| 93 | +**Syntax** |
| 94 | + |
| 95 | +```bash |
| 96 | +injectived help |
| 97 | +``` |
| 98 | + |
| 99 | +### `init` |
| 100 | + |
| 101 | +Initializes the configuration files for a node. |
| 102 | + |
| 103 | +**Syntax** |
| 104 | + |
| 105 | +```bash |
| 106 | +injectived init <moniker> |
| 107 | +``` |
| 108 | + |
| 109 | +**Example** |
| 110 | + |
| 111 | +```bash |
| 112 | +injectived init myNode |
| 113 | +``` |
| 114 | + |
| 115 | +### `keys` |
| 116 | + |
| 117 | +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. |
| 118 | + |
| 119 | +For a list of syntax and subcommands, run the `keys` command with the `--help` or `-h` flag: |
| 120 | + |
| 121 | +```bash |
| 122 | +injectived keys -h |
| 123 | +``` |
| 124 | + |
| 125 | +**Subcommands**: |
| 126 | + |
| 127 | +```bash |
| 128 | +injectived keys [subcommand] |
| 129 | +``` |
| 130 | + |
| 131 | +* **`add`**: Add an encrypted private key (either newly generated or recovered), encrypt it, and save to the provided file name |
| 132 | +* **`delete`**: Delete the given keys |
| 133 | +* **`export`**: Export private keys |
| 134 | +* **`import`**: Import private keys into the local keybase |
| 135 | +* **`list`**: List all keys |
| 136 | +* **`migrate`**: Migrate keys from the legacy (db-based) Keybase |
| 137 | +* **`mnemonic`**: Compute the bip39 mnemonic for some input entropy |
| 138 | +* **`parse`**: Parse address from hex to bech32 and vice versa |
| 139 | +* **`show`**: Retrieve key information by name or address |
| 140 | +* **`unsafe-export-eth-key`**: Export an Ethereum private key in plain text |
| 141 | +* **`unsafe-import-eth-key`**: Import Ethereum private keys into the local keybase |
| 142 | + |
| 143 | +\ |
| 144 | +`migrate` |
| 145 | + |
| 146 | +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. |
| 147 | + |
| 148 | +**Syntax** |
| 149 | + |
| 150 | +```bash |
| 151 | +injectived migrate <target version> <path-to-genesis-file> |
| 152 | +``` |
| 153 | + |
| 154 | +**Example** |
| 155 | + |
| 156 | +```bash |
| 157 | +injectived migrate v1.9.0 /path/to/genesis.json --chain-id=injective-888 --genesis-time=2023-03-07T17:00:00Z |
| 158 | +``` |
| 159 | + |
| 160 | +### `query` |
| 161 | + |
| 162 | +Manages queries. For a list of syntax and subcommands, run the `query` subcommand with the `--help` or `-h` flag: |
| 163 | + |
| 164 | +```bash |
| 165 | +injectived query -h |
| 166 | +``` |
| 167 | + |
| 168 | +**Subcommands**: |
| 169 | + |
| 170 | +```bash |
| 171 | +injectived query [subcommand] |
| 172 | +``` |
| 173 | + |
| 174 | +* **`account`**: Query for account by address |
| 175 | +* **`auction`**: Querying commands for the `auction` module |
| 176 | +* **`auth`**: Querying commands for the `auth` module |
| 177 | +* **`authz`**: Querying commands for the `authz` module |
| 178 | +* **`bank`**: Querying commands for the `bank` module |
| 179 | +* **`block`**: Get verified data for a block at the given height |
| 180 | +* **`chainlink`**: Querying commands for the `oracle` module |
| 181 | +* **`distribution`**: Querying commands for the `distribution` module |
| 182 | +* **`evidence`**: Query for evidence by hash or for all (paginated) submitted evidence |
| 183 | +* **`exchange`**: Querying commands for the `exchange` module |
| 184 | +* **`feegrant`**: Querying commands for the `feegrant` module |
| 185 | +* **`gov`**: Querying commands for the `governance` module |
| 186 | +* **`ibc`**: Querying commands for the `ibc` module |
| 187 | +* **`ibc-fee`**: IBC relayer incentivization query subcommands |
| 188 | +* **`ibc-transfer`**: IBC fungible token transfer query subcommands |
| 189 | +* **`insurance`**: Querying commands for the `insurance` module |
| 190 | +* **`interchain-accounts`**: Interchain accounts subcommands |
| 191 | +* **`mint`**: Querying commands for the minting module |
| 192 | +* **`oracle`**: Querying commands for the `oracle` module |
| 193 | +* **`params`**: Querying commands for the `params` module |
| 194 | +* **`peggy`**: Querying commands for the `peggy` module |
| 195 | +* **`slashing`**: Querying commands for the `slashing` module |
| 196 | +* **`staking`**: Querying commands for the `staking` module |
| 197 | +* **`tendermint-validator-set`**: Get the full tendermint validator set at given height |
| 198 | +* **`tokenfactory`**: Querying commands for the `tokenfactory` module |
| 199 | +* **`tx`**: Query for a transaction by hash, account sequence, or combination or comma-separated signatures in a committed block |
| 200 | +* **`txs`**: Query for paginated transactions that match a set of events |
| 201 | +* **`upgrade`**: Querying commands for the `upgrade` module |
| 202 | +* **`wasm`**: Querying commands for the `wasm` module |
| 203 | +* **`xwasm`**: Querying commands for the `wasmx` module |
| 204 | + |
| 205 | +### `rollback` |
| 206 | + |
| 207 | +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. |
| 208 | + |
| 209 | +**Syntax** |
| 210 | + |
| 211 | +```bash |
| 212 | +injectived rollback |
| 213 | +``` |
| 214 | + |
| 215 | +### `rosetta` |
| 216 | + |
| 217 | +Creates a Rosetta server. |
| 218 | + |
| 219 | +**Syntax** |
| 220 | + |
| 221 | +```bash |
| 222 | +injectived rosetta [flags] |
| 223 | +``` |
| 224 | + |
| 225 | +### `start` |
| 226 | + |
| 227 | +Runs the full node application with Tendermint in or out of process. By default, the application runs with Tendermint in process. |
| 228 | + |
| 229 | +{% hint style="info" %} |
| 230 | +The `start` command has many flags available. Run the `start` command with `--help` or `-h` to view all flags. |
| 231 | +{% endhint %} |
| 232 | + |
| 233 | +**Syntax** |
| 234 | + |
| 235 | +```bash |
| 236 | +injectived start [flags] |
| 237 | +``` |
| 238 | + |
| 239 | +### `status` |
| 240 | + |
| 241 | +Displays the status of a remote node. Use the `--node` or `-n` flag to specify a node endpoint. |
| 242 | + |
| 243 | +**Syntax** |
| 244 | + |
| 245 | +```bash |
| 246 | +injectived status |
| 247 | +``` |
| 248 | + |
| 249 | +### `tendermint` |
| 250 | + |
| 251 | +Manages the Tendermint protocol. For a list of syntax and subcommands, run the `query` subcommand with the `--help` or `-h` flag: |
| 252 | + |
| 253 | +```bash |
| 254 | +injectived tendermint -h |
| 255 | +``` |
| 256 | + |
| 257 | +**Subcommands**: |
| 258 | + |
| 259 | +```bash |
| 260 | +injectived tendermint [subcommand] |
| 261 | +``` |
| 262 | + |
| 263 | +* **`reset-state`**: Remove all the data and WAL |
| 264 | +* **`show-address`**: Shows this node's tendermint validator consensus address |
| 265 | +* **`show-node-id`**: Show this node's ID |
| 266 | +* **`show-validator`**: Show this node's tendermint validator info |
| 267 | +* **`unsafe-reset-all`**: Remove all the data and WAL, reset this node's validator to genesis state |
| 268 | +* **`version`** Show tendermint library versions |
| 269 | + |
| 270 | +### `testnet` |
| 271 | + |
| 272 | +Creates a testnet with the specified number of directories and populates each directory with the necessary files. |
| 273 | + |
| 274 | +{% hint style="info" %} |
| 275 | +The `testnet` command has many flags available. Run the `testnet` command with `--help` or `-h` to view all flags. |
| 276 | +{% endhint %} |
| 277 | + |
| 278 | +**Syntax** |
| 279 | + |
| 280 | +```bash |
| 281 | +injectived testnet [flags] |
| 282 | +``` |
| 283 | + |
| 284 | +**Example** |
| 285 | + |
| 286 | +```bash |
| 287 | +injectived testnet --v 4 --keyring-backend test --output-dir ./output --ip-addresses 192.168.10.2 |
| 288 | +``` |
| 289 | + |
| 290 | +### `tx` |
| 291 | + |
| 292 | +Manages generation, signing, and broadcasting of transactions. See Using Injectived for examples. |
| 293 | + |
| 294 | +For more information on syntax and available subcommands and, run the `tx` command with the `--help` or `-h` flag: |
| 295 | + |
| 296 | +```bash |
| 297 | +injectived tx -h |
| 298 | +``` |
| 299 | + |
| 300 | +**Subcommands**: |
| 301 | + |
| 302 | +```bash |
| 303 | +injectived tx [subcommand] |
| 304 | +``` |
| 305 | + |
| 306 | +* **`auction`**: Auction transactions subcommands |
| 307 | +* **`authz`**: Authorization transactions subcommands |
| 308 | +* **`bank`**: Bank transactions subcommands |
| 309 | +* **`broadcast`**: Broadcast transactions generated offline |
| 310 | +* **`chainlink`**: Off-Chain Reporting (OCR) subcommands |
| 311 | +* **`crisis`**: Crisis transactions subcommands |
| 312 | +* **`decode`**: Decode a binary encoded transaction string |
| 313 | +* **`distribution`**: Distribution transactions subcommands |
| 314 | +* **`encode`**: Encode transactions generated offline |
| 315 | +* **`evidence`**: Evidence transactions subcommands |
| 316 | +* **`exchange`**: Exchange transactions subcommands |
| 317 | +* **`feegrant`**: Feegrant transactions subcommands |
| 318 | +* **`gov`**: Governance transactions subcommands |
| 319 | +* **`ibc`**: IBC transactions subcommands |
| 320 | +* **`ibc-fee`**: IBC relayer incentivization transactions subcommands |
| 321 | +* **`ibc-transfer`**: IBC fungible token transfer transactions subcommands |
| 322 | +* **`insurance`**: Insurance transactions subcommands |
| 323 | +* **`multisign`**: Generate multisig signatures for transactions generated offline |
| 324 | +* **`oracle`**: Oracle transactions subcommands |
| 325 | +* **`peggy`**: Peggy transactions subcommands |
| 326 | +* **`sign`**: Sign a transaction generated offline |
| 327 | +* **`sign-batch`**: Sign transaction batch files |
| 328 | +* **`slashing`**: Slashing transactions subcommands |
| 329 | +* **`staking`**: Staking transactions subcommands |
| 330 | +* **`tokenfactory`**: Tokenfactory transactions subcommands |
| 331 | +* **`validate-signatures`**: Validate transaction signatures |
| 332 | +* **`vesting`**: Vesting transactions subcommands |
| 333 | +* **`wasm`**: Wasm transactions subcommands |
| 334 | +* **`xwasm`**: Wasmx transactions subcommands |
| 335 | + |
| 336 | +### `validate-genesis` |
| 337 | + |
| 338 | +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. |
| 339 | + |
| 340 | +**Syntax** |
| 341 | + |
| 342 | +```bash |
| 343 | +injectived validate-genesis </path-to-file> |
| 344 | +``` |
| 345 | + |
| 346 | +### `version` |
| 347 | + |
| 348 | +Returns the version of Injective you’re running. |
| 349 | + |
| 350 | +**Syntax** |
| 351 | + |
| 352 | +```bash |
| 353 | +injectived version |
| 354 | +``` |
0 commit comments