Complete the Fractal Network CAT Protocol Token Minting Tutorial in Five Minutes

This article is machine translated
Show original

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)

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 

4KLbpQinMYS7qOJPB3btaCRdx4GBMP4wVRP3Xcce.jpeg

One-click script

PS: If the pink interface in Figure 2 appears during the installation, just press Enter to continue.

MvJelfTMZZsz0yqGQl01rpBb7nwiEcBWJvoxuHU5.jpeg

Enter Skip

③ 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

Axju2fgyGA1b4IXGyarkNWPQfNTDBccpfW0kQSzk.jpeg

Synchronize Node

④ 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

fknfAP99F848pzSlg2cwJ3xOQv3CwLxbF2ulUZpY.jpeg

Create a wallet address

⑤ 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

QAzUL5HueBYZ4yzzoaAckKhh7OBprn6rEOxktedN.jpeg

Support manual gas input when minting

QfSreecmQIabd5yyEEA2RWPXdjzBkE0JJLRcZlcu.jpeg

No gas

Dv8GrUOvBTFxNYOXmuoZA96vGkfi4LpI18Mw0ZJt.jpeg

Mint success

⑥ 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)

BjGDBOD3i6hCfCC7wcuCpjaxemnBGXrbVM4T8wmj.jpeg

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

sbIIcLkKwL4XDF6yUxCoRsrSRRUfQB0l3zjW6GhU.jpeg

Import wallet

YaF7TRGZ51p8s8x4TTATK6uEV1h3KAhV0GFhVOcB.jpeg

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 

SfPUBcYfLPy8LW0EL5eAhACyTOEnUhbBNaL5iSSp.jpeg

Save the wallet json file
  • 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.

9BtuNjVvNtjVqdMi9Hg0vioLV9PJ01C0uzDQ4t8H.jpeg

No token found

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)

9NyZjS0I8ws1JZK1fhYos0LHUixxQTH8JqkEvjlF.jpeg

Block gas fee and height

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.

Source
Disclaimer: The content above is only the author's opinion which does not represent any position of Followin, and is not intended as, and shall not be understood or construed as, investment advice from Followin.
Like
Add to Favorites
Comments