Chain

Manage chains and configs

Available Commands

Command
Description

Displays current chain config.

Creates a copy of a current config.

Displays current value for a given key.

Lists all the currently saved configs.

Creates a new config.

Removes a config by name or chain Id.

Swap to a saved config.

Config

Displays the config of the chain.

Key
Description

addressPrefix

The prefix for all addresses on chain

blockExplorerTxPages

URLs to block explorers for the given chain. Must include '${txHash}'

blockExplorerAddressPages

URLs to block explorers for the given chain. Must include '${txHash}'

chainId

The Id of the chain to use

chainUrl

The URL of the chain to use

chainName

The name of the chain.

chainType

The type of chain (Testnet or Mainnet).

defualtFee

The default fee amount

iconUrls

The icon for the chain.

kernelAddress

The contract address of the Kernel of the chain.

registryAddress

The contract address of the registry of the chain.

name

The name of the config being used.

enabled

Whether the config is enabled in the CLI.

Usage

Example

The above command will generate an output similar to:

Copy

Creates a copy of a current config.

Usage

Example

Get

Gets the value for the specified key. The keys are the ones found above when we call chain config (chainId, chainUrl, ect...)

Usage

Example

List

Lists all the saved configs.

Usage

Example

New

Creates a new config.

Usage

Example

You will be prompted to enter the required config fields. We can then query the configs:

Remove

Removes a config by name or chain ID.

Usage

Example

Use

Swaps to one of the saved configs.

Usage

Example

CLI Configs

You can get all the configs from the CLI by running chain config.

Last updated

Was this helpful?