Search
Duplicate
Try Notion
CLI flags configuration
📌
Some flags may be required by specific CLIs, as indicated by an asterisk (*) in the documentation.
SEKAI CLIs offers a range of flags that can be used to customize the behavior of commands and gather additional information from the transaction signer, such as the amount of --fees the user is willing to pay. Some common flags include --home, which allows users to specify the location of the data directory, and --chain-id, which allows users to specify the chain ID. Additionally, users can specify the keys storage backend with --keyring-backend. A full list of available flags can be below or accessed using the --help flag with the relevant CLI.
To streamline the process of specifying flags for transactions, users can use the bash-utils tool developed by KIRA. This tool, which has been installed alongside SEKAID, allows users to easily set environment variables for common flags and load them as needed. For example, to set common flags for transactions on the testnet (such as --keyring-backend=test), users can add the following environment variable:
Bash
Copy
setGlobEnv FLAGS_TX "--home=$SEKAID_HOME --chain-id=$NETWORK_NAME --fees=100ukex --keyring-backend=test --yes --broadcast-mode=block --log_format=json --output=json"
​
Similar to transactions, users can also set environment variables for common flags used in queries. For example, to set common flags for queries, users can add the following environment variable:
Bash
Copy
setGlobEnv FLAGS_QR "--home=$SEKAID_HOME --chain-id=$NETWORK_NAME --output=json"
​
To use those newly created environment variables, simply call the loadGlobEnvs function:
Bash
Copy
loadGlobEnvs
​
List of flags
FLAG
DEFAULT
DESCRIPTION
--output
"json"
Output format (text or json)
--keyring-dir
The client Keyring directory; if omitted, the default 'home' directory will be used
--from
Name or address of private key with which to sign the transaction
--account-number
0
The account number of the signing account (offline mode only)
--sequence
0
The sequence number of the signing account (offline mode only)
--note
Note to add a description to the transaction (previously --memo)
--fees
Fees to pay along with transaction; eg: 10ukex
--gas-prices
Gas prices in decimal format to determine the transaction fee (e.g. 0.1ukex)
--node
tcp://localhost:26657
<host>:<port> to tendermint rpc interface for this chain
--ledger
false
Use a connected Ledger device
--gas-adjustment
DefaultGasAdjustment
adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored
--broadcast-mode
BroadcastSync
Transaction broadcasting mode (sync or async or block)
--dry-run
false
ignore the --gas flag and perform a simulation of a transaction, but don't broadcast it (when enabled, the local Keybase is not accessible)
--generate-only
false
Build an unsigned transaction and write it to STDOUT (when enabled, the local Keybase only accessed when providing a key name)
--offline
false
Offline mode (does not allow any online functionality)
--yes
false
Skip tx broadcasting prompt confirmation
--keyring-backend
DefaultKeyringBackend
Select keyring's backend (os or file or kwallet or pass or test or memory)
--sign-mode
Choose sign mode (direct or amino-json or direct-aux), this is an advanced feature
--timeout-height
0
Set a block timeout height to prevent the tx from being committed past a certain height
--fee-payer
Fee payer pays fees for the transaction instead of deducting from the signer
--fee-granter
Fee granter grants fees for the transaction
--tip
Tip is the amount that is going to be transferred to the fee payer on the target chain. This flag is only valid when used with --aux, and is ignored if the target chain didn't enable the TipDecorator
--aux
false
Generate aux signer data instead of sending a tx
--gas
gas limit to set per-transaction; set to "auto" to calculate sufficient gas automatically