Setup local test node
  1. 1.
    Clone the likecoin-chain git repository using the latest tag. As of now latest version is v2.0.0, please check the mainnet repository to confirm version.
1
git clone https://github.com/likecoin/likecoin-chain \
2
--branch v2.0.2 --single-branch \
3
likecoin-chain && cd likecoin-chain
Copied!
2. (optional) Build the chain Docker image
1
make build-docker
Copied!
3. Setup the needed files and folders
1
cp docker-compose.yml.template docker-compose.yml
2
cp .env.template .env
3
mkdir -p .liked
Copied!
4. Add a key for local use, please record the mnemonic shown
1
export YOUR_KEY_NAME=<type your key name here>
2
export CHAIN_ID=<type your chain ID here>
3
docker-compose run --rm liked-command \
4
keys add $YOUR_KEY_NAME
Copied!
5. Init the testnet
1
docker-compose run --rm liked-command \
2
init testnet --chain-id $CHAIN_ID
Copied!
6. Set all denom in genesis.json to nanolike
1
docker-compose run --rm liked-service \
2
sed -i 's/"stake"/"nanolike"/g' /likechain/.liked/config/genesis.json
Copied!
7. Init the testnet accounts
1
docker-compose run --rm liked-command \
2
add-genesis-account $YOUR_KEY_NAME 2000000000000000000nanolike
3
4
docker-compose run --rm liked-command \
5
gentx $YOUR_KEY_NAME 1000000000000000000nanolike --chain-id $CHAIN_ID
6
7
docker-compose run --rm liked-command \
8
collect-gentxs
Copied!
8. Modify docker-compose.yml and ./.liked/config/app.toml if you need lcd / grpc services
1
#docker-compose.yml
2
ports:
3
- 1317:1317
4
- 9090:9090
5
- 26656:26656
6
- 127.0.0.1:26657:26657
Copied!
1
# app.toml
2
[api]
3
4
# Enable defines if the API server should be enabled.
5
enable = true
Copied!
9. Start running the node
1
docker-compose up -d
Copied!
Last modified 1mo ago
Export as PDF
Copy link