or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
Metaboss
Introduction
Metaboss was made to help out users to interact with their tokens and its main functionalities allow to get data from nonfungible tokens and even update them. We will begin by installing the program and then proceed to use several of its commands and features.
Installation
To install you can copy paste the following command into your terminal.
In case any errors occur, here are some helpful programs to install that will help you fix them.
Macos
Ubuntu
Uses
In this section we will be exploring some of the different uses for Metaboss. We will begin by looking at the different methods that we have avaiable by using:
From this, you'll notice that there are many very useful functions including burning tokens, signing collections and taking snapshots which includes holders snapshots, and even mint NFTs. You can also take note of the different flags that you can pass of which include
--rpc
and--timeout
which are very useful for more demanding commands. You can pass these flags before the commands:We will begin with one of the most important things to do when working with NFTs. Metaboss allows us to mint an NFT from a json file.
This command requires the path to the keypair of your file system wallet and if you happen to have several you can always get information including the path of it by using:
Mint
We will now proceed to mint a single token.
This directly mint our token to the wallet of the keypair we provided. We also have the option of changing the wallet that receives the NFT, and for this we must provide an address. To do this we will add a
--receiver
flag at the end.Snapshot
We will now move on to finding mints using a creator address.
For many projects a snapshot of the holdres is very important for several reasons. And metaboss has a simple
snapshot
command that takes in theupdate authority
and allows you to choose the directory to output the holders list like the following:Update
The next command we will be trying out is called
update
. Oftentimes we might find ourselves with a token, specifically a nonfungible token that might require some changes in its metadata. To do so we will start with smaller updated within the metdata of the tokens.In our first example, we'll be updating the seller basis fees points. For this, we will need the path to your keypair stored in your system:
Updating other sections of the data struct can be done through similar commands. For example, let's try to update the symbol of our NFT:
Once again we're using updating but we've replaced
sfbp
withsymbol
.For our following update we will do something similar with the command and instead of
symbol
we'll writecreators
.In this example, we've included two creators separated by a comma and set verified to false.
Finally, we can also use a JSON file to update the data struct using
data
and providing the path to the JSON file.Burn
Now that we've done trying out the different parts of the metadata we can update let's move on to burning NFTs. At some point you might want to get rid of an NFT and to do that we will burn it. For this command we will need the mint account of the NFT we want to burn. Metaboss also provides us with the option of burning multiple NFTs at once by listing them in JSON file such as shown below.
Collections
Sometimes the NFTs we mint do not belong to a single collection, and with the new Metaplex Certified Collections we might want our NFTs to belong to a single on-chain collection. We can
migrate
our collection using a mint list within a JSON file as shown below.We will also need the mint address of the parent NFT that will be representing this collection. With this information we just grab the path to the JSON we've created in the first step and migrate the collection.
The longer our list becomes the higher our chance of encountering a small error. This often happens because
migrate
will attempt to finish moving the collection quickly. To give the command a higher chance of success we can pass the--retries
flag along with a number.If after running this, there are still some, this will result with a cache file containing the errors. We can then take this file and pass it on to the command before running it again.
We can also find ourselves with a repeating error with can be addressed by looking through the contents of the cache file. Let's look at the following cache file.
Both errors indicate the
0x39
error. From the Metaplex errors we know that0x39
means that these two NFTs have a different update authority.Once migration has finished we must verify that it all the items successfully moved and belong to the same verified collection.