Author: 0xoooooyoung, Mirror
CAT Protocol One-click Script Casting Tutorial
background
The Cat20 protocol @ProtocolCAT, which was released on Fractal Bitcoin early this morning, is a new protocol on the fractal network. Based on the new OP_CAT technology, developers can develop based on OP_CAT to implement some simple smart contract functions.
Here is a one-click script tutorial for Linux mint.
Mint prerequisites: $FB, a Linux server (2 cores CPU 4GB memory)
Official documentation https://github.com/CATProtocol/cat-token-box/blob/main/packages/tracker/README.md#prerequisite
Tutorial starts:
A one-click script is used here to simplify your setup. The code is written by Twitter user @ouyoung11. Welcome to follow.
The code is completely open source and the source code can be checked on GitHub. There are no background vulnerabilities or dangerous code.
① After logging in to the server, execute the following command to install the script:
cd ~ && wget -O /root/cat20-oooooyoung.sh https://github.com/nopapername/shell-oooooyoung/releases/download/cat20-oooooyoung/cat20-oooooyoung.sh && chmod +x cat20-oooooyoung.sh
② Enter the following code to enter the prompt interface of one-click script building (enter the number execution steps in sequence, and run the following command after each step to enter the script interface again).
bash ~/cat20-oooooyoung.sh
PS: If the pink interface in Figure 2 appears during the installation, just press Enter to continue.
③ After the environment and fractal nodes are installed, synchronization has started automatically. Enter `bash ~/cat20-oooooyoung.sh` again to enter the script interface, and then enter 4 to view the node synchronization log
PS: Continue to the next step after confirming that it is consistent with the latest block height of the Fractal Network https://explorer.unisat.io/fractal-mainnet/block
④ Enter `bash ~/cat20-oooooyoung.sh` again to enter the script interface, enter 2 to create a new fractal network btc wallet, save the seed phrase and address, and then transfer a little bit to the address $FB When gas is used, you can participate in minting cat20 tokens
⑤ Enter `bash ~/cat20-oooooyoung.sh` again to enter the script interface, enter 3 to perform the cyclic mint of $CAT tokens. Because there are many people playing, the mint may fail and cause retries. Just hang up - 9.11 Update: The script has been updated to manually set the gas
⑥ Two ways to check whether the mint has been received
Enter `bash ~/cat20-oooooyoung.sh` to enter the script interface, enter 5 to view the balance
Go directly to the website and enter the address to query https://cat20.app/ (I don’t know if it is official)
Problem Summary
1. The created wallet address does not correspond to the unisat wallet address when imported?
Because the generated wallet is in the path format of m/44', and the unisat import format defaults to m/86', so when importing, fill in the format of `m/44'/0'/0'/0` or m/44'/0'/0'/0/0 and you can see it
You can also view the FB balance and the marked assets by directly entering the newly generated wallet address in the block browser https://explorer.unisat.io/fractal-mainnet/address/bc1p9k67fd8jr4hnxd6k9lgh02g3dfeht2f5wdkyppya2cterlqakfdqy3ksdd
Check your wallet balance
2. If the node crashes and I want to reinstall the node, how do I import or restore the wallet?
Export the previous wallet (that is, this wallet.json file is your wallet data, and switching wallets only requires changing this json file):
cat ~/cat-token-box/packages/cli/wallet.json
Import a new wallet (on a new server or after reinstalling the node, copy the previous wallet.json and re-mint):
echo '{ "accountPath": "This is the format of the previous wallet address", "name": "Do not change here", "mnemonic": "This is the seed phrase of the previous wallet"}' > ~/cat-token-box/packages/cli/wallet.json
3. If you want to modify the gas fee of the circular mint script, follow the steps below: (The script has been updated to manually set GAS)
Type `nano ~/cat-token-box/packages/cli/mint_script.sh`
Modify the code (you can set the gas fee to your desired value, in this example it is 100 gas)
sudo yarn cli mint -i 45ee725c2c5993b3e4d308842d87e973bf1951f5f7a804b21e4dd964ecd12d6b_0 5 --fee-rate 100
Then press ctrl + x and enter y to save and exit, then re-run the mint script
4. What is the problem of `No token found` when minting tokens?
This is usually caused by the node not being fully synchronized. Just wait for the node to synchronize.
5. The minted tokens have not arrived, the gas fee has not been deducted, and the txid of mint success cannot be found?
You need to wait for the node to synchronize to the block height where you successfully minted.
Some blocks cannot be mined if the gas is insufficient. You can check the gas fee at https://explorer.unisat.io/fractal-mainnet/block (the gas fee is currently as high as 420, and the cost-effectiveness of minting at this fee is not high)
6. Is there an error in the first step of the one-click script when installing the node or checking the log?
There are many strange errors here. Generally speaking, it may be that the server environment configuration is different from mine. Since I haven’t encountered it, I don’t know how to solve it for the time being. You can add the following dc to discuss together.