Deploy, Mint and Transfer with Ord Wallet

All you need to know

24.09.2023

bitcoinbrc20howtoordinalstutorialende
Gregor Wedlich
Gregor Wedlich
Life, the Universe and Everything.
Donate with:
Lightning
Alby

Table of Contents

    Although there is an extensive documentation from the creators of the BRC20 Token Standard, much of it is very theoretical. This is generally a good thing, but if you only have time every few months to delve into the topic of Ordinals and its ecosystem, and each time you have to go through the documentation again, I find it more annoying than helpful. That's why I've decided to create a small step-by-step guide on how to create, mint, and transfer tokens.

    This tutorial assumes that a fully synchronized Bitcoin-Core Wallet and Ord Wallet have been installed. I also assume that anyone who has installed the Ord Wallet knows how to operate it. Therefore, I won't go into further detail about it in this post. However, if you're still interested in a guide on that, let me know in the comments.

    Requirements summarized:

    1. Deploy: How to create your own BRC20 token

    1.1 Create deploy text file

    First, we create a text file. It's important that the MIME type is "text/plain" and the character set is "charset=utf-8".

    How this works varies depending on the operating system. IDEs and editors like Notepad++ usually display which character set and MIME type are set. In this guide, I explain the process for Linux or the shell. This should also work on Windows in a WSL shell.

    I create my text file using "iconv" and, as an example, I name my token "sil3":

    1echo "" | iconv -t UTF-8 > deploy-sil3.txt

    1.2 Specify token

    Now we determine what our token should be called and how much of it will be available. Essentially, we are specifying our token to later anchor it firmly and immutably in the Timechain.

    Edit the text file now and insert the following content. Naturally, adjust the name "tick", the maximum available amount of tokens "max," and the limit "lim" for the maximum number of tokens per minting process.

    1{ 2 "p": "brc-20", 3 "op": "deploy", 4 "tick": "sil3", 5 "max": "21000000", 6 "lim": "1000" 7}

    Here's a brief explanation of what the individual keys mean:

    "p": = Protocol: Helps other systems identify and process Brc-20 events "op": = Operation: Type of event (Deploy, Mint, Transfer) "tick": = Ticker: max. 4-letter identifier of the BRC-20 "max": = Max. Supply: Set the maximum supply of the BRC-20 "lim": = Max. Limit per Mint

    1.3 Inscribe token

    Now we can deploy our token. This is done with the following command, please read the explanation beforehand:

    1ord wallet inscribe --destination ZIEL_ADRESSE ~/deploy-sil3.txt --fee-rate 26

    Explanation:

    --destination:

    This is an optional command, but one I would recommend using. In our case, we assume that we have previously generated an address with the command wallet receive. We should always specify this address when minting and transferring. The reason is that the Ord Wallet writes every inscription to a new address if none is specified. This means that if we have, for example, created a mint inscription for our tokens 10 times, we also own 10 different addresses. If we now want to send 10,000 tokens (10 x 1,000), we would have to create a transfer inscription for each of these addresses, as the tokens from individual addresses can't be combined. This is only possible if all tokens are on the same address. Ultimately, this saves us both time and transaction fees.

    --fee-rate:

    Important: Check in advance on https://mempool.space/ what fees are currently being charged; don't set these too low!

    Mempool_TX_Fees

    Note: Of course, you can specify any other Taproot address as the target address. However, be aware that not all wallets know how to handle inscriptions. Therefore, only use officially supported wallets (Unisat, Xverse, Hiro, Ordinalsafe).

    Optional: If you want to test the command in advance, simply add --dry-run after wallet inscribe.

    After you've sent the command, you should receive a similar output:

    1{ 2 "commit": "..", 3 "inscription": "...", 4 "reveal": "...", 5 "fees": 9594 6}

    "commit": Is the TXID which you can now track with Mempool. Just search for it.

    1.4 Check

    If everything was successful, I always check on OKX, because in my opinion it provides the best Ordinals Explorer. However, you can use any other that gives you enough information.

    Example ORDI token: OKX Explorer

    2. Mint: Create Token

    After defining our token with "Deploy," any user can now secure their share of tokens through the "Mint" process.

    2.1 Create Mint Text File

    Just like with deployment, we create another text file.

    1echo "" | iconv -t UTF-8 > mint-sil3.txt 2

    The content just looks a little different:

    1{ 2 "p": "brc-20", 3 "op": "mint", 4 "tick": "sil3", 5 "amt": "1000" 6}

    Explanation:

    amt: Indicates the amount of the BRC-20 to be minted.

    Important: "amt" must not exceed the limit we set during deployment.

    2.2 Inscribe Mint

    The command is the same as during the deployment process; we just need to specify the correct text file. I also recommend again to always mint the tokens to the same address (destination).

    1ord wallet inscribe --destination ZIEL_ADRESSE ~/mint-sil3.txt --fee-rate 26

    After you send the command, you should get a similar output:

    1{ 2 "commit": "..", 3 "inscription": "...", 4 "reveal": "...", 5 "fees": 9594 6}

    You can check if everything worked out with the OKX-Explorer.

    Note: Of course, you can also directly mint into your Unisat or Xverser Wallet when minting. In that case, "Point 3. Transfer" will no longer be important for you.

    3. Transfer: send tokens

    The transfer is somewhat complicated and consists of the following steps:

    • Inscribe "Transfer"
    • Send "Transfer" Inscription to destination address

    3.1 Preparation

    We always need to specify a "--destination" that has sufficient tokens. That's why it's so important to always use the same address when minting. Let's say we've minted 1,000 tokens to the same address 10 times, we can now directly transfer up to 10,000 tokens.

    Just like with deployment and minting, we create another text file.

    1echo "" | iconv -t UTF-8 > transfer-sil3.txt

    This time we add the following content and specify "5000" tokens to be sent in the quantity to be transferred (amt) in our example:

    1{ 2 "p": "brc-20", 3 "op": "transfer", 4 "tick": "TokenName", 5 "amt": "5000" 6}

    3.2 Inscribe Transfer

    The procedure is the same as with deploying and minting. In our command, we specify the --destination that holds enough tokens (at least as many as we want to send) and make sure to indicate the recently created transfer-sil3.txt file.

    1ord wallet inscribe --destination ZIEL_ADRESSE ~/transfer-sil3.txt --fee-rate 26

    After you send the command, you should get a similar output:

    1{ 2 "commit": "..", 3 "inscription": "...", 4 "reveal": "...", 5 "fees": 9594 6}

    3.3 Check

    Once the transaction has been confirmed, you can again check in your Explorer of choice to see if the token transfer is valid.

    4. Sending Tokens to Another Address

    This process is now relatively simple. You simply send the recently created "Transfer" inscription to another Ordinals-capable address.

    This can be done with the following command:

    1ord wallet send --fee-rate 26 DESTINATION ADDRESS INSCRIPTION_ID

    Explanation:

    Destination Address: Where you want to send the tokens. INSCRIPTION_ID: The Inscription ID of the recently created "Transfer" inscription.

    Conclusion

    Initially, dealing with the BRC20 token can seem overwhelming. Despite extensive documentation, there is often a lack of practical guides. That's why I created this tutorial to clearly explain the creation, minting, and transferring of tokens. Particularly noteworthy is the importance of using consistent addresses when minting. This not only saves time but also transaction fees. With this guide, I hope to provide newcomers with a clear and simple path for dealing with the BRC20 token and the Ord Wallet.

    Comments: