See the status of all the chains created

carried out forge chain:ls You can view the current status of all the created chains, the execution process:

There may be three kinds of chain states here:

  • stopped: indicates that the chain is not started
  • running: indicates that the chain is running
  • error: indicates that the chain failed to start

See the status of all chains in operation

carried out forge ps You can view the status of all running chains. If there are multiple chains running, they will be listed in order. The execution process:

See the status of a chain

carried out forge status You can view the on-chain status of a running chain, such as the chain itself, Forge, validator node, network, etc. The specific commands are:

For example we want to check test-chain Status, you can execute: forge status -c test-chainIf the chain is in a stopped state, the Forge CLI will remind us to start it. After starting, execute the command again to see the results. The process is as follows:

by default, forge status Information such as the current chain name, block height, last block time, and supported contracts will be displayed. As for other self-command readers, they can explore on their own.