The following are step-by-step instructions on how to mint your CAT20 token on the Fractal Mainnet. This guide provides detailed steps for setting up the necessary environment, installing required components, and executing the minting process.
Prerequisites
Before beginning, ensure that you have:
- A system running a supported operating system with internet connectivity.
- Docker and Docker Compose installed.
- Administrative privileges to install software packages.
Begin by installing Docker on your system to manage containerized applications.
sudo apt update && sudo apt install -y curl
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
Docker Compose is essential for defining and running multi-container Docker applications. It can be installed using the following commands:
sudo curl -L "https://github.com/docker/compose/releases/download/$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4)/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Node.js and Yarn are required for managing dependencies and scripts.
- Install
npm
:
sudo apt-get install npm -y
- Globally install the
n
package manager and switch to a stable Node.js version:
sudo npm i n -g
sudo n stable
- Globally install Yarn:
sudo npm i -g yarn
Download the CAT Protocol repository containing all necessary code.
git clone https://github.com/CATProtocol/cat-token-box && cd cat-token-box
Install project dependencies and build the source code:
sudo yarn install && yarn build
Navigate to the tracker directory, assign necessary permissions, and start the Fractal Bitcoin node using Docker Compose.
cd packages/tracker
sudo chmod 777 docker/data && sudo chmod 777 docker/pgdata
sudo docker compose up -d
From the project root directory, build the necessary Docker image.
cd $HOME/cat-token-box && sudo docker build -t tracker:latest .
Run the tracker container to facilitate communication with the blockchain network.
sudo docker run -d \
--name tracker \
--add-host="host.docker.internal:host-gateway" \
-e DATABASE_HOST="host.docker.internal" \
-e RPC_HOST="host.docker.internal" \
-p 3000:3000 \
tracker:latest
If the cli command is not working well, you have to restart tracker by using this command
docker restart tracker
Navigate to the CLI directory and create a configuration file for managing wallet settings.
cd $HOME/cat-token-box/packages/cli
Create a config.json
using the following template:
cat <<EOF > config.json
{
"network": "fractal-mainnet",
"tracker": "http://127.0.0.1:3000",
"dataDir": ".",
"maxFeeRate": 30,
"rpc": {
"url": "http://127.0.0.1:8332",
"username": "Leionion",
"password": "Qazxswedc"
}
}
EOF
Use Yarn CLI to create a new wallet or import an existing Taproot Bitcoin wallet.
- To create a new wallet:
sudo yarn cli wallet create
- To import an existing Taproot wallet, modify the following command with your mnemonic phrase:
Here, Hdpath("m/86'/0'/0'/0/0") is corresponding to Unisat wallet first account's taproot address.
cat <<EOF > wallet.json
{
"accountPath": "m/86'/0'/0'/0/0",
"name": "leionion",
"mnemonic": "MNEMONIC (12 words)"
}
EOF
Retrieve your wallet address using:
sudo yarn cli wallet address
Using this command, you can get your CAT20 token in your taproot wallet.
sudo yarn cli mint -i 1be69768c1120bd8f7477d7f1a14dc7c5b5c1c26c37306a660ad9fe472d2d36c_0 5 --fee-rate 120
Here, 1be69768c1120bd8f7477d7f1a14dc7c5b5c1c26c37306a660ad9fe472d2d36c_0 meaning is inscription_id(transaction_id + vout). To mint specific token (token ID : 1be69768c1120bd8f7477d7f1a14dc7c5b5c1c26c37306a660ad9fe472d2d36c_0), you have to own minter UTXO for that token ID (1be69768c1120bd8f7477d7f1a14dc7c5b5c1c26c37306a660ad9fe472d2d36c_0)...
sudo yarn cli wallet balances
The subsequent manual will focus on the CAT Protocol CLI Command Guide. In the CAT_CLI_Guide, I will provide a comprehensive explanation on how to utilize the CAT protocol CLI commands.
If you encounter any new technical issues or need development inquiries, please contact me.
- Telegram: https://t.me/inscNix/
- Twitter: https://x.com/chain_sats/