Command line interface

liked

liked is for launching the node and manipulating node related files, e.g. adding accounts into genesis.json.
Chain data, consensus key, node key and configuration files will be stored in .liked folder, default location is $HOME/.liked.
With the setup guide, we are running liked in Docker and the .liked directory is placed in likecoin-chain root directory. We provided some convenient shortcuts using Docker Compose profiles, so you can run the liked command by:
1
docker-compose run --rm liked-command SUB-COMMANDS...
Copied!
If you met permission issues (e.g. panic: could not create directory "//.liked": mkdir //.liked: permission denied), please add --user 0 after --rm to run as root.
Common usage:

Initializing chain node

1
liked init [MONIKER]
Copied!
This will initialize default configuration files, generate consensus key and node key in .liked folder.

Adding genesis account

1
liked add-genesis-account [ADDRESS] [COINS]
Copied!
This will append the account with the coins in .liked/config/genesis.json.

Generating and signing genesis transaction

1
liked gentx [OPTIONS]
Copied!
This will generate and sign a genesis transaction for creating validator during genesis.
The parameters are set by options.
The generated transaction with signature will be stored in .liked/config/gentx/ folder as JSON file.
See --help for more details.

Aggregating genesis transactions

1
liked collect-gentxs
Copied!
This will collect genesis transactions in JSON files in .liked/config/gentx/ into .liked/config/genesis.json.

Starting node

1
liked start
Copied!
This will start the node.

Reseting chain data

1
liked unsafe-reset-all
Copied!
This will clear the chain block data, resetting it to the initial state.
The configurations, consensus key, node key and genesis.json will remain unchanged.
1
liked tendermint [SUBCOMMANDS]
Copied!
This command provides subcommands for querying info about Tendermint, e.g. consensus public key and node ID.
See --help for more details.

Key management

1
liked keys [SUBCOMMANDS]
Copied!
This command provides subcommands for managing address keys, e.g. adding, removing, exporting, importing keys.

List keys available

1
liked keys list
Copied!

Create a new key

1
liked keys add [KEY_NAME]
Copied!

Import a recovery phase

1
liked keys add --recover [KEY_NAME]
Copied!
See --help for more details.

Querying chain info

1
liked query [SUBCOMMANDS]
Copied!
This command aggregates subcommands provided by Cosmos SDK modules for querying chain data.

Querying account info

1
liked query auth account cosmos1xvymudttgxrypxwy0ujnu5pgd6fq6c079yuf92
Copied!

Signing and sending transactions

1
liked tx [SUBCOMMANDS]
Copied!
This command aggregates subcommands provided by Cosmos SDK modules for generating and signing transactions.
Example: sending 1000 LIKE from the faucet account managed by liked
1
likecli tx bank send faucet cosmos1mw2l98asefxev9s9mvdtm2j5mcap9mn5t3u8lh 1000000000000nanolike \
2
--chain-id likecoin-public-testnet-3 \
3
--gas 100000 \
4
--gas-prices 100.0nanolike
Copied!

likecli

In the old SheungWan software, commands are split into two executables: liked for server and likecli for client.
However, since the FoTan upgrade, two commands are now combined, so likecli is deprecated.
If you have keys managed by likecli, you can migrate those keys by liked keys migrate.
For the RESTful API, it is also built into liked, you may enable the APIs from .liked/config/app.toml and open the corresponding ports.
Last modified 3mo ago