CLI configuration
By default, many Axelar CLI commands contain boilerplate material that obfuscates the command and adds complexity to documentation. Here we describe documentation conventions and ways to configure your system so as to reduce this boilerplate.
Example: As per Send AXL to an EVM chain you can use the CLI to get a deposit address for cross-chain transfer of AXL tokens via the command
The above command does not work on a system that has not yet been properly configured. On a fresh, unconfigured system you would instead need to type
Let us explain the changes:
- Keyring password.
echo $KEYRING_PASSWORD
: Commands that usetx
to post a signed transaction to the network require a password to unlock the keyring. For simplicity documentation elides the keyring password. See Keyring backend for more info. - Path to
axelard
.~/.axelar_testnet/bin/axelard
: You can avoid the need to type the full path toaxelard
by puttingaxelard
in yourPATH
environment variable or defining a shell alias. - Gas.
--gas auto --gas-adjustment 1.5
: Commands that usetx
to post a signed transaction to the network must pay transaction fees called gas. By defaultaxelard
estimates the gas fee but sometimes this estimation is inaccurate and the transaction fails due to insufficient gas fee. These gas flags instructaxelard
to estimate gas more accurately, then increase the maximum gas for the transaction by a factor you specify (1.5
in this case) so that your transaction is more likely to have sufficient gas even if actual network fees exceed the estimate. For simplicity documentation elides these flags. - Chain ID.
--chain-id axelar-testnet-lisbon-3
: Commands that usetx
to post a signed transaction to the network must specify thechain-id
for the transaction. You could instead set theAXELARD_CHAIN_ID
environment variable. - Home directory.
--home ~/.axelar_testnet
: Many commands must specify the path to on-disk storage foraxelard
. You could instead set theAXELARD_HOME
environment variable. The default value is~/.axelar
.